projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
git-rev-parse: flush "default" head when encountering something unexpected
[git.git]
/
rev-parse.c
diff --git
a/rev-parse.c
b/rev-parse.c
index
1f4f324
..
7419d18
100644
(file)
--- 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)