Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'js/bisect-helper-check-get-oid-return-value' into maint
author
Junio C Hamano
<gitster@pobox.com>
Thu, 25 Jul 2019 21:27:14 +0000
(14:27 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 25 Jul 2019 21:27:14 +0000
(14:27 -0700)
Code cleanup.
* js/bisect-helper-check-get-oid-return-value:
bisect--helper: verify HEAD could be parsed before continuing
builtin/bisect--helper.c
patch
|
blob
|
history
raw
(from parent 1:
24c161d
)
diff --git
a/builtin/bisect--helper.c
b/builtin/bisect--helper.c
index e7325fe37f6148fd1ccd6fc5842bbc8f5022c306..1fbe156e67a4c75694de7e606a21cf959dd19f51 100644
(file)
--- a/
builtin/bisect--helper.c
+++ b/
builtin/bisect--helper.c
@@
-570,7
+570,10
@@
static int bisect_start(struct bisect_terms *terms, int no_checkout,
write_file(git_path_bisect_start(), "%s\n", start_head.buf);
if (no_checkout) {
- get_oid(start_head.buf, &oid);
+ if (get_oid(start_head.buf, &oid) < 0) {
+ retval = error(_("invalid ref: '%s'"), start_head.buf);
+ goto finish;
+ }
if (update_ref(NULL, "BISECT_HEAD", &oid, NULL, 0,
UPDATE_REFS_MSG_ON_ERR)) {
retval = -1;