]> git.ipfire.org Git - thirdparty/git.git/commit
mktag: convert to parse-options
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Tue, 5 Jan 2021 19:42:50 +0000 (20:42 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 5 Jan 2021 22:58:29 +0000 (14:58 -0800)
commit3f390a366cc4a083b11452b899a04416aea00bdd
tree9aecc8b8b64c9385d6f6247c448f1978e07739fa
parent9a1a3a4d4c5648b94dbe8f34b83271d96dbaa6ec
mktag: convert to parse-options

Convert the "mktag" command to use parse-options.h instead of its own
ad-hoc argc handling. This doesn't matter much in practice since it
doesn't support any options, but removes another special-case in our
codebase, and makes it easier to add options to it in the future.

It does marginally improve the situation for programs that want to
execute git commands in a consistent manner and e.g. always use
--end-of-options. E.g. "gitaly" does that, and has a blacklist of
built-ins that don't support --end-of-options. This is one less
special case for it and other similar programs to support.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/mktag.c
t/t3800-mktag.sh