Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH] rebase -i: avoid checking out $branch when possible

From: Johannes Sixt <hidden>
Date: 2016-06-15 22:53:38

Am 20.04.2012 17:05, schrieb Thomas Rast:
The command

  git rebase [-i] [--onto $onto] $base $branch

is defined to be equivalent to

  git checkout $branch && git rebase [-i] [--onto $onto] $base

However, we do not have to actually perform the checkout.  The rebase
starts building on top of $base (or $onto, if given).  The tree
_state_ (not diff) of $branch is irrelevant.  Actually performing the
checkout has some downsides: $branch may potentially be way out of
touch with HEAD, and thus e.g. trigger a full rebuild in a timestamp-
based build system, even if $base..$branch only edits the README.
Thanks, this is very much appreciated. I like it (because it would
prevent lots of unneeded rebuilds in my use-cases).
 cp "$todo" "$todo".backup
 git_sequence_editor "$todo" ||
-	die_abort "Could not execute editor"
+	die_abort_with_checkout "Could not execute editor"
I don't think that we want to checkout here, even if the docs say we do.

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