Merge branch 'js/bisect-helper-check-get-oid-return-value' into maint
Code cleanup. * js/bisect-helper-check-get-oid-return-value: bisect--helper: verify HEAD could be parsed before continuingmaint
commit
2c30e34e1a
|
@ -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);
|
write_file(git_path_bisect_start(), "%s\n", start_head.buf);
|
||||||
|
|
||||||
if (no_checkout) {
|
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,
|
if (update_ref(NULL, "BISECT_HEAD", &oid, NULL, 0,
|
||||||
UPDATE_REFS_MSG_ON_ERR)) {
|
UPDATE_REFS_MSG_ON_ERR)) {
|
||||||
retval = -1;
|
retval = -1;
|
||||||
|
|
Loading…
Reference in New Issue