Re: [PATCH 0/10] re-based and expanded tree-walker cleanup patches
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- May 30, 2006, 04:17 UTC
- Message-ID
- <Pine.LNX.4.64.0605292112530.5623@g5.osdl.org>
- In-Reply-To
- <7vmzd05i25.fsf@assigned-by-dhcp.cox.net>
On Mon, 29 May 2006, Junio C Hamano wrote:
Show 11 quoted lines
> > > Pretty powerful, although at one point I was wondering about having a "git > > rebase" that could switch commits around or drop unwanted ones (ie let the > > user edit the cherry-picking list before the actual rebase). > > I think true power users would just do the last two lines of > git-rebase.sh by hand in two steps. By stashing away the > format-patch output, and using git-am interactively, you can > easily drop unwanted ones, and then re-run git-am on the same > format-patch output to apply the ones you dropped on the first > run practically amounts to reordering the patches ;-).
Having to move around whole patches in the editor is not what you want to do. I was thinking more along the lines of
(a) git-rev-list --pretty=oneline "$upstream"..ORIG_HEAD > rev-list
(b) edit the rev-list, moving the single lines around, deleting them, etc
(c) cat rev-list |
git-format-patch -k --stdout --stdin --full_index |
git-ambecause the "--pretty=oneline" format is actually very nice as a way to re-order things and select single commits to be deleted or whatever..
Linus