git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: WANTED: patch splitting tool - waypoints

From
YDYann Dirson <yann.dirson@bertin.fr>
Date
May 3, 2010, 06:43 UTC
Message-ID
<loom.20100503T082814-180@post.gmane.org>
In-Reply-To
<20100502115842.GA11607@brong.net>
Bron Gondwana <brong <at> brong.net> writes:
Show 8 quoted lines
> 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".

Right, this is a use-case I also commonly have, and nowadays I mostly use the rebase -i approach already described, combined with the use of git-gui for easy selection.

One additional trick I sometimes use, when I have reordered/squashed/split a couple of commits, is things like "git checkout @{1}" to catch any missing changes I could have lost while working.

Some time ago I was using stgit extensively, and had developped a couple of scripts to support that workflow. You will find them in the contrib/ directory of the stgit repo, and in the stgit-contrib debian package. Note that I did not use them much lately, and they may need some tweeking to work with recent git/stgit.

The still-relevant scripts are:
  * stg-fold-files-from: pick specific hunks from another patch up the stack
  * stg-dispatch: dispatch specific hunks into another patch down the stack
Previous: Robin Rosenberg
Message 7 of 7 in “WANTED: patch splitting tool - waypoints”
  1. Bron GondwanaMay 2, 2010
  2. Matthieu MoyMay 2, 2010
  3. Matthieu MoyMay 2, 2010
  4. Bron GondwanaMay 2, 2010
  5. Matthieu MoyMay 3, 2010
  6. Robin RosenbergMay 2, 2010
  7. Yann DirsonMay 3, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.