am -3: support 3way merge on unborn branch
commit2c970c9ec3af9e162951a1b22d42c1a4dd9a8fed
authorPaul Tan <pyokagan@gmail.com>
Sat, 6 Jun 2015 11:46:08 +0000 (6 19:46 +0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 8 Jun 2015 20:06:09 +0000 (8 13:06 -0700)
tree7031a4f7b6c26e3207a5ee2308096f1e55818f86
parent88d5072466de2e0ba256a283eaaa6a79e31735a5
am -3: support 3way merge on unborn branch

While on an unborn branch, git am -3 will fail to do a threeway merge as
it references HEAD as "our tree", but HEAD does not point to a valid
tree.

Fix this by using an empty tree as "our tree" when we are on an unborn
branch.

Signed-off-by: Paul Tan <pyokagan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-am.sh
t/t4151-am-abort.sh