Skip to content

git lfs track doesn't make file paths relative to working dir #230

Closed

Description

@MSch

Given a git repo in /Users/msch/work/foo:

git lfs track /Users/msch/work/foo/testcases/bigfile.pdf

leads to this .gitattributes file:

/Users/msch/work/foo/testcases/bigfile.pdf filter=lfs -crlf

when it should lead to this .gitattributes file:

testcases/bigfile.pdf filter=lfs -crlf

Activity

  1. technoweenie commented on Apr 14, 2015

    @technoweenie
    Contributor

    Thanks, that's legit. I wonder if we should block any paths that start with /, unless they happen to match the current working directory?

  2. changed the title [-]git lfs track doesn't make file paths relative to GIT_DIR[/-] [+]git lfs track doesn't make file paths relative to working dir[/+] on Apr 14, 2015
  3. MSch commented on Apr 14, 2015

    @MSch
    Author

    IMO paths outside the working dir are invalid, so yeah. But so would be ../../*.pdf.

    The way I managed to find this was by dragging the bigger files from Finder.app to Terminal.app, expecting the paths to be resolved. If I had dragged files from e.g. the wrong working dir I'd have ended up with e.g. ../../*.pdf.

  4. michael-k commented on Jun 1, 2015

    @michael-k
    Contributor

    PR #356 takes care of absolute paths and paths outside the repository

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions