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

[PATCH 0/4] submodules: unset core.worktree when no working tree present

From
Stefan Beller <sbeller@google.com>
Date
Dec 14, 2018, 23:59 UTC
Message-ID
<20181214235945.41191-1-sbeller@google.com>
In-Reply-To
<xmqqefas8ss4.fsf@gitster-ct.c.googlers.com>

v2: I reworded the commit messages to explain the patches from the ground up instead of only linking to the old commits, that got reverted.

> Just pretend that the ealier commits and their reversion never
> happened, and further pretend that we are doing the best thing that
> should happen to our codebase.

I disagree with that first stance (I can freely admit those commits happened), but agree on the second point, so I explained why the code is the best for the code base now. So I kept those pointers in there, too, to make it easier for future code archeologists.

v1:

A couple days before the 2.19 release we had a bug report about broken submodules[1] and reverted[2] the commits leading up to them.

The behavior of said bug fixed itself by taking a different approach[3], specifically by a weaker enforcement of having `core.worktree` set in a submodule [4].

The revert [2] was overly broad as we neared the release, such that we wanted to rather keep the known buggy behavior of always having `core.worktree` set, rather than figuring out how to fix the new bug of having 'git submodule update' not working in old style repository setups.

This series re-introduces those reverted patches, with no changes in code, but with drastically changed commit messages, as those focus on why it is safe to re-introduce them instead of explaining the desire for the change.

[1] https://public-inbox.org/git/2659750.rG6xLiZASK@twilight
[2] f178c13fda (Revert "Merge branch 'sb/submodule-core-worktree'", 2018-09-07)
[3] 4d6d6ef1fc (Merge branch 'sb/submodule-update-in-c', 2018-09-17)
[4] 74d4731da1 (submodule--helper: replace connect-gitdir-workingtree by ensure-core-worktree, 2018-08-13)
Stefan Beller (4):
  submodule update: add regression test with old style setups
  submodule: unset core.worktree if no working tree is present
  submodule--helper: fix BUG message in ensure_core_worktree
  submodule deinit: unset core.worktree
 builtin/submodule--helper.c        |  4 +++-
 submodule.c                        | 14 ++++++++++++++
 submodule.h                        |  2 ++
 t/lib-submodule-update.sh          |  5 +++--
 t/t7400-submodule-basic.sh         |  5 +++++
 t/t7412-submodule-absorbgitdirs.sh |  7 ++++++-
 6 files changed, 33 insertions(+), 4 deletions(-)
-- 
2.20.0.405.gbc1bbc6f85-goog
Previous: Junio C HamanoNext: Stefan Beller
Message 15 of 21 in “[PATCH 0/4]”
  1. 0/4 Stefan Beller, Dec 7, 2018
  2. 1/4 submodule update: add regression test with old style setupsStefan Beller, Dec 7, 2018
  3. Junio C HamanoDec 9, 2018
  4. 2/4 submodule: unset core.worktree if no working tree is presentStefan Beller, Dec 7, 2018
  5. Junio C HamanoDec 8, 2018
  6. 3/4 submodule--helper: fix BUG message in ensure_core_worktreeStefan Beller, Dec 7, 2018
  7. Junio C HamanoDec 8, 2018
  8. Stefan BellerDec 12, 2018
  9. Junio C HamanoDec 13, 2018
  10. 4/4 submodule deinit: unset core.worktreeStefan Beller, Dec 7, 2018
  11. Junio C HamanoDec 8, 2018
  12. Junio C HamanoDec 8, 2018
  13. Stefan BellerDec 12, 2018
  14. Junio C HamanoDec 13, 2018
  15. 0/4 submodules: unset core.worktree when no working tree presentStefan Beller, Dec 14, 2018
  16. 1/4 submodule update: add regression test with old style setupsStefan Beller, Dec 14, 2018
  17. Junio C HamanoDec 26, 2018
  18. 2/4 submodule: unset core.worktree if no working tree is presentStefan Beller, Dec 14, 2018
  19. Junio C HamanoDec 26, 2018
  20. 4/4 submodule deinit: unset core.worktreeStefan Beller, Dec 14, 2018
  21. 3/4 submodule--helper: fix BUG message in ensure_core_worktreeStefan Beller, Dec 14, 2018

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.