summaryrefslogtreecommitdiff
path: root/t/t9350-fast-export.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-10-23 05:14:51 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-10-23 05:14:51 (GMT)
commit120ce97f9dd098b1c469f8d1812d4885e020a6e9 (patch)
tree788c85f05d0357bc96a7950cdf73c8e4d87a8031 /t/t9350-fast-export.sh
parent5253ad109af7691d0b0fb3c9670aaaf775412c72 (diff)
parentb3e8ca89cfe34712a093c37fdbac7df7eaae91e7 (diff)
downloadgit-120ce97f9dd098b1c469f8d1812d4885e020a6e9.zip
git-120ce97f9dd098b1c469f8d1812d4885e020a6e9.tar.gz
git-120ce97f9dd098b1c469f8d1812d4885e020a6e9.tar.bz2
Merge branch 'jt/fast-export-copy-modify-fix' into maint
"git fast-export" with -M/-C option issued "copy" instruction on a path that is simultaneously modified, which was incorrect. * jt/fast-export-copy-modify-fix: fast-export: do not copy from modified file
Diffstat (limited to 't/t9350-fast-export.sh')
-rwxr-xr-xt/t9350-fast-export.sh20
1 files changed, 19 insertions, 1 deletions
diff --git a/t/t9350-fast-export.sh b/t/t9350-fast-export.sh
index 8dcb05c..866ddf6 100755
--- a/t/t9350-fast-export.sh
+++ b/t/t9350-fast-export.sh
@@ -234,7 +234,7 @@ test_expect_success 'fast-export -C -C | fast-import' '
mkdir new &&
git --git-dir=new/.git init &&
git fast-export -C -C --signed-tags=strip --all > output &&
- grep "^C file6 file7\$" output &&
+ grep "^C file2 file4\$" output &&
cat output |
(cd new &&
git fast-import &&
@@ -522,4 +522,22 @@ test_expect_success 'delete refspec' '
test_cmp expected actual
'
+test_expect_success 'when using -C, do not declare copy when source of copy is also modified' '
+ test_create_repo src &&
+ echo a_line >src/file.txt &&
+ git -C src add file.txt &&
+ git -C src commit -m 1st_commit &&
+
+ cp src/file.txt src/file2.txt &&
+ echo another_line >>src/file.txt &&
+ git -C src add file.txt file2.txt &&
+ git -C src commit -m 2nd_commit &&
+
+ test_create_repo dst &&
+ git -C src fast-export --all -C | git -C dst fast-import &&
+ git -C src show >expected &&
+ git -C dst show >actual &&
+ test_cmp expected actual
+'
+
test_done