Re: [PATCH 6/6] Teach core object handling functions about gitlinks
- From
- Josef Weidendorfer <josef.weidendorfer@gmx.de>
- Date
- Apr 10, 2007, 17:23 UTC
- Message-ID
- <200704101923.31404.Josef.Weidendorfer@gmx.de>
- In-Reply-To
- <81b0412b0704100950s32645423r439d04197ee8cd78@mail.gmail.com>
On Tuesday 10 April 2007, Alex Riesen wrote:
Show 22 quoted lines
> On 4/10/07, Josef Weidendorfer <Josef.Weidendorfer@gmx.de> wrote: > > On Tuesday 10 April 2007, Linus Torvalds wrote: > > > ... > > > + if (resolve_gitlink_ref(ce->name, "HEAD", sha1) < 0) > > > + return 0; > > > + return hashcmp(sha1, ce->sha1); > > > > So this does mean that the SHA1 of a gitlink entry corresponds > > to the commit in the subproject? > > Right. > > > I wonder if it is not useful to be able to add some attribute(s) > > to a gitlink, i.e. first reference a gitlink object in the superproject, > > which then references the submodule commit, and also holds some > > further attributes. These attributes can not be put into the subproject, > > as it should be independent. > > These attributes can be put into a file in superproject tree and > checked in at the same as the gitlink. No real need for introducing > another object type (right now there is no gitlink object type, just > an entry in tree with special mode).
Like... .gitattributes ? ;-) Ok, this could work; however, there of course is the possibility of inconsistencies when e.g. manually moving subprojects around.
How is consistency ensured for .gitattributes ? I see that for .gitignore consistency, the user is responsible.
Josef