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

Re: MinGW port updated to GIT 1.5.0

From
Junio C Hamano <junkio@cox.net>
Date
Feb 15, 2007, 18:59 UTC
Message-ID
<7v7iujckmv.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<7vire3co5s.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> writes:
Show 5 quoted lines
> Johannes Sixt <J.Sixt@eudaptics.com> 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?

I suspect reading side would become too complex and slow if the shortcut needs to be named differently from the real name (e.g. "RelNotes" needs to be checked out as "RelNotes.lnk" or something silly like that), so if that is the case, please forget about this useless suggestion.

Previous: Junio C HamanoNext: Johannes Schindelin
Message 10 of 12 in “MinGW port updated to GIT 1.5.0”
  1. Johannes SixtFeb 15, 2007
  2. GIT 1.5.0 binary installer available.Han-Wen Nienhuys, Feb 15, 2007
  3. Johannes SchindelinFeb 15, 2007
  4. Johannes SchindelinFeb 15, 2007
  5. Shawn O. PearceFeb 15, 2007
  6. Johannes SchindelinFeb 16, 2007
  7. Shawn O. PearceFeb 16, 2007
  8. Marco CostalbaFeb 16, 2007
  9. Junio C HamanoFeb 15, 2007
  10. Junio C HamanoFeb 15, 2007
  11. Johannes SchindelinFeb 15, 2007
  12. Robin RosenbergFeb 15, 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.