aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-01-21 01:08:10 -0800
committerJunio C Hamano <gitster@pobox.com>2009-01-21 01:08:10 -0800
commitf873dd5ac22fee648f9097d5a91200b6f4850ae0 (patch)
treeeffdbc042e8919b36c92faca7707f84bbbac2a07
parent2b5189e51855312a91dd23b5e7311c48944bc382 (diff)
parent950db8798d51cb183c858938263425b367b21dfd (diff)
downloadgit-f873dd5ac22fee648f9097d5a91200b6f4850ae0.tar.gz
git-f873dd5ac22fee648f9097d5a91200b6f4850ae0.tar.xz
Merge branch 'maint'
* maint: Rename diff.suppress-blank-empty to diff.suppressBlankEmpty
-rw-r--r--Documentation/config.txt2
-rw-r--r--diff.c4
-rwxr-xr-xt/t4029-diff-trailing-space.sh8
3 files changed, 8 insertions, 6 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 6b3ac5aa9..290cb48eb 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -635,7 +635,7 @@ diff.renames::
will enable basic rename detection. If set to "copies" or
"copy", it will detect copies, as well.
-diff.suppress-blank-empty::
+diff.suppressBlankEmpty::
A boolean to inhibit the standard behavior of printing a space
before each empty output line. Defaults to false.
diff --git a/diff.c b/diff.c
index d23548292..073131316 100644
--- a/diff.c
+++ b/diff.c
@@ -118,7 +118,9 @@ int git_diff_basic_config(const char *var, const char *value, void *cb)
}
/* like GNU diff's --suppress-blank-empty option */
- if (!strcmp(var, "diff.suppress-blank-empty")) {
+ if (!strcmp(var, "diff.suppressblankempty") ||
+ /* for backwards compatibility */
+ !strcmp(var, "diff.suppress-blank-empty")) {
diff_suppress_blank_empty = git_config_bool(var, value);
return 0;
}
diff --git a/t/t4029-diff-trailing-space.sh b/t/t4029-diff-trailing-space.sh
index 4ca65e033..9ddbbcde5 100755
--- a/t/t4029-diff-trailing-space.sh
+++ b/t/t4029-diff-trailing-space.sh
@@ -2,7 +2,7 @@
#
# Copyright (c) Jim Meyering
#
-test_description='diff honors config option, diff.suppress-blank-empty'
+test_description='diff honors config option, diff.suppressBlankEmpty'
. ./test-lib.sh
@@ -24,14 +24,14 @@ test_expect_success \
git add f &&
git commit -q -m. f &&
printf "\ny\n" > f &&
- git config --bool diff.suppress-blank-empty true &&
+ git config --bool diff.suppressBlankEmpty true &&
git diff f > actual &&
test_cmp exp actual &&
perl -i.bak -p -e "s/^\$/ /" exp &&
- git config --bool diff.suppress-blank-empty false &&
+ git config --bool diff.suppressBlankEmpty false &&
git diff f > actual &&
test_cmp exp actual &&
- git config --bool --unset diff.suppress-blank-empty &&
+ git config --bool --unset diff.suppressBlankEmpty &&
git diff f > actual &&
test_cmp exp actual
'