Skip to content

Commit

Permalink
Rename diff.suppress-blank-empty to diff.suppressBlankEmpty
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
dscho authored and gitster committed Jan 21, 2009
1 parent 674a1d2 commit 950db87
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Documentation/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
4 changes: 3 additions & 1 deletion diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
8 changes: 4 additions & 4 deletions t/t4029-diff-trailing-space.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
'
Expand Down

0 comments on commit 950db87

Please sign in to comment.