From: Jari Aalto <jari.aalto@cante.net>
To: git@vger.kernel.org
Subject: [PATCH] git-filter-branch.txt: Add picture to explain the graft-id
Date: Sun, 09 Mar 2008 11:01:14 +0200 [thread overview]
Message-ID: <7igcz2xx.fsf@blue.sea.net> (raw)
Present a picture to demonstrate the positions of graft-id and
commit-id in case of merging A with B.
Signed-off-by: Jari Aalto <jari.aalto@cante.net>
---
Documentation/git-filter-branch.txt | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
I'd like to thank Mikael Magnusson explaining this.
diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt
index 543a1cf..73939e2 100644
--- a/Documentation/git-filter-branch.txt
+++ b/Documentation/git-filter-branch.txt
@@ -186,7 +186,7 @@ Now, you will get the rewritten history saved in HEAD.
To set a commit (which typically is at the tip of another
history) to be the parent of the current initial commit, in
-order to paste the other history behind the current history:
+order to paste the other history behind the current history.
-------------------------------------------------------------------
git filter-branch --parent-filter 'sed "s/^\$/-p <graft-id>/"' HEAD
@@ -198,6 +198,12 @@ history with a single root (that is, no merge without common ancestors
happened). If this is not the case, use:
--------------------------------------------------------------------------
+
+ The plan: supposing we're merging A with B
+ commit sequence A: a-b-c graft-id = b
+ commit sequence B: c'-d'-e' commit-id = c'
+ Result : a-b-c'-d'-e'
+
git filter-branch --parent-filter \
'test $GIT_COMMIT = <commit-id> && echo "-p <graft-id>" || cat' HEAD
--------------------------------------------------------------------------
--
1.5.3.8
--
Welcome to FOSS revolution: we fix and modify until it shines
next reply other threads:[~2008-03-09 9:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-09 9:01 Jari Aalto [this message]
2008-03-12 2:51 ` [PATCH] git-filter-branch.txt: Add picture to explain the graft-id 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=7igcz2xx.fsf@blue.sea.net \
--to=jari.aalto@cante.net \
--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).