Skip to content

implement merge strategy for submodule links

Heiko Voigt git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 27 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3extend ref iteration for submodulescache.h path.c refs.c +1 more+89 -260 replies
2/3add missing && to submodule-merge testcaset/t7405-submodule-merge.sh+1 -10 replies
3/3implement automatic fast forward merge for submodulesmerge-recursive.c submodule.c submodule.h +1 more+238 -90 replies
3/3implement automatic fast forward merge for submodulesmerge-recursive.c refs.c refs.h +5 more+300 -180 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [WIP PATCH 0/3] implement merge strategy for submodule links

The following patch series is a work in progress. The idea is whenever you need to merge two SHA1's of a submodule we search for a ref in the submodule which already contains both. If one such ref exists the resulting SHA1 is the one pointed at by that ref.

The implementation currently searches through all refs and if one (and only one) ref exists which contains both sides it merges. In all other cases it fails.

Future Plans:

* Only search stable branches. E.g. by default only master and

    */master. The stable branch list will be configurable.

* Use read_gitfile_gently for submodule .git handling

* Use strbuf in git_path_submodule

Further comments or ideas?

The series can also be found on github:

http://github.com/hvoigt/git/tree/hv/submodule_merge

cheers Heiko

Heiko Voigt (3):
extend ref iteration for submodules
add missing && to submodule-merge testcase implement automatic fast forward merge for submodules

 cache.h                    |    3 +
 merge-recursive.c          |    9 ++-
 path.c                     |   21 ++++++++
 refs.c                     |   89 +++++++++++++++++++++++---------
 refs.h                     |    2 +
 submodule.c                |  121 ++++++++++++++++++++++++++++++++++++++++++++
 submodule.h                |    2 +
 t/t7405-submodule-merge.sh |  117 ++++++++++++++++++++++++++++++++++++++++---
 8 files changed, 328 insertions(+), 36 deletions(-)