author | Will Palmer <wmpalmer@gmail.com> | |
Wed, 14 Jul 2010 17:04:07 +0000 (18:04 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 14 Jul 2010 19:56:49 +0000 (12:56 -0700) | ||
commit | 21baa6e0c56d229866c02c4b42b8b53af648d853 | |
tree | 0f651d69beff4fdcdde40754d0deb8ef8caf0714 | tree | snapshot |
parent | f32e9852d40e26da0c042ca35bf07fa456c9832b | commit | diff |
merge-tree: fix where two branches share no changes
15b4f7a (merge-tree: use ll_merge() not xdl_merge(), 2010-01-16)
introduced a regression to merge-tree to cause it to segfault when 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.
Signed-off-by: Will Palmer <wmpalmer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15b4f7a (merge-tree: use ll_merge() not xdl_merge(), 2010-01-16)
introduced a regression to merge-tree to cause it to segfault when 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.
Signed-off-by: Will Palmer <wmpalmer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/merge-tree.c | diff | blob | history | |
t/t4300-merge-tree.sh | diff | blob | history |