Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'ao/check-resolve-ref-unsafe-result'
author
Junio C Hamano
<gitster@pobox.com>
Mon, 6 Nov 2017 04:11:25 +0000
(13:11 +0900)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 6 Nov 2017 04:11:25 +0000
(13:11 +0900)
"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
builtin/commit.c
patch
|
blob
|
history
raw
(from parent 1:
a823e3a
)
diff --git
a/builtin/commit.c
b/builtin/commit.c
index af034553fcf22c463d2be04f4aafff7c9d6176dc..1a4ad725bc9e53fe56a14a779bf7e3e43bb9befa 100644
(file)
--- a/
builtin/commit.c
+++ b/
builtin/commit.c
@@
-1492,6
+1492,8
@@
static void print_summary(const char *prefix, const struct object_id *oid,
diff_setup_done(&rev.diffopt);
head = resolve_ref_unsafe("HEAD", 0, NULL, NULL);
+ if (!head)
+ die_errno(_("unable to resolve HEAD after creating commit"));
if (!strcmp(head, "HEAD"))
head = _("detached HEAD");
else