diff options
Diffstat (limited to 'rev-parse.c')
-rw-r--r-- | rev-parse.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/rev-parse.c b/rev-parse.c index 3c99a79eb3..6bf205a8f5 100644 --- a/rev-parse.c +++ b/rev-parse.c @@ -53,6 +53,10 @@ static int is_rev_argument(const char *arg) }; const char **p = rev_args; + /* accept -<digit>, like traditional "head" */ + if ((*arg == '-') && isdigit(arg[1])) + return 1; + for (;;) { const char *str = *p++; int len; |