summaryrefslogtreecommitdiff
path: root/diff.h
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-11-13 21:33:57 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-11-14 07:27:50 (GMT)
commitd173e799ea8fae7d6e4649b763d32d5f0ba82011 (patch)
treeeda386130100c74966d16211cc0ef8fb52f801d8 /diff.h
parentcd69ec8cde54af1817630331fc441f493866f0d4 (diff)
downloadgit-d173e799ea8fae7d6e4649b763d32d5f0ba82011.zip
git-d173e799ea8fae7d6e4649b763d32d5f0ba82011.tar.gz
git-d173e799ea8fae7d6e4649b763d32d5f0ba82011.tar.bz2
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.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/diff.h b/diff.h
index ce5e8a8..9e8061c 100644
--- a/diff.h
+++ b/diff.h
@@ -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;
};