Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

symbolic links in git #650

Closed
fommil opened this issue Feb 18, 2016 · 9 comments
Closed

symbolic links in git #650

fommil opened this issue Feb 18, 2016 · 9 comments

Comments

@fommil
Copy link

fommil commented Feb 18, 2016

I have a repository

https://github.com/ensime/ensime-sbt/

that has a few symbolic links in it, but they are not being translated correctly when checked out in windows, and they look like junk.

Can you please add an option to convert these into copied files, or windows links?

@FeodorFitsner
Copy link
Member

How are they configured? How to see them in that repo?

@fommil
Copy link
Author

fommil commented Feb 18, 2016

some examples https://github.com/ensime/ensime-sbt/tree/master/src/sbt-test/ensime-sbt/java-flags/project

I'm trying out this hack that I found on stackoverflow, seems legit

  - ps: |
      $symlinks = &git ls-files -s | gawk '/120000/{print $4}'
      foreach ($symlink in $symlinks) {
        write-host $symlink
        &git update-index --assume-unchanged $symlink
      }

@FeodorFitsner
Copy link
Member

Nice, thanks for sharing the solution!

@fommil
Copy link
Author

fommil commented Feb 20, 2016

@fommil
Copy link
Author

fommil commented Feb 20, 2016

now trying out

  - cmd: git config core.symlinks true
  - cmd: git reset --hard

if that works, I'd recommend setting core.symlinks=true as the default.

@fommil
Copy link
Author

fommil commented Feb 20, 2016

that works!

@FeodorFitsner
Copy link
Member

Nice!

@fommil
Copy link
Author

fommil commented Feb 20, 2016

it works on appveyor, but not on my local Windows 7 VirtualBox image, so I suspect this is not a universal solution.

@fommil fommil closed this as completed Feb 20, 2016
JelleZijlstra added a commit to JelleZijlstra/mypy that referenced this issue Apr 21, 2017
@gvanrossum
Copy link

(According to http://stackoverflow.com/questions/5917249/git-symlinks-in-windows you must run this in Administrator mode and use a recent git version. Maybe this helps.)

JelleZijlstra added a commit to JelleZijlstra/mypy that referenced this issue Apr 21, 2017
JelleZijlstra added a commit to JelleZijlstra/mypy that referenced this issue Apr 21, 2017
gvanrossum pushed a commit to python/mypy that referenced this issue Apr 21, 2017
benmosher added a commit to import-js/eslint-plugin-import that referenced this issue Mar 28, 2018
benmosher added a commit to import-js/eslint-plugin-import that referenced this issue Mar 28, 2018
This was referenced Apr 2, 2018
charleskorn added a commit to batect/batect that referenced this issue Jul 26, 2019
AppVeyor doesn't have Git's symlinks support for Windows enabled by
default.

See appveyor/ci#650 (comment).

We also have to make sure to check the file out with the expected line
endings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants