Re: [PATCH] mingw: skip symlink type auto-detection for network share targets

Junio C Hamano <[email protected]> Tue, 28 Jul 2026 15:45:02 -0700
Newsgroups org.kernel.vger.git
Message-ID <[email protected]>
"Johannes Schindelin via GitGitGadget" <[email protected]>
writes:

> From: Johannes Schindelin <[email protected]>
>
> On Windows, symbolic links come in two flavors: file symlinks and
> directory symlinks.  Since Git was born on Linux where this distinction
> does not exist, Git for Windows has to auto-detect the type by looking
> at the target.  When the target does not yet exist at symlink creation
> time, Git for Windows creates a "phantom" file symlink and later, once
> checkout is complete, calls `CreateFileW()` on the target to check
> whether it is actually a directory.
> ...
> Note that there are legitimate paths starting with a single backslash
> that are _not_ network paths: drive-less absolute paths are interpreted
> as relative to the current working directory's drive. In practice, these
> are highly uncommon (and brittle, just one working directory change away
> from breaking). In any case, the only consequence is now that the
> symlink type of those has to be specified via Git attributes, is all.

Thanks, will queue.