git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 0/4] rebase -i: Add --refs option to rewrite heads within branch
@ 2009-12-22 22:20 Greg Price
  2009-12-22 22:22 ` [PATCH 1/4] pretty: Add %D for script-friendly decoration Greg Price
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Greg Price @ 2009-12-22 22:20 UTC (permalink / raw)
  To: git; +Cc: Johannes Schindelin, Junio C Hamano

This RFC series adds a "ref" command to rebase -i, and an option
--refs to generate "ref" commands in the original TODO file.  This
makes it easy to rebase a branch together with intermediate markers,
or a series of branches.

For example, in this situation:

      part1 part2 topic
        |     |     |
        v     v     v
  A--*--*--*--*--*--*
   \
    B <--master

we may want to rebase 'topic' onto the new master, rewriting the
intermediate branches 'part1', 'part2' to the corresponding new
commits.  This can be done with a sequence of "git rebase --onto"
commands, but it's tricky to get right.

With this series, the command
  $ git rebase -i --refs master topic
suffices to produce this result:

        part1 part2 topic
  A       |     |     |
   \      v     v     v
    B--*--*--*--*--*--*
    ^
    |
    master


These patches work for me.  Before I recommend the last two patches
for merge, they'll need the following additional work:
 - interoperate with rebase --abort
 - add documentation
 - probably add tests


The series begins with two patches that are independently useful, and
that I believe are ready for merge:
  pretty: Add %D for script-friendly decoration
  log --decorate=full: drop the "tag: " prefix
They make the functionality of 'git log --decorate' available in an
output format optimized for machine parsing.  I expect other people
will find this useful for other scripts.

Greg

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-12-23 18:12 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-22 22:20 [PATCH RFC 0/4] rebase -i: Add --refs option to rewrite heads within branch Greg Price
2009-12-22 22:22 ` [PATCH 1/4] pretty: Add %D for script-friendly decoration Greg Price
2009-12-22 22:22 ` [PATCH 2/4] log --decorate=full: drop the "tag: " prefix Greg Price
2009-12-22 22:22 ` [PATCH RFC 3/4] rebase -i: Add the "ref" command Greg Price
2009-12-22 22:23 ` [PATCH RFC 4/4] rebase -i: add --refs option to rewrite heads within branch Greg Price
2009-12-22 23:37   ` Junio C Hamano
2009-12-23  7:03     ` Greg Price
2009-12-23  8:53       ` Michael J Gruber
2009-12-23 17:34         ` Greg Price
2009-12-23 18:11         ` Junio C Hamano
2009-12-23 13:28       ` Johannes Schindelin

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).