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

Re: [RFC] git commit --branch

From
Martin Waitz <tali@admingilde.org>
Date
May 29, 2006, 21:22 UTC
Message-ID
<20060529212249.GF14325@admingilde.org>
In-Reply-To
<20060529204158.GC28538@spearce.org>
hoi :)
On Mon, May 29, 2006 at 04:41:58PM -0400, Shawn Pearce wrote:
Show 8 quoted lines
> Interesting.  I have been kicking around doing the very same
> thing myself but just have not gotten around to it.  Its complex,
> especially if the current HEAD isn't strictly the merge commit
> between the topic branch and the previous value of HEAD; in that
> case you may want to replay the commits which are on HEAD but are
> post the merge commit using a form of git-rebase.  Except you would
> want to preserve any merges which happened by remerging them rather
> than simply exporting a massive patch and reapplying it.

Perhaps something like merge-recursive makes sense, except that I have no clue how it works ;-)

But then an operation as important as commit has to be bullet-proof and I don't like to do anything complex in there.

In any case, this functionality needs a lot of testing. Any contributions to the test case are welcome :)

Show 6 quoted lines
> > +		git update-ref "$onto_branch" $commit2 &&
> 
> If this is going into next perhaps you would like to considering adding
> the -m flag to your git-update-ref calls and include a log message
> in the reflog (if the user has it enabled for the current branch and
> the topic branch)?
Makes sense.
> Also shouldn't this be 'git-update-ref'?

Yes, all the rest uses git-*, too. If the move to buildin commands continues at the same speed we may soon be able to remove some "-"s, but it's not time for that yet.

-- 
Martin Waitz
Previous: Shawn PearceNext: Shawn Pearce
Message 3 of 15 in “[RFC] git commit --branch”
  1. Martin WaitzMay 29, 2006
  2. Shawn PearceMay 29, 2006
  3. Martin WaitzMay 29, 2006
  4. Shawn PearceMay 29, 2006
  5. Martin WaitzMay 29, 2006
  6. Shawn PearceMay 29, 2006
  7. Johannes SchindelinMay 29, 2006
  8. Jakub NarebskiMay 29, 2006
  9. Martin WaitzMay 29, 2006
  10. Johannes SchindelinMay 29, 2006
  11. Junio C HamanoMay 30, 2006
  12. Martin WaitzMay 30, 2006
  13. Junio C HamanoMay 30, 2006
  14. Martin WaitzMay 31, 2006
  15. Jon LoeligerJun 5, 2006

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.