We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f9b620 commit 1d49f0dCopy full SHA for 1d49f0d
t/t4130-apply-criss-cross-rename.sh
@@ -0,0 +1,38 @@
1
+#!/bin/sh
2
+
3
+test_description='git apply handling criss-cross rename patch.'
4
+. ./test-lib.sh
5
6
+create_file() {
7
+ cnt=0
8
+ while test $cnt -le 100
9
+ do
10
+ cnt=$(($cnt + 1))
11
+ echo "$2" >> "$1"
12
+ done
13
+}
14
15
+test_expect_success 'setup' '
16
+ create_file file1 "File1 contents" &&
17
+ create_file file2 "File2 contents" &&
18
+ git add file1 file2 &&
19
+ git commit -m 1
20
+'
21
22
+test_expect_success 'criss-cross rename' '
23
+ mv file1 tmp &&
24
+ mv file2 file1 &&
25
+ mv tmp file2
26
27
28
+test_expect_success 'diff -M -B' '
29
+ git diff -M -B > diff &&
30
+ git reset --hard
31
32
33
34
+test_expect_failure 'apply' '
35
+ git apply diff
36
37
38
+test_done
0 commit comments