1
0
mirror of https://github.com/git/git.git synced 2024-10-02 03:01:27 +02:00
git/t/t3509-cherry-pick-merge-df.sh
Elijah Newren 5a2580d62f merge_recursive: Fix renames across paths below D/F conflicts
The rename logic in process_renames() handles renames and merging of file
contents and then marks files as processed.  However, there may be higher
stage entries left in the index for other reasons (e.g., due to D/F
conflicts).  By checking for such cases and marking the entry as not
processed, it allows process_entry() later to look at it and handle those
higher stages.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-09 16:13:00 -07:00

36 lines
602 B
Bash
Executable File

#!/bin/sh
test_description='Test cherry-pick with directory/file conflicts'
. ./test-lib.sh
test_expect_success 'Setup rename across paths each below D/F conflicts' '
mkdir a &&
>a/f &&
git add a &&
git commit -m a &&
mkdir b &&
ln -s ../a b/a &&
git add b &&
git commit -m b &&
git checkout -b branch &&
rm b/a &&
mv a b/a &&
ln -s b/a a &&
git add . &&
git commit -m swap &&
>f1 &&
git add f1 &&
git commit -m f1
'
test_expect_success 'Cherry-pick succeeds with rename across D/F conflicts' '
git reset --hard &&
git checkout master^0 &&
git cherry-pick branch
'
test_done