]> git.ipfire.org Git - thirdparty/git.git/commit - wt-status.h
status: unify parsing of --untracked= and status.showUntrackedFiles
authorJunio C Hamano <gitster@pobox.com>
Wed, 13 Mar 2024 17:32:13 +0000 (10:32 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 13 Mar 2024 17:43:32 +0000 (10:43 -0700)
commit63acdc4827869a6cedd46aca62e16819498c53fb
tree08769acb5146c3fcc47dff14b6c7cedac6e2f264
parent945115026aa63df4ab849ab14a04da31623abece
status: unify parsing of --untracked= and status.showUntrackedFiles

There are two code paths that take a string and parse it to enum
untracked_status_type.  Introduce a helper function and use it.

As these two places handle an error differently, add an additional
invalid value to the enum, and have the caller of the helper handle
the error condition, instead of dying or emitting error message from
the helper.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/commit.c
wt-status.h