From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: Bron Gondwana <brong@brong.net>
Cc: git@vger.kernel.org
Subject: Re: WANTED: patch splitting tool - waypoints
Date: Sun, 02 May 2010 17:17:33 +0200 [thread overview]
Message-ID: <vpqwrvmuycy.fsf@bauges.imag.fr> (raw)
In-Reply-To: <20100502115842.GA11607@brong.net> (Bron Gondwana's message of "Sun\, 2 May 2010 21\:58\:42 +1000")
Bron Gondwana <brong@brong.net> writes:
> Hi,
>
> My toolkit is missing a tool. I've never seen it
> or anything like it, but I can describe it - and
> hopefully someone else knows if it exists.
>
> It's basically a combination of git rebase -i and
> git add -p.
I guess you named it: git add -p.
> So the journey A => B becomes the journey A => W => B.
Just checkout B, then
git reset HEAD^
This will reset your _index_ to the state of A (which happens to be
HEAD^, the ancestor of HEAD). Now, you can
while !happy; do
git add -p # select patch hunks
git commit # Create an intermediate commit
done
git commit -a # Re-create commit B
> The tool allows you to quickly choose which hunks to
> add to patch(A=>W) and which to add to patch(W=>B),
> but also lets you make edits to the intermediate state
> easily so that W will compile even if some bits of the
> patch were intermingled.
Then, "git stash --keep-index" between "git add -p" and "git commit",
and "git stash pop" afterwards.
> And a graphical/
> ncurses interface
then, replace "git add -p; git commit" with "git gui", which will let
you select hunks and commit from a GUI.
Note that "rebase -i" is not strictly needed here, but you can apply
the above flow within a "edit" command of "rebase -i", so it's a nice
complement.
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
next prev parent reply other threads:[~2010-05-02 15:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-02 11:58 WANTED: patch splitting tool - waypoints Bron Gondwana
2010-05-02 15:17 ` Matthieu Moy [this message]
2010-05-02 15:20 ` Matthieu Moy
2010-05-02 23:40 ` Bron Gondwana
2010-05-03 6:31 ` Matthieu Moy
2010-05-02 21:10 ` Robin Rosenberg
2010-05-03 6:43 ` Yann Dirson
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=vpqwrvmuycy.fsf@bauges.imag.fr \
--to=matthieu.moy@grenoble-inp.fr \
--cc=brong@brong.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 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.