Re: [PATCH v2 0/4] checkout/reset/read-tree: fix --recurse-submodules in linked worktree
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 22, 2020, 22:10 UTC
- Message-ID
- <xmqqwo9j5ei3.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <pull.523.v2.git.1579618877.gitgitgadget@gmail.com>
"Philippe Blain via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 28 quoted lines
> Changes since v1: > > * revert the addition of a dash in "file1 updated" by correctly using the > 'tag' argument of test_commit > * improve the commit message for the 3rd patch, as suggested by Eric > * fix spacing when redirecting into 'expect' and 'actual' > * harden the tests by echoing expected values into expect, as suggested by > Stolee (I did that in both tests) > * remove test_might_fail and use test_expect_code > * add the 'git log' test suggested by Stolee > > v1: This series fixes the behaviour of git checkout/reset/read-tree > --recurse-submodules when they are called in a linked worktree (created by > git worktree add). > > Although submodules are cloned in $GIT_COMMON_DIR/worktrees/<name>/modules > upon issuing git submodule update in the linked worktree, any invocation of > git checkout/reset/read-tree --recurse-submodules that changes the state of > the submodule(s) will incorrectly operate on the repositories of the > submodules in the main worktree, i.e. the ones at $GIT_COMMON_DIR/modules/. > > The fourth patch fixes this behaviour by using get_git_dir() instead of > git_common_dir() in submodule.c::submodule_move_head and > submodule.c::submodule_unset_core_worktree to construct the path to the > submodule repository. > > The first 3 patches are clean-up patches on t7410-submodule-checkout-to.sh > (renamed to t2405-worktree-submodule.sh) to bring it up to date.
I've read these four patches a few times and did not spot any remaining issues. I however is hardly an expert on (nor a big fan of) the "--recurse-submodule" feature, so a proper review by those who are more familiar with it is surely appreciated.
Thanks.
Show 6 quoted lines
> Cc:Max Kirillov max@max630.net [max@max630.net] Brandon Williams > bwilliams.eng@gmail.com [bwilliams.eng@gmail.com] Jonathan Tan > jonathantanmy@google.com [jonathantanmy@google.com] Stefan Beller > stefanbeller@gmail.com [stefanbeller@gmail.com] Nguyễn Thái Ngọc Duy > pclouds@gmail.com [pclouds@gmail.com] Eric Sunshine sunshine@sunshineco.com > [sunshine@sunshineco.com] Derrick Stolee stolee@gmail.com [stolee@gmail.com]
This is somewhat unreadable wall of names X-< Is it a funny rendering of what is originally in some mark-up format (perhaps HTML???)