Re: MinGW port updated to GIT 1.5.0

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

 



torsdag 15 februari 2007 19:59 skrev Junio C Hamano:
> Junio C Hamano <junkio@xxxxxxx> writes:
> 
> > Johannes Sixt <J.Sixt@xxxxxxxxxxxxx> writes:
> >
> >> .... The general idea is to extend the meaning of
> >> `core.filemode = false` to check out symbolic links as plain files. Any
> >> hints about where the source code needs changes are welcome.
> 
> I might have misread the above but I do not think linking
> core.filemode and the symlink munging is the right way.  Another
> per-repository core.symlink = yes/no (which defaults to yes for
> others and no on filesystems without symlinks) would be more
> appropriate, as it allows Cygwin to continue using symlinks
> where it can, and UNIX folks to try it out.
> 
> I take by "checking out as plain files" you mean instead of
> calling symlink(2) you would write(2) it out.
> 
> I think that would be Ok from git's side.  Just like we use
> executable bit from the index to "fix" what we read from the
> filesystem (e.g. look for trust_executable_bit in diff-lib.c)
> when core.filemode is set, you would munge st.st_mode and
> pretend as if your lstat() said "RelNotes", which should be a
> symlink but you checked out as a regular file, said it is a
> symlink, using what is in the index.
> 
> However, I am not so sure if we can do better to help Windows
> people.  They have what they call "ShortCut", which to me feels
> like what they use for what symlinks are used for.  I do not
> know if it is possible (I do not even know doing so would make
> life easier for Windows people) but perhaps a symlink can be
> "checked out" as a ShortCut?

Since cygwin used shortcuts for exactly this purpose, why not (in principle). 
In practice it is  not the same however, since shortcuts aren't transparent to 
applications. Only apps that explicitly understand shortcuts can make any use 
of the, like the Explorer, and cygwin application since cygwin hide the 
things. The (presumed) lack of support in Win32 for these makes it harder to 
support them. 

A little feared commercial Git "alternative" uses copies and. You 
cannot "check out" a symbolic link, only the "real" file. Depending on how 
you access the repository the copies get updated automatically (virtual file 
system) or through an explicit update command. This is more compatible with
native applications since alla apps can then "read" the symbolic links just as 
if they are normal files. Checking in could be interesting since one has to 
decide which copy to consider, or only consider the one that is checked in as 
a non-link.

Some extra commands like git-ln and git-chmod could help in overcoming some of 
the cross platform obstacles.

-- robin
-
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]