Re: [PATCH v4 2/2] push: teach --recurse-submodules the on-demand option
- From
Phil Hord <phil.hord@gmail.com>
- Date
- Dec 12, 2011, 23:50 UTC
- Message-ID
- <CABURp0qkKXCW-U=78OpnejdtdpphhJtOoDubz77m7Gt3o5sC=Q@mail.gmail.com>
- In-Reply-To
- <4EE6805D.7020708@web.de>
On Mon, Dec 12, 2011 at 5:29 PM, Jens Lehmann <Jens.Lehmann@web.de> wrote:
Show 29 quoted lines
> Am 12.12.2011 22:16, schrieb Phil Hord:
>> On Tue, Oct 18, 2011 at 4:58 PM, Jens Lehmann <Jens.Lehmann@web.de> wrote:
>>> Am 18.10.2011 00:33, schrieb Junio C Hamano:
>>>> We could even declare that the gitlink for such a
>>>> submodule should record 0{40} SHA-1 in the superproject, but I do not
>>>> think that is necessary.
>>>
>>> Me neither, e.g. the SHA-1 which was the submodules HEAD when it was added
>>> should do nicely. And that would avoid referencing a non-existing commit
>>> in case you later want to turn a floating submodule into an exact one.
>>
>>
>> I'm sorry I missed this comment before.
>>
>> I hope we can allow storing the actual gitlink in the superproject for
>> each commit even when we're using floating submodules.
>
> I think you misread my statement, I was just talking about the initial
> commit containing the newly added submodule, not any subsequent ones.
> Floating makes differences between the original SHA-1 and the current
> tip of the branch invisible, so there is nothing to commit.
>
>> I thought-experimented with this a bit last year and came to the
>> conclusion that I should be able to 'float' to tips (developer
>> convenience) and also to store the SHA-1 of each gitlink through
>> history (automated maybe; as-needed).
>
> Which means that after "git submodule update" floated a submodule branch
> further, you would have to commit that in the superproject.Sadly, yes. Currently I have my CI-server do this for me after it verifies each new submodule commit is able to build successfully.
Show 5 quoted lines
>> The problem with "float-only" is that it loses history so, for >> example, git-bisect doesn't work. > > Yep. And different developers can have the same superproject commit > checked out but their submodules can be quite different.
Show 7 quoted lines
>> The problem with "float + gitlinks", of course, is that it looks like >> "not floating" to the developers (git-status is dirty unless >> overridden, etc.) > > Yeah. But what if each "git submodule update" would update the tip of > the submodule branch and add that to the superproject? You could follow > a tip but still produce reproducible trees.
Yes, and that's what I want.
Not what it sounded like was being suggested before, which (to my eyes) implied that the submodule gitlinks were useless noise.
Phil