]> git.ipfire.org Git - thirdparty/git.git/commit
parse-options API: add a usage_msg_optf()
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Tue, 28 Dec 2021 13:28:43 +0000 (14:28 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 30 Dec 2021 21:05:28 +0000 (13:05 -0800)
commitfa476be8f0963d4dd512eaf8ee23b3cd3986a500
tree07cc46c2a071ee0f0b4354920494227054af0666
parent68c69f90c8e98b305d9effd1d25f6261a30b8e50
parse-options API: add a usage_msg_optf()

Add a usage_msg_optf() as a shorthand for the sort of
usage_msg_opt(xstrfmt(...)) used in builtin/stash.c. I'll make more
use of this function in builtin/cat-file.c shortly.

The disconnect between the "..." and "fmt" is a bit unusual, but it
works just fine and this keeps it consistent with usage_msg_opt(),
i.e. a caller of it can be moved to usage_msg_optf() and not have to
have its arguments re-arranged.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/stash.c
parse-options.c
parse-options.h