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

Re: [PATCH RFC 4/4] rebase -i: add --refs option to rewrite heads within branch

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 23, 2009, 18:11 UTC
Message-ID
<7vpr65r24y.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4B31DA96.1050608@drmicha.warpmail.net>
Michael J Gruber <git@drmicha.warpmail.net> writes:
Show 23 quoted lines
> Greg Price venit, vidit, dixit 23.12.2009 08:03:
> ...
>> Huh, that's an interesting idea.  I hadn't thought of that.  This
>> feature could be nice.  But I am not sure what it would look like.
>> How might the user indicate that they want both "side" and "topic" to
>> be rebased?  I suppose we could extend the familiar command line
>>    git rebase <upstream> [<branch>]
>> to the form
>>    git rebase <upstream> [...<branches>...]
>> so that your example would be
>>    $ git rebase -i --rewrite-heads master topic side
>> If we choose this approach, it might even be independent of
>> --rewrite-refs, though the implementation would presumably rely on the
>> "ref" command.  Was this interface what you were thinking, or do you
>> have another idea?
>
> If I may jump in: I imagine this to be the more common use case, i.e.:
> You have a part of the DAG which you want to rebase, with all kinds of
> refs (branches, tags) pointing to commits in that part of the DAG. If
> you rebase that part of the DAG you typically want some refs rewritten
> (such as the head of the branch you're rebasing) but maybe not others
> (say a release tag or branch). remote refs should never be rebased. So,
> one would need an easy way to specify one ref, all or anything in between...

And warn (or perhaps reject without --force) if the sub-DAG you would rebase contains an already tagged commit, especially if you are treating tags as immutable, even the ones you haven't published.

I actually don't think "rebasing side branches while rebasing this branch" was such a good idea---we have filter-branch for that already ;-).

Previous: Greg PriceNext: Johannes Schindelin
Message 10 of 11 in “rebase -i: Add --refs option to rewrite heads within branch”
  1. 0/4 rebase -i: Add --refs option to rewrite heads within branchGreg Price, Dec 22, 2009
  2. 1/4 pretty: Add %D for script-friendly decorationGreg Price, Dec 22, 2009
  3. 2/4 log --decorate=full: drop the "tag: " prefixGreg Price, Dec 22, 2009
  4. 3/4 rebase -i: Add the "ref" commandGreg Price, Dec 22, 2009
  5. 4/4 rebase -i: add --refs option to rewrite heads within branchGreg Price, Dec 22, 2009
  6. Junio C HamanoDec 22, 2009
  7. Greg PriceDec 23, 2009
  8. Michael J GruberDec 23, 2009
  9. Greg PriceDec 23, 2009
  10. Junio C HamanoDec 23, 2009
  11. Johannes SchindelinDec 23, 2009

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.