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

Re: Re: Updating a submodule with a compatible version from another submodule version using the parent meta-repository

From
JIJulian Ibarz <julian.ibarz@gmail.com>
Date
Jan 30, 2011, 09:44 UTC
Message-ID
<AANLkTimBCeSnR270eWMcrgCVj6rmiRkJizOxQPAPOAnn@mail.gmail.com>
In-Reply-To
<20110129110807.GA21864@book.hvoigt.net>

Today I have started to implement a proof of concept in C (I know a script would be better but I am really not good in sh so...). I struggle with the manipulation of the git API. I have pushed my work here:

http://gitorious.org/julian_ibarz_git/julian_ibarz_git
in branch submodule_checkout
My work is in:
builtin/submodulecheckout.c

And my questions are prepended by the keyword QUESTION (two questions for now only).

Any help is welcome.
Thanks,
Julian Ibarz
On Sat, Jan 29, 2011 at 6:08 AM, Heiko Voigt <hvoigt@hvoigt.net> wrote:
Show 49 quoted lines
> Hi,
>
> On Wed, Jan 26, 2011 at 02:05:43PM -0800, Junio C Hamano wrote:
>> If that version of submodule B is explicitly bound to a commit in the
>> superproject A, you know which version of A and C were recorded, and the
>> problem is solved.
>>
> [...]
>>
>> If you are confident that you didn't introduce different kind of
>> dependency to other submodules while developing your "old_feature" branch
>> in submodule B, one strategy may be to find an ancestor, preferrably the
>> fork point, of your "old_feature" branch that is bound to the superproject
>> A.  Then at that point at least you know whoever made that commit in A
>> tested the combination of what was recorded in that commit, together with
>> the version of B and C, and you can go forward from there, replaying the
>> changes you made to the "old_feature" branch in submodule B.
>
> Lets extend your explanation a little further and maybe demonstrate the problem
> Julian is having a little more. I think what Julian searches for is a tool in
> git that does the lookup for you which is AFAIK not that easy currently. It
> seems to be a quite useful feature. Here what I understand Julian wants:
>
> 1. Find the most recent superproject commit X'' in A that records a submodule
>   commit X' in B which contains the commit X in B you are searching for.
>
>   For this we would need use something similar to git describe --contains
>   but instead of using the list of existing tags in B it should use the list
>   of commits in B which are recorded in A.
>
>   Here a drawing to explain (linear history for simplicity):
>
>   superproject A:
>
>      O---O---X''---O
>               \
>   submodule B: \
>                 \
>      O---X---O---X'---O---O
>
> 2. Look up the commit of C which is recorded in X'' of A and check it
>   out.
>
> Step 2 is easy but for Step 1 the lookup of X' is missing for the commandline.
> Is there already anything that implements git describe --contains for a defined
> list of commits instead of refs?
>
> Cheers Heiko
>
Previous: Heiko VoigtNext: Julian Ibarz
Message 12 of 20 in “Updating a submodule with a compatible version from another submodule version using the parent meta-repository”
  1. Julian IbarzJan 26, 2011
  2. Jens LehmannJan 26, 2011
  3. Julian IbarzJan 26, 2011
  4. Jens LehmannJan 26, 2011
  5. Julian IbarzJan 26, 2011
  6. Jens LehmannJan 26, 2011
  7. Julian IbarzJan 26, 2011
  8. Junio C HamanoJan 26, 2011
  9. Julian IbarzJan 26, 2011
  10. Junio C HamanoJan 26, 2011
  11. Heiko VoigtJan 29, 2011
  12. Julian IbarzJan 30, 2011
  13. Julian IbarzFeb 3, 2011
  14. Heiko VoigtFeb 6, 2011
  15. Heiko VoigtFeb 9, 2011
  16. Julian IbarzFeb 12, 2011
  17. Heiko VoigtFeb 13, 2011
  18. Julian IbarzFeb 13, 2011
  19. Heiko VoigtFeb 14, 2011
  20. Julian IbarzFeb 20, 2011

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.