Skip to content

Commit 6283596

Browse files
committed
Merge branch 'es/diff-color-move-fix' into pu
* es/diff-color-move-fix: diff: --color-moved: rename "dimmed_zebra" to "dimmed-zebra"
2 parents 0d9bffa + e3f2f5f commit 6283596

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

Documentation/diff-options.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,10 +286,11 @@ zebra::
286286
are painted using either the 'color.diff.{old,new}Moved' color or
287287
'color.diff.{old,new}MovedAlternative'. The change between
288288
the two colors indicates that a new block was detected.
289-
dimmed_zebra::
289+
dimmed-zebra::
290290
Similar to 'zebra', but additional dimming of uninteresting parts
291291
of moved code is performed. The bordering lines of two adjacent
292292
blocks are considered interesting, the rest is uninteresting.
293+
`dimmed_zebra` is a deprecated synonym.
293294
--
294295

295296
--color-moved-ws=<modes>::

diff.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,10 +283,12 @@ static int parse_color_moved(const char *arg)
283283
return COLOR_MOVED_ZEBRA;
284284
else if (!strcmp(arg, "default"))
285285
return COLOR_MOVED_DEFAULT;
286+
else if (!strcmp(arg, "dimmed-zebra"))
287+
return COLOR_MOVED_ZEBRA_DIM;
286288
else if (!strcmp(arg, "dimmed_zebra"))
287289
return COLOR_MOVED_ZEBRA_DIM;
288290
else
289-
return error(_("color moved setting must be one of 'no', 'default', 'blocks', 'zebra', 'dimmed_zebra', 'plain'"));
291+
return error(_("color moved setting must be one of 'no', 'default', 'blocks', 'zebra', 'dimmed-zebra', 'plain'"));
290292
}
291293

292294
static int parse_color_moved_ws(const char *arg)

t/t4015-diff-whitespace.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1305,7 +1305,7 @@ test_expect_success 'detect blocks of moved code' '
13051305
13061306
'
13071307

1308-
test_expect_success 'detect permutations inside moved code -- dimmed_zebra' '
1308+
test_expect_success 'detect permutations inside moved code -- dimmed-zebra' '
13091309
# reuse setup from test before!
13101310
test_config color.diff.oldMoved "magenta" &&
13111311
test_config color.diff.newMoved "cyan" &&
@@ -1315,7 +1315,7 @@ test_expect_success 'detect permutations inside moved code -- dimmed_zebra' '
13151315
test_config color.diff.newMovedDimmed "normal cyan" &&
13161316
test_config color.diff.oldMovedAlternativeDimmed "normal blue" &&
13171317
test_config color.diff.newMovedAlternativeDimmed "normal yellow" &&
1318-
git diff HEAD --no-renames --color-moved=dimmed_zebra --color >actual.raw &&
1318+
git diff HEAD --no-renames --color-moved=dimmed-zebra --color >actual.raw &&
13191319
grep -v "index" actual.raw | test_decode_color >actual &&
13201320
cat <<-\EOF >expected &&
13211321
<BOLD>diff --git a/lines.txt b/lines.txt<RESET>

0 commit comments

Comments
 (0)