builtin/commit-graph.c: remove subcommand-less usage string
diff mbox series

Message ID 20191025164909.354-1-szeder.dev@gmail.com
State New
Headers show
Series
  • builtin/commit-graph.c: remove subcommand-less usage string
Related show

Commit Message

SZEDER Gábor Oct. 25, 2019, 4:49 p.m. UTC
The first line in 'git commit-graph's usage string indicates that this
command can be invoked without specifying a subcommand.  However, this
is not the case:

  $ git commit-graph
  usage: git commit-graph [--object-dir <objdir>]
     or: git commit-graph read [--object-dir <objdir>]
  [...]
  $ echo $?
  129

Remove this line from the usage string.

The synopsis in the manpage doesn't contain this line.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
---
 builtin/commit-graph.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Derrick Stolee Oct. 25, 2019, 5:35 p.m. UTC | #1
On 10/25/2019 12:49 PM, SZEDER Gábor wrote:
> The first line in 'git commit-graph's usage string indicates that this
> command can be invoked without specifying a subcommand.  However, this
> is not the case:
> 
>   $ git commit-graph
>   usage: git commit-graph [--object-dir <objdir>]
>      or: git commit-graph read [--object-dir <objdir>]
>   [...]
>   $ echo $?
>   129
> 
> Remove this line from the usage string.
> 
> The synopsis in the manpage doesn't contain this line.
> 
> Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
> ---
>  builtin/commit-graph.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/builtin/commit-graph.c b/builtin/commit-graph.c
> index c6219ebe11..4d9b9c862f 100644
> --- a/builtin/commit-graph.c
> +++ b/builtin/commit-graph.c
> @@ -8,7 +8,6 @@
>  #include "object-store.h"
>  
>  static char const * const builtin_commit_graph_usage[] = {
> -	N_("git commit-graph [--object-dir <objdir>]"),
>  	N_("git commit-graph read [--object-dir <objdir>]"),
>  	N_("git commit-graph verify [--object-dir <objdir>] [--shallow] [--[no-]progress]"),
>  	N_("git commit-graph write [--object-dir <objdir>] [--append|--split] [--reachable|--stdin-packs|--stdin-commits] [--[no-]progress] <split options>"),

Good catch! Thanks for cleaning this up.

-Stolee

Patch
diff mbox series

diff --git a/builtin/commit-graph.c b/builtin/commit-graph.c
index c6219ebe11..4d9b9c862f 100644
--- a/builtin/commit-graph.c
+++ b/builtin/commit-graph.c
@@ -8,7 +8,6 @@ 
 #include "object-store.h"
 
 static char const * const builtin_commit_graph_usage[] = {
-	N_("git commit-graph [--object-dir <objdir>]"),
 	N_("git commit-graph read [--object-dir <objdir>]"),
 	N_("git commit-graph verify [--object-dir <objdir>] [--shallow] [--[no-]progress]"),
 	N_("git commit-graph write [--object-dir <objdir>] [--append|--split] [--reachable|--stdin-packs|--stdin-commits] [--[no-]progress] <split options>"),