Skip to content

recursive submodules: git-reset!

Stefan Beller git 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 4 repliesIn review
  2. v14 patches 10 repliesSuperseded

Changes in v2 from the cover letter

* improved commit message to be proper English (Thanks, Philip!)
* clarified why the patch 2 is so short (i.e. it doesn't matter if the submodule is initialized in the preparation repo, we care about the actual testing repo! Thanks, Brandon)
* reworded patch 1 (Thanks Jonathan)

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4entry.c: submodule recursing: respect force flag correctlyentry.c unpack-trees.c+10 -50 replies
2/4submodule.c: uninitialized submodules are ignored in recursive commandssubmodule.c t/lib-submodule-update.sh+4 -00 replies
3/4submodule.c: submodule_move_head works with broken submodulessubmodule.c t/lib-submodule-update.sh+44 -70 replies
4/4builtin/reset: add --recurse-submodules switchbuiltin/reset.c t/t7112-reset-submodule.sh+38 -03 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCHv2 0/4] recursive submodules: git-reset!

v2:
* improved commit message to be proper English (Thanks, Philip!)
* clarified why the patch 2 is so short (i.e. it doesn't matter if the submodule is initialized in the preparation repo, we care about the actual testing repo! Thanks, Brandon)
* reworded patch 1 (Thanks Jonathan)

Thanks,
Stefan

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

Now that the BIG one has landed, e394fa01d6 (Merge branch 'sb/checkout-recurse-submodules', 2017-03-28), you would expect that teaching to recurse into submodules is easy for all the remaining working tree manipulations?

It turns out it is. See the last patch how we teach git-reset to recurse into submodules.

However when thinking more about what git-reset is expected to do, I added tests and some fixes for them (patch 2+3).

patch 1 is a correctness thing, required for patch 3.

Thanks,
Stefan

Stefan Beller (4):
entry.c: submodule recursing: respect force flag correctly submodule.c: uninitialized submodules are ignored in recursive
commands
submodule.c: submodule_move_head works with broken submodules builtin/reset: add --recurse-submodules switch

 builtin/reset.c            | 30 ++++++++++++++++++++++++++++++
 entry.c                    |  8 ++++----
 submodule.c                | 31 +++++++++++++++++++++++++++----
 t/lib-submodule-update.sh  | 24 +++++++++++++++++++++---
 t/t7112-reset-submodule.sh |  8 ++++++++
 unpack-trees.c             |  7 ++++++-
 6 files changed, 96 insertions(+), 12 deletions(-)