]> git.ipfire.org Git - thirdparty/git.git/commit
diff: simplify parsing of diff.colormovedws
authorJunio C Hamano <gitster@pobox.com>
Fri, 1 Aug 2025 22:04:21 +0000 (15:04 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 3 Aug 2025 05:34:45 +0000 (22:34 -0700)
commitf3a303aef017ad6e53fa44643d832a1fa0de0d91
treee71af91cf31ed40a46758817717ad61258f990f6
parent576454974165d51b7e39c0608cde1c84978f1a8a
diff: simplify parsing of diff.colormovedws

The code to parse this configuration variable, whose value is a
comma-separated list of known tokens like "ignore-space-change" and
"ignore-all-space", uses string_list_split() to split the value into
pieces, and then places each piece of string in a strbuf to trim,
before comparing the result with the list of known tokens.

Thanks to the previous steps, now string_list_split() can trim the
resulting pieces before it places them in the string list.  Use it
to simplify the code.

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