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' into maint
author
Junio C Hamano
<gitster@pobox.com>
Wed, 15 Nov 2017 03:04:53 +0000
(12:04 +0900)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 15 Nov 2017 03:04:53 +0000
(12:04 +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
1
2
builtin/commit.c
patch
|
diff1
|
diff2
|
blob
|
history
raw
|
combined
(merge:
9fbcb51
c26de08
)
diff --cc
builtin/commit.c
index d75b3805ea7fe3475564f337bf660d8155909445,b528290902da1153849e6cf4560488c553a1e38a..b2a6c7f100d82c4160c4bea6b4663af5459194cc
---
1
/
builtin/commit.c
---
2
/
builtin/commit.c
+++ b/
builtin/commit.c
@@@
-1491,7
-1482,9
+1491,9
@@@
static void print_summary(const char *p
rev.diffopt.break_opt = 0;
diff_setup_done(&rev.diffopt);
- head = resolve_ref_unsafe("HEAD", 0, junk_oid.hash, NULL);
+ 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