diff options
author | Stefan Beller <sbeller@google.com> | 2018-11-13 13:33:57 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-11-14 16:27:50 +0900 |
commit | d173e799ea8fae7d6e4649b763d32d5f0ba82011 (patch) | |
tree | eda386130100c74966d16211cc0ef8fb52f801d8 /diff.h | |
parent | cd69ec8cde54af1817630331fc441f493866f0d4 (diff) | |
download | git-d173e799ea8fae7d6e4649b763d32d5f0ba82011.tar.gz |
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>
Diffstat (limited to 'diff.h')
-rw-r--r-- | diff.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -225,7 +225,8 @@ struct diff_options { /* XDF_WHITESPACE_FLAGS regarding block detection are set at 2, 3, 4 */ #define COLOR_MOVED_WS_ALLOW_INDENTATION_CHANGE (1<<5) - int color_moved_ws_handling; + #define COLOR_MOVED_WS_ERROR (1<<0) + unsigned color_moved_ws_handling; struct repository *repo; }; |