Skip to content

git bash should error on 'ln -s' if it is not enabled #3122

Open
@ernstklrb

Description

@ernstklrb
  • I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? 2.28.0
  • Is it 32-bit or 64-bit? 64
$ git --version --build-options
git version 2.28.0.windows.1
cpu: x86_64
built from commit: 77982caf269b7ee713a76da2bcf260c34d3bf7a7
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh

  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
    Windows 10 64bit
$ cmd.exe /c ver

Microsoft Windows [Version 10.0.18363.1379]
  • What options did you set as part of the installation? Or did you choose the
    defaults? I do not know - it is installed by Admin.
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt

** insert your machine's response here **
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?
    none

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

This report is about 'git bash' itself, not about git.

  • What I see

Apparently, when creating symlinks is not enabled at install time, git bash will resort to copying the source to the target instead., if a ln -s source target command is issued. This is what I see from issuing stat on the source and the result.

  • What I would like to see

In case symlinking has not been enabled, ln -s should stop with an error (instead of resorting to a semantically incompatible alternative behavior).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions