Skip to content

Commit

Permalink
am --skip/--abort: merge HEAD/ORIG_HEAD tree into index
Browse files Browse the repository at this point in the history
f8da680 (am --skip: support skipping while on unborn branch,
2015-06-06) introduced a performance regression to "git am --skip",
where it used "read-tree" to reconstruct the index from scratch
without reusing the cached stat information.

This is a backport of the corresponding patch to the builtin am in 2.6:
3ecc704 (am --skip/--abort: merge HEAD/ORIG_HEAD tree into index,
2015-08-19).

Reportedly, it can make a huge difference on Windows, in one case a `git
rebase --skip` took 1m40s without, and 5s with, this patch.

cf. https://github.com/git-for-windows/git/issues/365

Reported-and-suggested-by: Kim Gybels <kgybels@infogroep.be>
Acked-by: Paul Tan <pyokagan@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Johannes Schindelin authored and Junio C Hamano committed Sep 9, 2015
1 parent 74b6763 commit b9d6689
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-am.sh
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ then
git read-tree --reset -u $head_tree $head_tree &&
index_tree=$(git write-tree) &&
git read-tree -m -u $index_tree $head_tree
git read-tree $head_tree
git read-tree -m $head_tree
;;
,t)
if test -f "$dotest/rebasing"
Expand Down

0 comments on commit b9d6689

Please sign in to comment.