* [StGit PATCH] t2800: Adapt to changes in git's conflict markers
@ 2009-07-15 9:54 Karl Wiberg
2009-07-18 19:51 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Karl Wiberg @ 2009-07-15 9:54 UTC (permalink / raw
To: Catalin Marinas; +Cc: git
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
'
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [StGit PATCH] t2800: Adapt to changes in git's conflict markers
2009-07-15 9:54 [StGit PATCH] t2800: Adapt to changes in git's conflict markers Karl Wiberg
@ 2009-07-18 19:51 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2009-07-18 19:51 UTC (permalink / raw
To: Karl Wiberg; +Cc: Catalin Marinas, Martin Renold, git
Karl Wiberg <kha@treskal.com> writes:
> 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>
Thanks; Cc'ed Martin Renold <martinxyz@gmx.ch>.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-07-18 19:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-15 9:54 [StGit PATCH] t2800: Adapt to changes in git's conflict markers Karl Wiberg
2009-07-18 19:51 ` Junio C Hamano
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).