]> git.ipfire.org Git - thirdparty/git.git/commit - diff.h
diff: align move detection error handling with other options
authorStefan Beller <sbeller@google.com>
Tue, 13 Nov 2018 21:33:57 +0000 (13:33 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 14 Nov 2018 07:27:50 +0000 (16:27 +0900)
commitd173e799ea8fae7d6e4649b763d32d5f0ba82011
treeeda386130100c74966d16211cc0ef8fb52f801d8
parentcd69ec8cde54af1817630331fc441f493866f0d4
diff: align move detection error handling with other options

This changes the error handling for the options --color-moved-ws
and --color-moved-ws to be like the rest of the options.

Move the die() call out of parse_color_moved_ws into the parsing
of command line options. As the function returns a bit field, change
its signature to return an unsigned instead of an int; add a new bit
to signal errors. Once the error is signaled, we discard the other
bits, such that it doesn't matter if the error bit overlaps with any
other bit.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c
diff.h
t/t4015-diff-whitespace.sh