Skip to content

panic trying to track file from within subdirectory of submodule #310

Closed

Description

@kouk

Tried to track a file from within a subdirectory of a submodule and got a traceback. Tried the same command from the root of the submodule working directory and it succeded:

 [bigstash]C:\Users\Konstantinos\code\deepfreeze.io\static\assetsPS>git lfs track compiler.jar
panic: Error trying to create objects directory in 'C:\Users\Konstantinos\code\deepfreeze.io\static\.git\modules\static\
lfs\objects': mkdir C:\Users\Konstantinos\code\deepfreeze.io\static\.git: The system cannot find the path specified.

goroutine 16 [running]:
runtime.panic(0x732f80, 0xc082000b10)
        /opt/boxen/chgo/versions/1.3/src/pkg/runtime/panic.c:279 +0x11f
github.com/github/git-lfs/lfs.init┬╖2()
        /Users/rick/github/git-lfs/.vendor/src/github.com/github/git-lfs/lfs/lfs.go:87 +0x3ea
github.com/github/git-lfs/lfs.init()
        /Users/rick/github/git-lfs/.vendor/src/github.com/github/git-lfs/lfs/util.go:88 +0x4cb
github.com/github/git-lfs/commands.init()
        /Users/rick/github/git-lfs/.vendor/src/github.com/github/git-lfs/commands/commands_pre_push.go:129 +0xa5
main.init()
        /Users/rick/github/git-lfs/cmd/git-lfs/git-lfs.go:9 +0x4d

goroutine 19 [finalizer wait]:
runtime.park(0x414b30, 0x9b4a38, 0x9b2ba9)
        /opt/boxen/chgo/versions/1.3/src/pkg/runtime/proc.c:1369 +0xac
runtime.parkunlock(0x9b4a38, 0x9b2ba9)
        /opt/boxen/chgo/versions/1.3/src/pkg/runtime/proc.c:1385 +0x42
runfinq()
        /opt/boxen/chgo/versions/1.3/src/pkg/runtime/mgc0.c:2644 +0xdd
runtime.goexit()
        /opt/boxen/chgo/versions/1.3/src/pkg/runtime/proc.c:1445

 [bigstash]C:\Users\Konstantinos\code\deepfreeze.io\static\assetsPS>cat ..\.git
gitdir: ../.git/modules/static
 [bigstash]C:\Users\Konstantinos\code\deepfreeze.io\static\assetsPS>cd ..
 [bigstash]C:\Users\Konstantinos\code\deepfreeze.io\staticPS>git lfs track .\assets\compiler.jar
Tracking .\assets\compiler.jar
 [bigstash +1 ~0 -0 !]C:\Users\Konstantinos\code\deepfreeze.io\staticPS>

Version is git-lfs/0.5.1 (GitHub; windows amd64; git 1.9.4.msysgit.0; go 1.3)

Activity

  1. technoweenie commented on May 15, 2015

    @technoweenie
    Contributor

    Thanks for the report. I'm not too sure how Git LFS should behave here though. Is your submodule using Git LFS? Would you expect Git LFS to add the line to the .gitattributes inside the submodule, instead of the existing repo?

  2. kouk commented on May 15, 2015

    @kouk
    Author

    Regarding the submodule aspect of this issue, Git LFS seems to work OK. When I ran it from the submodule directory (the last command in the above transcript) it added the line to the .gitattributes file of the submodule. That's fine. The problem occured when I was inside a subfolder of this submodule and tried to track the file.

  3. michael-k commented on May 16, 2015

    @michael-k
    Contributor

    I can reproduce the issue under linux. It is not dependend on track. git lfs help leads to the same panic.

  4. added a commit that references this issue on May 16, 2015
    6d343ba
  5. added a commit that references this issue on May 21, 2015
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