Re: [PATCH] submodule: show inconsistent .gitmodules precedence

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

 



"Glen Choo via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes:

>   [submodule "sub"]
>     path = path1
>     path = path2
>
> It's clearly misconfigured, but our docs don't state what we do in this
> situation. If one checks this with "test-tool submodule-config", you'd
> see that we ignore every value after the first (aka first-one-wins) and
> issue a warning. *But* if you actually tried this with "git submodule",
> you'd find it practically impossible to trigger this behavior - what you
> actually see is last-one-wins!

The last-one-wins sounds like a natural outcome for reusing the
config reading machinery, and the first-one-wins sounds like a total
confusion, but we probably should fail any operation before the user
fixes the .gitmodules by removing all but one path for each
submodule.  Otherwise we risk operating on wrong submodules (e.g. we
may think we are running deinit on "sub" at path #1, but the code
may deinit something different).

Thanks.



[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