From: Pavel Roskin <proski@gnu.org>
To: Petr Baudis <pasky@suse.cz>
Cc: git@vger.kernel.org
Subject: [PATCH] Clean up after failed "git merge" in the tutorial script
Date: Tue, 21 Mar 2006 23:07:33 -0500 [thread overview]
Message-ID: <20060322040733.29189.75397.stgit@dv.roinet.com> (raw)
From: Pavel Roskin <proski@gnu.org>
Failed "git merge" in the tutorial script leaves some damage to the
working directory. Use cg-reset to clean up the mess.
This eliminates conflicts in the final merge. Adjust code accordingly,
remove unused fixup scripts.
Adjust 0017-alice-bob-fixup.ed to deal with merge conflict from cg-merge
rather than "git merge".
Signed-off-by: Pavel Roskin <proski@gnu.org>
---
.../tutorial-script/0017-alice-bob-fixup.ed | 4 ++--
.../tutorial-script/0021-bob-alice-fixup1.ed | 4 ----
.../tutorial-script/0022-bob-alice-fixup2.ed | 5 -----
.../tutorial-script/0023-bob-alice-fixup3.ed | 4 ----
Documentation/tutorial-script/script.sh | 18 ++++--------------
5 files changed, 6 insertions(+), 29 deletions(-)
diff --git a/Documentation/tutorial-script/0017-alice-bob-fixup.ed b/Documentation/tutorial-script/0017-alice-bob-fixup.ed
index ad04eb7..1b06f4e 100644
--- a/Documentation/tutorial-script/0017-alice-bob-fixup.ed
+++ b/Documentation/tutorial-script/0017-alice-bob-fixup.ed
@@ -1,5 +1,5 @@
-/^<<<<<<< Makefile/d
+/^<<<<<<< master/d
/^=======/,/^=======/+1d
-/^>>>>>>> \.merge_file_/d
+/^>>>>>>> bob/d
w
q
diff --git a/Documentation/tutorial-script/0021-bob-alice-fixup1.ed b/Documentation/tutorial-script/0021-bob-alice-fixup1.ed
deleted file mode 100644
index df703d5..0000000
--- a/Documentation/tutorial-script/0021-bob-alice-fixup1.ed
+++ /dev/null
@@ -1,4 +0,0 @@
-/^<<<<<<< master/,/^=======/d
-/^>>>>>>> origin/d
-w
-q
diff --git a/Documentation/tutorial-script/0022-bob-alice-fixup2.ed b/Documentation/tutorial-script/0022-bob-alice-fixup2.ed
deleted file mode 100644
index d8c5746..0000000
--- a/Documentation/tutorial-script/0022-bob-alice-fixup2.ed
+++ /dev/null
@@ -1,5 +0,0 @@
-/^#include "stack\.h"/+1d
-/^#include "lexer\.h"/+1,/^#include "stack\.h"/d
-/^<<<<<<< master/-1,/^>>>>>>> origin/d
-w
-q
diff --git a/Documentation/tutorial-script/0023-bob-alice-fixup3.ed b/Documentation/tutorial-script/0023-bob-alice-fixup3.ed
deleted file mode 100644
index fea2fc7..0000000
--- a/Documentation/tutorial-script/0023-bob-alice-fixup3.ed
+++ /dev/null
@@ -1,4 +0,0 @@
-/^#endif/s;^#endif.*;#endif /* STACK_H */;
-w
-q
-
diff --git a/Documentation/tutorial-script/script.sh b/Documentation/tutorial-script/script.sh
index 0401954..f07dfc1 100755
--- a/Documentation/tutorial-script/script.sh
+++ b/Documentation/tutorial-script/script.sh
@@ -222,12 +222,13 @@ git merge "Integrate changes from Bob an
# Automatic 3-way merge fails! Have to do it step by step
+cg-reset
cg-merge bob && should_fail
# Merge fails:
#: ...
-#: <<<<<<< Makefile
+#: <<<<<<< master
#: $(CC) $(CFLAGS) $^ -lm -o $@
#: =======
#: $(CC) $(CFLAGS) $^ -o $@
@@ -235,7 +236,7 @@ cg-merge bob && should_fail
#: rpn.o: stack.h
#: stack.o: stack.h
#: lexer.o:
-#: >>>>>>> .merge_file_iNhznP
+#: >>>>>>> bob
ed Makefile < $TOP/0017-alice-bob-fixup.ed
@@ -313,18 +314,7 @@ cg-fetch
git verify-tag rpn-0.4 && should_fail
# Everything's OK, integrate the changes
-echo "Merge with 0.4" | cg-merge && should_fail
-
-# Merge conflicts in Makefile, rpn.c
-ed Makefile < $TOP/0021-bob-alice-fixup1.ed
-ed rpn.c < $TOP/0022-bob-alice-fixup2.ed
-# Resolve conflicting addition of two versions of stack.h
-rm stack.h~master
-mv stack.h~origin stack.h
-cg-add stack.h
-
-# Now commit the whole
-cg-commit -m "Merge with 0.4"
+cg-merge
# Great, we are done.
trap - exit
reply other threads:[~2006-03-22 4:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20060322040733.29189.75397.stgit@dv.roinet.com \
--to=proski@gnu.org \
--cc=git@vger.kernel.org \
--cc=pasky@suse.cz \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.