chiark / gitweb /
Merge branch 'stable'
authorCatalin Marinas <catalin.marinas@gmail.com>
Tue, 27 May 2008 22:18:22 +0000 (23:18 +0100)
committerCatalin Marinas <catalin.marinas@gmail.com>
Tue, 27 May 2008 22:18:22 +0000 (23:18 +0100)
Conflicts:

t/t2700-refresh.sh

1  2 
stgit/git.py
t/t2700-refresh.sh

diff --cc stgit/git.py
Simple merge
index 3759d0e98e9a2c1a9c0bf56b908cfb66cc9d5089,ffac29597aaf9f691dbd81d5691adbf9e398af99..aad6d4500577b1dc11c4dc38b9921b3dceffa38d
@@@ -61,60 -59,12 +61,66 @@@ test_expect_success 'Refresh bottom pat
      stg status &&
      test -z "$(stg status)" &&
      stg patches foo1.txt > patches.txt &&
 -    diff -u expected.txt patches.txt
 +    test_cmp expected.txt patches.txt
 +'
 +
 +cat > expected.txt <<EOF
 +p0
 +p1
 +p4
 +EOF
 +cat > expected2.txt <<EOF
 +diff --git a/foo1.txt b/foo1.txt
 +index 728535d..6f34984 100644
 +--- a/foo1.txt
 ++++ b/foo1.txt
 +@@ -1,3 +1,4 @@
 + base
 + foo 1
 + bar 1
 ++baz 1
 +EOF
 +cat > expected3.txt <<EOF
 +diff --git a/foo1.txt b/foo1.txt
 +index 6f34984..a80eb63 100644
 +--- a/foo1.txt
 ++++ b/foo1.txt
 +@@ -2,3 +2,4 @@ base
 + foo 1
 + bar 1
 + baz 1
 ++blah 1
 +diff --git a/foo2.txt b/foo2.txt
 +index 415c9f5..43168f2 100644
 +--- a/foo2.txt
 ++++ b/foo2.txt
 +@@ -1,3 +1,4 @@
 + base
 + foo 2
 + bar 2
 ++baz 2
 +EOF
 +test_expect_success 'Refresh --index' '
 +    stg status &&
 +    stg new p4 -m "refresh_index" &&
 +    echo baz 1 >> foo1.txt &&
 +    git add foo1.txt &&
 +    echo blah 1 >> foo1.txt &&
 +    echo baz 2 >> foo2.txt &&
 +    stg refresh --index &&
 +    stg patches foo1.txt > patches.txt &&
 +    git diff HEAD^..HEAD > show.txt &&
 +    stg diff > diff.txt &&
 +    test_cmp expected.txt patches.txt &&
 +    test_cmp expected2.txt show.txt &&
 +    test_cmp expected3.txt diff.txt &&
 +    stg new p5 -m "cleanup again" &&
 +    stg refresh
  '
+ test_expect_success 'Refresh moved files' '
+     git mv foo1.txt foo1-new.txt &&
+     stg refresh
+ '
  test_done