From: Junio C Hamano Date: Wed, 6 Jul 2016 20:06:42 +0000 (-0700) Subject: Merge branch 'mg/cherry-pick-multi-on-unborn' into maint X-Git-Tag: v2.9.1~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=25227f0beacf00d80420e313ffed48032352037f;p=thirdparty%2Fgit.git Merge branch 'mg/cherry-pick-multi-on-unborn' into maint "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 --- 25227f0beacf00d80420e313ffed48032352037f 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();