Find git executable at run time
[git-darcs-import.git] / bugs / issue864_replace_in_moved.sh
blob6f50f9b3bb8c1f656d76df790e71b73a0bb6d236
1 #!/usr/bin/env bash
3 # Issue 864
5 # darcs mv file1 file2
6 # edit file2
7 # darcs replace fails if new token includes some existing edits
9 # Regression in darcs2 - it works in darcs1 1.0.9
11 set -ev
13 rm -rf temp
14 mkdir temp
15 cd temp
16 darcs init
17 cat <<EOF > file1
24 EOF
25 darcs add file1
26 darcs record -a -m "0" --author X
28 cat <<EOF > file1
29 aaaa
35 EOF
37 darcs replace aa aaaa file1 > out
38 cat out
39 grep 'Skipping file' out && exit 1
41 darcs mv file1 file2
43 cat <<EOF > file2
44 aaaa
45 beebee
50 EOF
52 darcs replace bb beebee file2 > out
53 cat out
54 grep 'Skipping file' out && exit 1
56 cd ..
57 rm -rf temp