All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robin Rosenberg <robin.rosenberg@dewire.com>
To: Bron Gondwana <brong@brong.net>
Cc: git@vger.kernel.org
Subject: Re: WANTED: patch splitting tool - waypoints
Date: Sun, 2 May 2010 23:10:33 +0200	[thread overview]
Message-ID: <201005022310.34169.robin.rosenberg@dewire.com> (raw)
In-Reply-To: <20100502115842.GA11607@brong.net>

söndagen den 2 maj 2010 13.58.42 skrev  Bron Gondwana:
> 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.  Something that allows you to split
> either a single patch or a series of patches that
> had bad "waypoints".
> 
> You can imagine the patch as a journey from A to B.
> Only, that's a long journey, and the path between
> them is a big ugly code dump.  The commits along
> the way include various adventures down rabbit holes
> that got backed out much later without necessarily
> tidying up the history along the way.
> 
> This tool allows you to easily generate one
> intermediate state.  Repeated application generates
> multiple intermediate states until you have a nice
> tidy patch series, every step of the way bisectable.
> 
> So the journey A => B becomes the journey A => W => 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.
> 
> 
> Does anybody know of a tool that can do this?  Does it
> sounds like something others would use?  I'm thinking
> that you could sort of get there with a combination of
> rebase squash, git add -p and a git stash holding the
> state of 'B', but it would need to be scripted enough
> that repeated application isn't a pain.  And a graphical/
> ncurses interface like the kernel's "make menuconfig" at
> the very least would make it much easier than paging
> through piles of diff fragments and hoping you never
> made a mistake.

What I do is close to what you describe. I use rebase -i and
edit commits that contain too much using git gui, i.e. I remove
stuff that do not belong in that commit and ammend the commit.
Then I commit that extra "junk" into a (new) commit and continue.

The next round with rebase -i I rearrange and squash things. Onviously
some junk gets deleted too, though the squashing takes care of most
of that work.

I have a vision for Eclipse working with the history view (would translate 
well to any GUI) but when is not in my calendar yet.

-- robin

  parent reply	other threads:[~2010-05-02 21:10 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
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 [this message]
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=201005022310.34169.robin.rosenberg@dewire.com \
    --to=robin.rosenberg@dewire.com \
    --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.