Skip to content

Commit 950db87

Browse files
dschogitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 674a1d2 commit 950db87

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

Documentation/config.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ diff.renames::
635635
will enable basic rename detection. If set to "copies" or
636636
"copy", it will detect copies, as well.
637637

638-
diff.suppress-blank-empty::
638+
diff.suppressBlankEmpty::
639639
A boolean to inhibit the standard behavior of printing a space
640640
before each empty output line. Defaults to false.
641641

diff.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,9 @@ int git_diff_basic_config(const char *var, const char *value, void *cb)
118118
}
119119

120120
/* 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")) {
122124
diff_suppress_blank_empty = git_config_bool(var, value);
123125
return 0;
124126
}

t/t4029-diff-trailing-space.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# Copyright (c) Jim Meyering
44
#
5-
test_description='diff honors config option, diff.suppress-blank-empty'
5+
test_description='diff honors config option, diff.suppressBlankEmpty'
66

77
. ./test-lib.sh
88

@@ -24,14 +24,14 @@ test_expect_success \
2424
git add f &&
2525
git commit -q -m. f &&
2626
printf "\ny\n" > f &&
27-
git config --bool diff.suppress-blank-empty true &&
27+
git config --bool diff.suppressBlankEmpty true &&
2828
git diff f > actual &&
2929
test_cmp exp actual &&
3030
perl -i.bak -p -e "s/^\$/ /" exp &&
31-
git config --bool diff.suppress-blank-empty false &&
31+
git config --bool diff.suppressBlankEmpty false &&
3232
git diff f > actual &&
3333
test_cmp exp actual &&
34-
git config --bool --unset diff.suppress-blank-empty &&
34+
git config --bool --unset diff.suppressBlankEmpty &&
3535
git diff f > actual &&
3636
test_cmp exp actual
3737
'

0 commit comments

Comments
 (0)