Skip to content

Teach mv to move submodules

Jens Lehmann git 3 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 12 repliesIn review
  2. v21 of 3 patches 2 repliesSuperseded
  3. v13 patches 7 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5Teach mv to move submodules together with their work treesbuiltin/mv.c t/t7001-mv.sh+86 -470 replies
2/5Teach mv to move submodules using a gitfileDocumentation/git-mv.txt builtin/mv.c submodule.c +2 more+73 -51 reply
3/5submodule.c: add .gitmodules staging helper functionssubmodule.c submodule.h+53 -02 replies
4/5Teach mv to update the path entry in .gitmodules for moved submodulesDocumentation/git-mv.txt builtin/mv.c submodule.c +2 more+120 -11 reply
5/5rm: delete .gitmodules entry of submodules removed from the work treeDocumentation/git-rm.txt builtin/rm.c submodule.c +4 more+153 -258 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH v3 0/5] Teach mv to move submodules

Here is my third iteration of this series.

Changes to v2 are:

- I resolved the conflict with Duy's pathspec series by replacing the use of common_prefix() with relative_path().

- I separated the functions checking for modified unstaged .gitmodules and staging the changes to that file into another commit, as they are used by both mv and rm.

- mv and rm now die with the message "Please, stage your changes to .gitmodules or stash them to proceed" instead of changing and staging a .gitmodules file containing other unstaged modifications.

- Man pages for mv and rm are updated to tell the user what they do with the gitlink and the .gitmodules file in case of submodules.

- Minor changes according to the last review (typos and a bit more efficient coding).

This series applies cleanly on current pu (and I also ran t3600 and t7001 manually to make sure I don't hit the silent breakage my last series showed when I ran the whole test suite).

Jens Lehmann (5):
Teach mv to move submodules together with their work trees Teach mv to move submodules using a gitfile
submodule.c: add .gitmodules staging helper functions Teach mv to update the path entry in .gitmodules for moved submodules
rm: delete .gitmodules entry of submodules removed from the work tree

 Documentation/git-mv.txt   |  10 ++-
 Documentation/git-rm.txt   |   8 ++-
 builtin/mv.c               | 126 ++++++++++++++++++++++----------------
 builtin/rm.c               |  19 +++++-
 submodule.c                | 147 +++++++++++++++++++++++++++++++++++++++++++++
 submodule.h                |   5 ++
 t/t3600-rm.sh              |  98 ++++++++++++++++++++++++++++--
 t/t7001-mv.sh              | 128 +++++++++++++++++++++++++++++++++++++++
 t/t7400-submodule-basic.sh |  14 ++---
 t/t7610-mergetool.sh       |   6 +-
 10 files changed, 484 insertions(+), 77 deletions(-)
Signature · 1 line
1.8.4.rc0.199.g7079aac