Skip to content

Moving submodules with nested submodules

Stefan Beller git 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest6 patches 1 replyIn review
  2. v26 patches 4 repliesSuperseded
  3. v15 patches 7 repliesSuperseded

Changes in v3 from the cover letter

* reordered patches to have Jonathans patch before submodule_free
* addressed Jonathans comments on patch 5.
* rebased on origin/sb/object-store to resolve a visibility conflict about repo_init being exposed outside of repository.c

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6submodule.h: drop declaration of connect_work_tree_and_git_dirsubmodule.h+0 -10 replies
2/6grep: remove "repo" arg from non-supporting funcsbuiltin/grep.c+5 -70 replies
3/6submodule-config: allow submodule_free to handle arbitrary repositoriesDocumentation/technical/api-submodule-config.txt builtin/grep.c submodule-config.c +3 more+8 -80 replies
4/6submodule-config: add repository argument to submodule_from_{name, path}builtin/submodule--helper.c submodule-config.c submodule-config.h +2 more+41 -330 replies
5/6submodule-config: remove submodule_from_cacherepository.c submodule-config.c submodule-config.h +1 more+3 -150 replies
6/6submodule: fixup nested submodules after moving the submodulebuiltin/mv.c builtin/submodule--helper.c dir.c +5 more+83 -150 replies

Reviews trailers per patch

2 of 6 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJonathan Tan
SeriesR-b
1/6
2/6
3/6
4/6R-b
5/6R-b
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCHv3 0/6] Moving submodules with nested submodules

v3:
* reordered patches to have Jonathans patch before submodule_free
* addressed Jonathans comments on patch 5.
* rebased on origin/sb/object-store to resolve a visibility conflict about repo_init being exposed outside of repository.c

v2:
* addressed memleaks and messy code in patch 5
* removed the extern keyword where applicable
* extended the commit message, stating we want to rename submodule_free in the future.
* picked up Jonathans patch and added it as a nice finish of the series. I did not see the need or aesthetic desire to put that patch earlier in the series.

Thanks,
Stefan

v1:

This fixes the bug reported in [1] ("Bug: moving submodules that have submodules inside them causes a fatal error in git status")

[1] https://public-inbox.org/git/[email protected]/

Thanks,
Stefan
Jonathan Tan (1):
grep: remove "repo" arg from non-supporting funcs

Stefan Beller (5):
submodule.h: drop declaration of connect_work_tree_and_git_dir
submodule-config: allow submodule_free to handle arbitrary
repositories
submodule-config: add repository argument to submodule_from_{name,

    path}

submodule-config: remove submodule_from_cache
submodule: fixup nested submodules after moving the submodule

 .../technical/api-submodule-config.txt        |  2 +-
 builtin/grep.c                                | 14 ++---
 builtin/mv.c                                  |  6 +-
 builtin/submodule--helper.c                   | 17 +++---
 dir.c                                         | 60 ++++++++++++++++++-
 dir.h                                         | 12 +++-
 repository.c                                  |  8 +--
 repository.h                                  |  3 +
 submodule-config.c                            | 29 ++++-----
 submodule-config.h                            | 15 +++--
 submodule.c                                   | 40 +++++++------
 submodule.h                                   |  1 -
 t/helper/test-submodule-config.c              |  8 ++-
 t/t7001-mv.sh                                 |  2 +-
 unpack-trees.c                                |  2 +-
 15 files changed, 140 insertions(+), 79 deletions(-)
Signature · 1 line
2.17.0.rc1.321.gba9d0f2565-goog