You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
git lfs track fails when git dirpath contains symlinks #811
git lfs track fails with a.gif is outside repository if current working dir(=gitdir) contains symlinks.
Steps to reproduce.
$ mkdir /tmp/real
$ cd /tmp/
$ ln -sf real sym
$ cd sym
$ git init .; git lfs init
# copy any binary file to this dir
$ git lfs track a.gif
a.gif is outside repositor
Ah, this is because the init() function uses git rev-parse to get the working directory. We may need to use that as the base for all of the other directories too. I'll add this to the list for v1.1.0, but I personally won't be able to work on that too much for a little while.
Well, simplest solution would be cleaning paths with filepath.EvalSymlinks() for all the directories before we use/compare them.
Maybe I can have a go at it. Would this approach be ok?
@difro: Yeah, that'd be great. Ideally, there's a shell integration test using symlinks too in test-env.sh. I can help out there if you don't feel like writing some shell code too though :)
Activity
technoweenie commentedon Nov 3, 2015
Ah, this is because the
init()function usesgit rev-parseto get the working directory. We may need to use that as the base for all of the other directories too. I'll add this to the list for v1.1.0, but I personally won't be able to work on that too much for a little while.difro commentedon Nov 3, 2015
Well, simplest solution would be cleaning paths with filepath.EvalSymlinks() for all the directories before we use/compare them.
Maybe I can have a go at it. Would this approach be ok?
technoweenie commentedon Nov 4, 2015
@difro: Yeah, that'd be great. Ideally, there's a shell integration test using symlinks too in test-env.sh. I can help out there if you don't feel like writing some shell code too though :)
difro commentedon Nov 5, 2015
yeah, skimmed over test-env.sh and I feel it's better that you take a look at it :)
git lfs env after applying #816
ttaylorr commentedon Apr 5, 2018
Hi @difro, just a quick ping to let you know that this issue is fixed in #818.