Find git executable at run time
[git-darcs-import.git] / bugs / merging_newlines.sh
blob050110810da93a43e1406aaf566aa271774c45dc
1 #!/usr/bin/env bash
2 set -ev
4 # Note that this is fixed, the lines marked # BUG HERE
5 # should be moved back into merging_newlines.sh
7 # trick: requiring something to fail
8 not () { "$@" && exit 1 || :; }
10 rm -rf temp1 temp2
12 # set up the repository
13 mkdir temp1
14 cd temp1
15 darcs init
16 cd ..
18 cd temp1
19 echo "apply allow-conflicts" > _darcs/prefs/defaults
20 # note: to make this pass, change echo to echo -n
21 # is that right?
22 echo "from temp1" > one.txt
23 darcs add one.txt
24 darcs record -A bar -am "add one.txt"
25 echo >> one.txt
26 darcs wh -u
27 cd ..
29 darcs get temp1 temp2
30 cd temp2
31 # reality check
32 darcs show files | grep one.txt
33 echo "in tmp2" >> one.txt
34 darcs whatsnew -s | grep M
35 darcs record -A bar -am "add extra line"
36 darcs annotate -p . -u
37 darcs push -av > log
38 cat log
39 not grep -i conflicts log
40 # BUG HERE
41 # after a conflict, darcs resolve should report a conflict
42 darcs mark-conflicts > log 2>&1
43 cat log
44 not grep -i 'no conflicts' log
45 cd ..
47 rm -rf temp1 temp2