]> git.ipfire.org Git - thirdparty/git.git/commit
cat-file: move "usage" variable to cmd_cat_file()
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Tue, 28 Dec 2021 13:28:45 +0000 (14:28 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 30 Dec 2021 21:05:29 +0000 (13:05 -0800)
commit5a40417876c8ec97e1f367a1638a558ec010e3d8
tree5c9090da3b2860a6dab057675b759bebdcc8c230
parent97fe7250753bae050b5d01c74ac0f38abb052845
cat-file: move "usage" variable to cmd_cat_file()

There's no benefit to defining this at a distance, and it makes the
code harder to read as you've got to scroll up to see the usage that
corresponds to the options.

In subsequent commits I'll make use of usage_msg_opt(), which will be
quite noisy if I have to use the long "cat_file_usage" variable,
there's no other command being defined in this file, so let's rename
it to just "usage".

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