Re: [PATCH/RFC] init, clone: support --real-git-dir for .git file
- From
Piotr Krukowiecki <piotr.krukowiecki@gmail.com>
- Date
- Mar 4, 2011, 18:09 UTC
- Message-ID
- <AANLkTinQCZXYAbndLuRVVEr6NTRA8aaypFfvtqNjknLQ@mail.gmail.com>
- In-Reply-To
- <AANLkTiksQg1U=uAEVJG8fyjd7HpsTqgBOdyh6wrEMSED@mail.gmail.com>
On Fri, Mar 4, 2011 at 1:26 PM, Nguyen Thai Ngoc Duy <pclouds@gmail.com> wrote:
Show 20 quoted lines
> 2011/3/4 Piotr Krukowiecki <piotr.krukowiecki@gmail.com>:
>> I thought it was user-level file, like $GIT_DIR
>>
>> I'm not into data duplication, but in this case the message is next to the
>> previous use:
>>
>> if (prefixcmp(buf, "gitdir: "))
>> die("Invalid gitfile format: %s\nUse gitdir: <PATH>", path);
>>
>>
>> BTW I think it might be enough to have just path in the .git file. If
>> .git has path
>> to a correct git repo then chances it's coincidence are quite low.
>> (The format does not matter if it's internal file of course)
>
> It's actually good that path is prefixed by gitdir. I imagine once
> superproject is supported, .git file in subprojects will have another
> line
>
> supergitdir: /path/to/superprojectWhy would it be better than keeping this information under .git/, in config or other specific file?
-- Piotrek