diff options
Diffstat (limited to 'rev-parse.c')
-rw-r--r-- | rev-parse.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/rev-parse.c b/rev-parse.c index 1f4f3240de..7419d18b3b 100644 --- a/rev-parse.c +++ b/rev-parse.c @@ -111,9 +111,12 @@ int main(int argc, char **argv) printf("^%s\n", sha1_to_hex(sha1)); continue; } + if (def) { + printf("%s\n", def); + def = NULL; + } if (revs_only) continue; - def = NULL; printf("%s\n", arg); } if (def) |