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

Re: [PATCH] rebase --interactive: Compute upstream SHA1 before switching branches

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 3, 2008, 02:28 UTC
Message-ID
<7vbq2j5k0u.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<alpine.DEB.1.00.0806021628260.13507@racer.site.net>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 5 quoted lines
>> BTW, methinks, this checkout is unnecessary, since before the rebase 
>> begins, there is a 'git checkout $ONTO', and the branch switching is 
>> certainly not needed to compute the todo list...
>
> It is needed to determine which branch to update after finish.

I'll apply Hannes's patch for now as I do not want to leave an obvious fix out of -rc1.

I think Hannes is referring to the same issue as the one dealt with with 0cb0664 (rebase [--onto O] A B: omit needless checkout, 2008-03-15) for the non-interactive codepath.

You certainly "need to determine which branch to update after finish", and you do need to remember what branch you were on (if you were not called with the <branch> parameter), or what branch were given from the command line (if you got one as <branch> parameter) in order to do so, but the way to remember these values does not have to involve an extra checkout.

By doing an extra checkout of "the original HEAD", before switching to a detached HEAD state at the $ONTO commit to "clean the slate" to apply the sequence on top, more work tree entries will be smudged, forcinging more recompilations than necessary if the tracked contents are "source" files.

Previous: Johannes SchindelinNext: Johannes Schindelin
Message 3 of 4 in “rebase --interactive: Compute upstream SHA1 before switching branches”
  1. rebase --interactive: Compute upstream SHA1 before switching branchesJohannes Sixt, Jun 2, 2008
  2. Johannes SchindelinJun 2, 2008
  3. Junio C HamanoJun 3, 2008
  4. Johannes SchindelinJun 3, 2008

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.