Skip to content

RFC Improve merge recursive performance

Elijah Newren git 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest9 patches 0 repliesNew
  2. v1 RFC9 patches 2 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9diffcore-rename: no point trying to find a match better than exactdiffcore-rename.c+11 -60 replies
2/9merge-recursive: avoid unnecessary string list lookupsmerge-recursive.c+10 -40 replies
3/9merge-recursive: new function for better colliding conflict resolutionsdiff.h diffcore-rename.c merge-recursive.c+128 -30 replies
4/9Add testcases for improved file collision conflict handlingt/t6042-merge-rename-corner-cases.sh+210 -00 replies
5/9merge-recursive: fix rename/add conflict handlingmerge-recursive.c t/t6036-recursive-corner-cases.sh+108 -460 replies
6/9merge-recursive: improve handling for rename/rename(2to1) conflictsmerge-recursive.c t/t6042-merge-rename-corner-cases.sh+14 -890 replies
7/9merge-recursive: improve handling for add/add conflictsmerge-recursive.c t/t2023-checkout-m.sh t/t3418-rebase-continue.sh +12 more+128 -700 replies
8/9merge-recursive: accelerate rename detectiondiff.c diff.h diffcore-rename.c +1 more+98 -50 replies
9/9diffcore-rename: filter rename_src list when possiblediffcore-rename.c+31 -160 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [RFC PATCH v2 0/9] Improve merge recursive performance

You probably want to wait to review this series until my rename detection series lands so that I can clean up any more conflicts, but I'm posting this new series in case anyone wants to take an early look. It includes fixes identified by the reviews of my other patch series, and has been rebased on top of newer versions with conflicts resolved.

For the adventerous, though...

This patch series improves merge recursive performance, particularly when one side of history only makes a small number of changes, and the other has lots of renames (or lots of adds and deletes); I saw a speedup factor of over 30 on one particular real world repository.

Still RFC for the same reasons that the first series was (see
https://public-inbox.org/git/[email protected]/), I haven't yet had time to push this further other than rebasing and cleaning up issues shared with my other series.

If you just want to test it out, it's available as the 'big-repo-small-cherry-pick' branch of https://github.com/newren/git .

Elijah Newren (9):
diffcore-rename: no point trying to find a match better than exact
merge-recursive: avoid unnecessary string list lookups
merge-recursive: new function for better colliding conflict
resolutions
Add testcases for improved file collision conflict handling
merge-recursive: fix rename/add conflict handling
merge-recursive: improve handling for rename/rename(2to1) conflicts
merge-recursive: improve handling for add/add conflicts
merge-recursive: accelerate rename detection
diffcore-rename: filter rename_src list when possible

 diff.c                               |   1 +
 diff.h                               |   7 +
 diffcore-rename.c                    |  85 ++++++-
 merge-recursive.c                    | 452 ++++++++++++++++++++++++-----------
 t/t2023-checkout-m.sh                |   2 +-
 t/t3418-rebase-continue.sh           |  27 ++-
 t/t3504-cherry-pick-rerere.sh        |  19 +-
 t/t4200-rerere.sh                    |  12 +-
 t/t6020-merge-df.sh                  |   4 +-
 t/t6024-recursive-merge.sh           |  35 +--
 t/t6025-merge-symlinks.sh            |   9 +-
 t/t6031-merge-filemode.sh            |   4 +-
 t/t6036-recursive-corner-cases.sh    |  19 +-
 t/t6042-merge-rename-corner-cases.sh | 212 +++++++++++++++-
 t/t6043-merge-rename-directories.sh  |  15 +-
 t/t7060-wtstatus.sh                  |   1 +
 t/t7064-wtstatus-pv2.sh              |   4 +-
 t/t7506-status-submodule.sh          |  11 +-
 t/t7610-mergetool.sh                 |  28 +--
 19 files changed, 723 insertions(+), 224 deletions(-)
Signature · 1 line
2.15.0.323.g31fe956618