diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2021-08-23 14:30:21 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-08-30 17:06:18 -0700 |
commit | 367c5f36a6a0fa7f8f706b10f9bb2f0e28baaa1a (patch) | |
tree | 7e7947182893d7b5256829b25b890f835cc11535 /builtin/commit-graph.c | |
parent | commit-graph: show usage on "commit-graph [write|verify] garbage" (diff) | |
download | tgif-367c5f36a6a0fa7f8f706b10f9bb2f0e28baaa1a.tar.xz |
commit-graph: show "unexpected subcommand" error
Bring the "commit-graph" command in line with the error output and
general pattern in cmd_multi_pack_index().
Let's test for that output, and also cover the same potential bug as
was fixed in the multi-pack-index command in
88617d11f9d (multi-pack-index: fix potential segfault without
sub-command, 2021-07-19).
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Reviewed-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit-graph.c')
-rw-r--r-- | builtin/commit-graph.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/commit-graph.c b/builtin/commit-graph.c index 0457903f18..21fc6e934b 100644 --- a/builtin/commit-graph.c +++ b/builtin/commit-graph.c @@ -345,6 +345,7 @@ int cmd_commit_graph(int argc, const char **argv, const char *prefix) else if (argc && !strcmp(argv[0], "write")) return graph_write(argc, argv); + error(_("unrecognized subcommand: %s"), argv[0]); usage: usage_with_options(builtin_commit_graph_usage, builtin_commit_graph_options); |