From: Junio C Hamano Date: Mon, 27 Jun 2016 16:56:53 +0000 (-0700) Subject: Merge branch 'mg/cherry-pick-multi-on-unborn' X-Git-Tag: v2.10.0-rc0~173 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=db8128fee088d989dadb0b67da9e8ec5d67b6d97;p=thirdparty%2Fgit.git Merge branch 'mg/cherry-pick-multi-on-unborn' "git cherry-pick A" worked on an unborn branch, but "git cherry-pick A..B" didn't. * mg/cherry-pick-multi-on-unborn: cherry-pick: allow to pick to unborn branches --- db8128fee088d989dadb0b67da9e8ec5d67b6d97 diff --cc sequencer.c index 4687ad4b80,c051d134c2..c6362d63f3 --- a/sequencer.c +++ b/sequencer.c @@@ -885,9 -916,13 +885,13 @@@ static int sequencer_rollback(struct re fclose(f); if (get_sha1_hex(buf.buf, sha1) || buf.buf[40] != '\0') { error(_("stored pre-cherry-pick HEAD file '%s' is corrupt"), - filename); + git_path_head_file()); goto fail; } + if (is_null_sha1(sha1)) { + error(_("cannot abort from a branch yet to be born")); + goto fail; + } if (reset_for_rollback(sha1)) goto fail; remove_sequencer_state();