fix merge-tree where two branches share no changespatches/merge-tree-regression/v3
commitdbf1d7aad616f09cae729770853a7fb7c803ddfd
authorWill Palmer <wmpalmer@gmail.com>
Fri, 9 Jul 2010 23:57:22 +0000 (10 00:57 +0100)
committerWill Palmer <wmpalmer@gmail.com>
Wed, 14 Jul 2010 07:15:07 +0000 (14 08:15 +0100)
treed110604174e926182d82e3b0dfc77a16e1f6dee6
parent5db293eb838804670c387a148e3b17d6e1b1ed1f
fix merge-tree where two branches share no changes

Here we fix a regression which was introduced by
15b4f7a68d8c3c8ee28424415b203f61202d65d1 /
merge-tree: use ll_merge() not xdl_merge()

Which caused merge-tree to segfault in particular combinations of
merging files which existed in one branch, but not in the other or in
the merge-base. This was caused by referencing entry->path at a time
when entry was known to be possibly-NULL.

To correct the problem, we save the path of the entry we came in with,
as the path should be the same among all the stages no matter which
sides are involved in the merge.
builtin/merge-tree.c
t/t4300-merge-tree.sh