summaryrefslogtreecommitdiff
path: root/git-gui/lib
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-07-31 15:54:25 -0700
committerJunio C Hamano <gitster@pobox.com>2025-08-02 22:37:06 -0700
commit7a4acc360782c9eb0e53f51a5cf3147fa88f973e (patch)
treedf64b2f8aa32bf7ef5a76e675ad62f08e30fba71 /git-gui/lib
parent899ff9c1755a84925704c18250fb7ac1afb302c0 (diff)
clean: do not use strbuf_split*() [part 1]
builtin/clean.c:parse_choice() is fed a single line of input, which is space or comma separated list of tokens, and a list of menu items. It parses the tokens into number ranges (e.g. 1-3 that means the first three items) or string prefix (e.g. 's' to choose the menu item "(s)elect") that specify the elements in the menu item list, and tells the caller which ones are chosen. For parsing the input string, it uses strbuf_split() to split it into bunch of strbufs. Instead use string_list_split_in_place(), for a few reasons. * strbuf_split() is a bad API function to use, that yields an array of strbuf that is a bad data structure to use in general. * string_list_split_in_place() allows you to split with "comma or space"; the current code has to preprocess the input string to replace comma with space because strbuf_split() does not allow this. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-gui/lib')
0 files changed, 0 insertions, 0 deletions