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

Re: git submodule support feedback

From
Junio C Hamano <junkio@cox.net>
Date
Apr 26, 2007, 21:35 UTC
Message-ID
<7vfy6mstsd.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<200704262228.46864.andyparkins@gmail.com>
Andy Parkins <andyparkins@gmail.com> writes:
Show 24 quoted lines
> On Thursday 2007, April 26, Andy Parkins wrote:
>
>> I'll report further as I come across any stumbling blocks; but here
>
> The submodule support requires the latest version of git right?  That's 
> going to cause trouble for people running different versions of git 
> (I've already experienced it in my own limited way - I had to upgrade 
> all the copies of git I have on my various computers before fetching 
> and pushing would work).  If the repository contains a submodule 
> reference it effectively becomes inaccessible by a version of git 
> without submodule support.
>
> I think that we might be able to avoid that problem though - am I right 
> in thinking that the problem is that all the tools need teaching not to 
> follow the gitlink object because that hash doesn't exist in _this_ 
> tree it is a reference to a commit in another tree.
>
> Wouldn't it be better if the gitlink reference pointed at an object in 
> this tree which in turn referred to the submodule commit?  That way the 
> old versions of git would still work with submodule objects in the 
> repository because they would just see submodules as pointing at a 
> blob.
>
> Have I oversimplified it in my head?

I think older tools do not expect to find anything but tree or blob in a tree object to begin with. Now your experimental repository has a commit, which they do not expect to see and I think they will be unhappy.

If you replace the commit objects in your trees with a new type of object 'gitlink', your older tools will have exactly the same problem, won't they?

Previous: David LangNext: Andy Parkins
Message 6 of 7 in “git submodule support feedback”
  1. Andy ParkinsApr 26, 2007
  2. Marco CostalbaApr 26, 2007
  3. Andy ParkinsApr 26, 2007
  4. Andy ParkinsApr 26, 2007
  5. David LangApr 26, 2007
  6. Junio C HamanoApr 26, 2007
  7. Andy ParkinsApr 26, 2007

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.