Code

Merge branch 'master' of git://repo.or.cz/git-gui
[git.git] / t / t4200-rerere.sh
index 8b611bbea210551d86016b53718ba1af313f1353..a46d7f74bedb105297a9015af9f9098c84365100 100755 (executable)
@@ -35,7 +35,8 @@ git commit -q -a -m first
 
 git checkout -b second master
 git show first:a1 |
-sed -e 's/To die, t/To die! T/' -e 's/life;$/life./' > a1
+sed -e 's/To die, t/To die! T/' > a1
+echo "* END *" >>a1
 git commit -q -a -m second
 
 # activate rerere
@@ -43,17 +44,17 @@ mkdir .git/rr-cache
 
 test_expect_failure 'conflicting merge' 'git pull . first'
 
-sha1=$(sed -e 's/\t.*//' .git/rr-cache/MERGE_RR)
+sha1=$(sed -e 's/      .*//' .git/rr-cache/MERGE_RR)
 rr=.git/rr-cache/$sha1
 test_expect_success 'recorded preimage' "grep ======= $rr/preimage"
 
 test_expect_success 'no postimage or thisimage yet' \
        "test ! -f $rr/postimage -a ! -f $rr/thisimage"
 
-test_expect_success 'preimage have right number of lines' '
+test_expect_success 'preimage has right number of lines' '
 
        cnt=$(sed -ne "/^<<<<<<</,/^>>>>>>>/p" $rr/preimage | wc -l) &&
-       test "$cnt" = 10
+       test $cnt = 9
 
 '
 
@@ -75,10 +76,10 @@ cat > expect << EOF
  For in that sleep of death what dreams may come
  When we have shuffled off this mortal coil,
  Must give us pause: there's the respect
+ That makes calamity of so long life;
 -<<<<<<<
--That makes calamity of so long life.
 -=======
- That makes calamity of so long life;
+-* END *
 ->>>>>>>
 EOF
 git rerere diff > out
@@ -147,5 +148,3 @@ test_expect_success 'old records rest in peace' \
        "test ! -f $rr/preimage && test ! -f $rr2/preimage"
 
 test_done
-
-