diff options
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/describe.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin/describe.c b/builtin/describe.c index 24d740c8b1..d06673a378 100644 --- a/builtin/describe.c +++ b/builtin/describe.c @@ -451,10 +451,10 @@ int cmd_describe(int argc, const char **argv, const char *prefix) if (pattern) argv_array_pushf(&args, "--refs=refs/tags/%s", pattern); } - while (*argv) { - argv_array_push(&args, *argv); - argv++; - } + if (argc) + argv_array_pushv(&args, argv); + else + argv_array_push(&args, "HEAD"); return cmd_name_rev(args.argc, args.argv, prefix); } |