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

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:40

Johannes Schindelin [off-list ref] writes:
quoted
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.

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

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:44:40

Hi,

On Mon, 2 Jun 2008, Junio C Hamano wrote:
Johannes Schindelin [off-list ref] writes:
quoted
quoted
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.
Right.  I failed to follow the given hint to the other commit, but it 
makes perfect sense now.

Thanks,
Dscho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help