@matheusbsbs / matheus-bagliano / commits / 950db8798d
Fork 0

Rename diff.suppress-blank-empty to diff.suppressBlankEmpty

All the other config variables use CamelCase. This config variable should not be an exception. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed Jan 20, 2009 at 22:08 UTC 950db8798d51cb183c858938263425b367b21dfd
3 files changed +8 -6
Documentation/config.txt
+1 -1
@@ -635,7 +635,7 @@ diff.renames::
635 will enable basic rename detection. If set to "copies" or
636 "copy", it will detect copies, as well.
637
638 -diff.suppress-blank-empty::
638 +diff.suppressBlankEmpty::
639 A boolean to inhibit the standard behavior of printing a space
640 before each empty output line. Defaults to false.
641
diff.c
+3 -1
@@ -118,7 +118,9 @@ int git_diff_basic_config(const char *var, const char *value, void *cb)
118 }
119
120 /* like GNU diff's --suppress-blank-empty option */
121 - if (!strcmp(var, "diff.suppress-blank-empty")) {
121 + if (!strcmp(var, "diff.suppressblankempty") ||
122 + /* for backwards compatibility */
123 + !strcmp(var, "diff.suppress-blank-empty")) {
124 diff_suppress_blank_empty = git_config_bool(var, value);
125 return 0;
126 }
t/t4029-diff-trailing-space.sh
+4 -4
@@ -2,7 +2,7 @@
2 #
3 # Copyright (c) Jim Meyering
4 #
5 -test_description='diff honors config option, diff.suppress-blank-empty'
5 +test_description='diff honors config option, diff.suppressBlankEmpty'
6
7 . ./test-lib.sh
8
@@ -24,14 +24,14 @@ test_expect_success \
24 git add f &&
25 git commit -q -m. f &&
26 printf "\ny\n" > f &&
27 - git config --bool diff.suppress-blank-empty true &&
27 + git config --bool diff.suppressBlankEmpty true &&
28 git diff f > actual &&
29 test_cmp exp actual &&
30 perl -i.bak -p -e "s/^\$/ /" exp &&
31 - git config --bool diff.suppress-blank-empty false &&
31 + git config --bool diff.suppressBlankEmpty false &&
32 git diff f > actual &&
33 test_cmp exp actual &&
34 - git config --bool --unset diff.suppress-blank-empty &&
34 + git config --bool --unset diff.suppressBlankEmpty &&
35 git diff f > actual &&
36 test_cmp exp actual
37 '