From 99f55ebc6757ec8777627142e7f8e1dc50f68d2c Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Fri, 10 Sep 2010 11:13:38 -0500 Subject: [PATCH 1/2] t/t4018: avoid two unnecessary sub-shell invocations Signed-off-by: Brandon Casey Signed-off-by: Junio C Hamano --- t/t4018-diff-funcname.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/t4018-diff-funcname.sh b/t/t4018-diff-funcname.sh index 620cd02798..c8e19372b0 100755 --- a/t/t4018-diff-funcname.sh +++ b/t/t4018-diff-funcname.sh @@ -37,13 +37,13 @@ for p in $builtin_patterns do test_expect_success "builtin $p pattern compiles" ' echo "*.java diff=$p" > .gitattributes && - ! ( git diff --no-index Beer.java Beer-correct.java 2>&1 | - grep "fatal" > /dev/null ) + ! { git diff --no-index Beer.java Beer-correct.java 2>&1 | + grep "fatal" > /dev/null; } ' test_expect_success "builtin $p wordRegex pattern compiles" ' - ! ( git diff --no-index --word-diff \ + ! { git diff --no-index --word-diff \ Beer.java Beer-correct.java 2>&1 | - grep "fatal" > /dev/null ) + grep "fatal" > /dev/null; } ' done From 9904fadfea002edf2ef22e8ec9a978e45d1f540b Mon Sep 17 00:00:00 2001 From: Mark Lodato Date: Thu, 9 Sep 2010 21:39:37 -0400 Subject: [PATCH 2/2] config.txt: fix placement of diff.noprefix In git-config(1), diff.noprefix was placed in between diff.mnemonicprefix and the list of mnemonic prefixes, which is obviously incorrect and very confusing to readers. Now, it is located after the end of the explanation of mnemonicprefix, which makes much more sense. Signed-off-by: Mark Lodato Signed-off-by: Junio C Hamano --- Documentation/config.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/config.txt b/Documentation/config.txt index dc4e83b103..1df0f654e6 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -804,8 +804,6 @@ diff.mnemonicprefix:: standard "a/" and "b/" depending on what is being compared. When this configuration is in effect, reverse diff output also swaps the order of the prefixes: -diff.noprefix:: - If set, 'git diff' does not show any source or destination prefix. `git diff`;; compares the (i)ndex and the (w)ork tree; `git diff HEAD`;; @@ -817,6 +815,9 @@ diff.noprefix:: `git diff --no-index a b`;; compares two non-git things (1) and (2). +diff.noprefix:: + If set, 'git diff' does not show any source or destination prefix. + diff.renameLimit:: The number of files to consider when performing the copy/rename detection; equivalent to the 'git diff' option '-l'.