git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/4] recursive submodules: git-reset!

From
Stefan Beller <sbeller@google.com>
Date
Apr 11, 2017, 23:49 UTC
Message-ID
<20170411234923.1860-1-sbeller@google.com>

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: harden submodule_move_head against broken submodules
  builtin/reset: add --recurse-submodules switch
 builtin/reset.c            | 30 ++++++++++++++++++++++++++++++
 entry.c                    |  8 ++++----
 submodule.c                | 20 ++++++++++++++++++++
 t/lib-submodule-update.sh  | 24 +++++++++++++++++++++---
 t/t7112-reset-submodule.sh |  8 ++++++++
 unpack-trees.c             |  7 ++++++-
 6 files changed, 89 insertions(+), 8 deletions(-)
-- 
2.12.2.603.g7b28dc31ba
Next: Stefan Beller
Message 1 of 15 in “recursive submodules: git-reset!”
  1. 0/4 recursive submodules: git-reset!Stefan Beller, Apr 11, 2017
  2. 1/4 entry.c: submodule recursing: respect force flag correctlyStefan Beller, Apr 11, 2017
  3. Philip OakleyApr 12, 2017
  4. Jonathan TanApr 14, 2017
  5. Stefan BellerApr 14, 2017
  6. 2/4 submodule.c: uninitialized submodules are ignored in recursive commandsStefan Beller, Apr 11, 2017
  7. Brandon WilliamsApr 13, 2017
  8. Stefan BellerApr 13, 2017
  9. Brandon WilliamsApr 13, 2017
  10. 4/4 builtin/reset: add --recurse-submodules switchStefan Beller, Apr 11, 2017
  11. 3/4 submodule.c: harden submodule_move_head against broken submodulesStefan Beller, Apr 11, 2017
  12. Philip OakleyApr 12, 2017
  13. Brandon WilliamsApr 13, 2017
  14. Stefan BellerApr 13, 2017
  15. Jonathan TanApr 14, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.