Merge branch 'ao/check-resolve-ref-unsafe-result' into maint
"git commit", after making a commit, did not check for errors when asking on what branch it made the commit, which has been correted. * ao/check-resolve-ref-unsafe-result: commit: check result of resolve_ref_unsafe
This commit is contained in:
commit
a9749b0b78
@ -1492,6 +1492,8 @@ static void print_summary(const char *prefix, const struct object_id *oid,
|
|||||||
diff_setup_done(&rev.diffopt);
|
diff_setup_done(&rev.diffopt);
|
||||||
|
|
||||||
head = resolve_ref_unsafe("HEAD", 0, NULL, NULL);
|
head = resolve_ref_unsafe("HEAD", 0, NULL, NULL);
|
||||||
|
if (!head)
|
||||||
|
die_errno(_("unable to resolve HEAD after creating commit"));
|
||||||
if (!strcmp(head, "HEAD"))
|
if (!strcmp(head, "HEAD"))
|
||||||
head = _("detached HEAD");
|
head = _("detached HEAD");
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user