@@ -231,6 +231,42 @@ ifdef::git-diff[]
231231endif::git-diff[]
232232 It is the same as `--color=never`.
233233
234+ --color-moved[=<mode>]::
235+ Moved lines of code are colored differently.
236+ ifdef::git-diff[]
237+ It can be changed by the `diff.colorMoved` configuration setting.
238+ endif::git-diff[]
239+ The <mode> defaults to 'no' if the option is not given
240+ and to 'zebra' if the option with no mode is given.
241+ The mode must be one of:
242+ +
243+ --
244+ no::
245+ Moved lines are not highlighted.
246+ default::
247+ Is a synonym for `zebra`. This may change to a more sensible mode
248+ in the future.
249+ plain::
250+ Any line that is added in one location and was removed
251+ in another location will be colored with 'color.diff.newMoved'.
252+ Similarly 'color.diff.oldMoved' will be used for removed lines
253+ that are added somewhere else in the diff. This mode picks up any
254+ moved line, but it is not very useful in a review to determine
255+ if a block of code was moved without permutation.
256+ zebra::
257+ Blocks of moved code are detected greedily. The detected blocks are
258+ painted using either the 'color.diff.{old,new}Moved' color or
259+ 'color.diff.{old,new}MovedAlternative'. The change between
260+ the two colors indicates that a new block was detected. If there
261+ are fewer than 3 adjacent moved lines, they are not marked up
262+ as moved, but the regular colors 'color.diff.{old,new}' will be
263+ used.
264+ dimmed_zebra::
265+ Similar to 'zebra', but additional dimming of uninteresting parts
266+ of moved code is performed. The bordering lines of two adjacent
267+ blocks are considered interesting, the rest is uninteresting.
268+ --
269+
234270--word-diff[=<mode>]::
235271 Show a word diff, using the <mode> to delimit changed words.
236272 By default, words are delimited by whitespace; see
0 commit comments