summaryrefslogtreecommitdiff
path: root/sub-process.h
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2019-03-03 17:11:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-03-04 04:31:03 (GMT)
commite6aac8177d02691bebedec56376ed17239793f9f (patch)
tree15c91578690768abb9df6f17ffe6a01b101020b4 /sub-process.h
parent21853626eac565dd42572d90724b29863f61eb3b (diff)
downloadgit-e6aac8177d02691bebedec56376ed17239793f9f.zip
git-e6aac8177d02691bebedec56376ed17239793f9f.tar.gz
git-e6aac8177d02691bebedec56376ed17239793f9f.tar.bz2
built-in rebase: no need to check out `onto` twice
In the case that the rebase boils down to a fast-forward, the built-in rebase reset the working tree twice: once to start the rebase at `onto`, then realizing that the original (pre-rebase) HEAD was an ancestor and we basically already fast-forwarded to the post-rebase HEAD, `reset_head()` was called to update the original ref and to point HEAD back to it. That second `reset_head()` call does not need to touch the working tree, though, as it does not change the actual tip commit (and therefore the working tree should stay unchanged anyway): only the ref needs to be updated (because the rebase detached the HEAD, and we want to go back to the branch on which the rebase was started). But that second `reset_head()` was called without the flag to leave the working tree alone (the reason: when that call was introduced, that flag was not yet even thought of). Let's avoid that unnecessary work by passing that flag. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sub-process.h')
0 files changed, 0 insertions, 0 deletions