git-rev-parse: flush "default" head when encountering something unexpected
The unexpected thing is likely a pathname, we need the default for that too.
This commit is contained in:
parent
c591412cc0
commit
9d73fad4ca
@ -111,9 +111,12 @@ int main(int argc, char **argv)
|
|||||||
printf("^%s\n", sha1_to_hex(sha1));
|
printf("^%s\n", sha1_to_hex(sha1));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (def) {
|
||||||
|
printf("%s\n", def);
|
||||||
|
def = NULL;
|
||||||
|
}
|
||||||
if (revs_only)
|
if (revs_only)
|
||||||
continue;
|
continue;
|
||||||
def = NULL;
|
|
||||||
printf("%s\n", arg);
|
printf("%s\n", arg);
|
||||||
}
|
}
|
||||||
if (def)
|
if (def)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user