git/builtin
Taylor Blau cd57bc41bb builtin/multi-pack-index.c: display usage on unrecognized command
When given a sub-command that it doesn't understand, 'git
multi-pack-index' dies with the following message:

    $ git multi-pack-index bogus
    fatal: unrecognized subcommand: bogus

Instead of 'die()'-ing, we can display the usage text, which is much
more helpful:

    $ git.compile multi-pack-index bogus
    error: unrecognized subcommand: bogus
    usage: git multi-pack-index [<options>] write
       or: git multi-pack-index [<options>] verify
       or: git multi-pack-index [<options>] expire
       or: git multi-pack-index [<options>] repack [--batch-size=<size>]

        --object-dir <file>   object directory containing set of packfile and pack-index pairs
        --progress            force progress reporting

While we're at it, clean up some duplication between the "no sub-command"
and "unrecognized sub-command" conditionals.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-03-30 12:16:56 -07:00
..
2020-09-30 12:53:47 -07:00
2021-01-06 15:10:49 -08:00
2020-07-30 19:18:06 -07:00
2021-01-25 14:19:19 -08:00
2021-02-05 16:40:45 -08:00
2020-08-11 18:04:11 -07:00
2021-02-17 17:21:40 -08:00
2021-01-06 15:10:49 -08:00
2020-10-16 12:30:45 -07:00
2021-02-03 14:09:37 -08:00
2021-02-03 14:09:37 -08:00
2021-02-12 14:21:04 -08:00
2021-01-06 15:10:49 -08:00
2021-02-17 17:21:40 -08:00
2020-03-24 15:04:43 -07:00
2021-01-05 14:58:29 -08:00
2021-02-17 17:21:41 -08:00
2021-02-22 16:12:43 -08:00
2021-02-05 16:40:44 -08:00
2021-01-06 14:22:24 -08:00
2019-05-13 14:22:54 +09:00
2020-04-28 10:47:10 -07:00
2020-03-24 15:04:44 -07:00
2020-05-13 12:19:18 -07:00
2020-10-27 15:09:49 -07:00
2020-07-30 19:18:06 -07:00
2020-09-02 14:39:25 -07:00
2021-01-25 14:19:19 -08:00
2021-02-11 13:34:58 -08:00
2020-07-30 19:18:06 -07:00
2020-08-11 18:04:11 -07:00
2019-06-19 08:19:21 -07:00
2021-01-30 09:57:40 -08:00