]> git.ipfire.org Git - thirdparty/git.git/commit - diff.c
diff.c: refactor parse_ws_error_highlight()
authorJunio C Hamano <gitster@pobox.com>
Tue, 4 Oct 2016 22:03:33 +0000 (15:03 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 4 Oct 2016 22:49:05 +0000 (15:49 -0700)
commit077965f84a580b7e1de7d60ed13656bec19cc2fb
tree36de9c7e4d111d63157ef8459c43a928e3fd2674
parentf3f5c7f5201ef71e62cea41a8b692cace2dcf579
diff.c: refactor parse_ws_error_highlight()

Rename the function to parse_ws_error_highlight_opt(), because it is
meant to parse a command line option, and then refactor the meat of
the function into a helper function that reports the parsed result
which is typically a small unsigned int (these are OR'ed bitmask
after all), or a negative offset that indicates where in the input
string a parse error happened.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c