Re: [RFC 1/2] submodules: test for fetch of non-init subsub-repo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



minor readability comment,

On 11/11/2020 12:45, Peter Kästle wrote:
> Here is my proposal for a new commit message of the test case:
>
> ----8<----
> A regression has been introduced by 'a62387b (submodule.c: fetch in
> submodules git directory instead of in worktree, 2018-11-28)'.
>
> The scenario in which it triggers is when one has a remote repository
> with a subrepository inside a subrepository like this:
> superproject/middle_repo/inner_repo
>
> Person A and B have both a clone of it, while Person B is not working
> with the inner_repo and thus does not have it initialized in his working
> copy.
>
> Now person A introduces a change to the inner_repo and propagates it
> through the middle_repo and the superproject.
> Once person A pushed the changes and person B wants to fetch them
> using "git fetch" on superproject level, git

It's not obviously obvious which person is doing this final 'git'
operation (it isn't attached to a particular person). Not sure if moving
the comma, or saying ", B's 'git fetch' will.." is the right choice. The
following sentences also feel as treating 'git' as person (trusted
friend;-).

> will return with error saying:
>
> Could not access submodule 'inner_repo'
> Errors during submodule fetch:
>         middle_repo
>
> Expectation is that in this case the inner submodule will be
> recognized as uninitialized subrepository and skipped by the git fetch
> command.
>
> This used to work correctly before 'a62387b (submodule.c: fetch in
> submodules git directory instead of in worktree, 2018-11-28)'.
>
> Starting with a62387b the code wants to evaluate "is_empty_dir()"
> inside .git/modules for a directory only existing in the worktree,
> delivering then of course wrong return value.
> ---->8----
--
Philip




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux