Re: [PATCH] Add platform-independent .git "symlink"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Shawn O. Pearce" <spearce@xxxxxxxxxxx> writes:

> Johannes Schindelin <Johannes.Schindelin@xxxxxx> wrote:
>> On Sun, 3 Feb 2008, Junio C Hamano wrote:
>> 
>> > "Lars Hjemli" <hjemli@xxxxxxxxx> writes:
>> > 
>> > > Maybe this as a compromise?
>> > >
>> > > 	static char buf[PATH_MAX + 9];  /* "GITDIR: " + "\n"  */
>> > > ...
>> > > 	if (!len || buf[len - 1] != '\n')
>> > > 		return NULL;
>> > > 	buf[len - 1] = '\0';
>> > > 	if (prefixcmp(buf, "GITDIR: "))
>> > > 		return NULL;
>> > 
>> > Perhaps that is easier to read.
>> > 
>> > For now I haven't picked up any of the "how about this way"
>> > revisions.
>> 
>> Yeah, I think all my comments have been addressed...  Lars, care to send a 
>> new version?
>
> I would suggest a slightly different name, "GIT_DIR: ", as the
> line prefix, because the environment variable is also GIT_DIR.
>
> But that's just me.

I think that was modelled after symref HEAD that would point at
the real ref with "ref: refs/heads/master", as if you have a
symlink whose value is "refs/heads/master".  So reusing "ref: "
might be Ok, and saying "directory: " or "gitdir: " would be
also Ok.

If we would want to reuse the mechanism in the future to allow
symlink challenged systems to use it in contrib/workdir/, we may
want to keep the name a bit more generic than "gitdir: ".
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux