git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Karl Wiberg <kha@treskal.com>
To: Catalin Marinas <catalin.marinas@gmail.com>
Cc: git@vger.kernel.org
Subject: [StGit PATCH] t2800: Adapt to changes in git's conflict markers
Date: Wed, 15 Jul 2009 11:54:08 +0200	[thread overview]
Message-ID: <20090715095312.1705.13477.stgit@october.e.vtech> (raw)

From: Karl Wiberg <kha@treskal.com>

The conflict markers used by git were changed slightly by commit
606475f3 ("Remove filename from conflict markers"); specifically, the
conflict markers contain the filename only when the filename has
changed.

This patch adapts t2800 to allow either the new or the old format.

Signed-off-by: Karl Wiberg <kha@treskal.com>

---

 t/t2800-goto-subdir.sh |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)


diff --git a/t/t2800-goto-subdir.sh b/t/t2800-goto-subdir.sh
index 855972b..5960bd6 100755
--- a/t/t2800-goto-subdir.sh
+++ b/t/t2800-goto-subdir.sh
@@ -36,7 +36,8 @@ test_expect_success 'Prepare conflicting goto' '
     stg delete p2
 '
 
-cat > expected1.txt <<EOF
+# git gives this result before commit 606475f3 ...
+cat > expected1a.txt <<EOF
 foo1
 <<<<<<< current:foo/bar
 =======
@@ -44,6 +45,17 @@ foo2
 foo3
 >>>>>>> patched:foo/bar
 EOF
+
+# ... and this result after commit 606475f3.
+cat > expected1b.txt <<EOF
+foo1
+<<<<<<< current
+=======
+foo2
+foo3
+>>>>>>> patched
+EOF
+
 cat > expected2.txt <<EOF
 bar
 EOF
@@ -51,7 +63,8 @@ test_expect_success 'Goto in subdirectory (conflicting push)' '
     (cd foo && stg goto --keep p3) ;
     [ $? -eq 3 ] &&
     cat foo/bar > actual.txt &&
-    test_cmp expected1.txt actual.txt &&
+    ( test_cmp expected1a.txt actual.txt \
+      || test_cmp expected1b.txt actual.txt ) &&
     ls foo > actual.txt &&
     test_cmp expected2.txt actual.txt
 '

             reply	other threads:[~2009-07-15 10:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-15  9:54 Karl Wiberg [this message]
2009-07-18 19:51 ` [StGit PATCH] t2800: Adapt to changes in git's conflict markers Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090715095312.1705.13477.stgit@october.e.vtech \
    --to=kha@treskal.com \
    --cc=catalin.marinas@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).