Skip to content

Error when tracking in non-git directory #200

@PeterDaveHello

Description

@PeterDaveHello

I think git-lfs can catch this exception and said:
fatal: Not a git repository (or any of the parent directories): .git
like git always does.

Currently, I got this:

$ git lfs track "*.sj"
panic: Error trying to create objects directory in '/home/peter/.git/lfs/objects': mkdir /home/peter/.git/lfs/objects: permission denied

goroutine 16 [running]:
runtime.panic(0x71a440, 0xc208000910)
        /opt/boxen/chgo/versions/1.3/src/pkg/runtime/panic.c:279 +0xf5
github.com/github/git-lfs/lfs.init·2()
        /Users/rick/github/git-lfs/.vendor/src/github.com/github/git-lfs/lfs/lfs.go:87 +0x3e3
github.com/github/git-lfs/lfs.init()
        /Users/rick/github/git-lfs/.vendor/src/github.com/github/git-lfs/lfs/util.go:88 +0x382
github.com/github/git-lfs/pointer.init()
        /Users/rick/github/git-lfs/.vendor/src/github.com/github/git-lfs/pointer/smudge.go:88 +0x85
github.com/github/git-lfs/scanner.init()
        /Users/rick/github/git-lfs/.vendor/src/github.com/github/git-lfs/scanner/scanner.go:367 +0x71
github.com/github/git-lfs/commands.init()
        /Users/rick/github/git-lfs/.vendor/src/github.com/github/git-lfs/commands/commands.go:167 +0x7b
main.init()
        /Users/rick/github/git-lfs/cmd/git-lfs.go:9 +0x46

goroutine 17 [runnable]:
runtime.MHeap_Scavenger()
        /opt/boxen/chgo/versions/1.3/src/pkg/runtime/mheap.c:507
runtime.goexit()
        /opt/boxen/chgo/versions/1.3/src/pkg/runtime/proc.c:1445

goroutine 18 [runnable]:
bgsweep()
        /opt/boxen/chgo/versions/1.3/src/pkg/runtime/mgc0.c:1976
runtime.goexit()
        /opt/boxen/chgo/versions/1.3/src/pkg/runtime/proc.c:1445

goroutine 19 [runnable]:
runfinq()
        /opt/boxen/chgo/versions/1.3/src/pkg/runtime/mgc0.c:2606
runtime.goexit()
        /opt/boxen/chgo/versions/1.3/src/pkg/runtime/proc.c:1445

Thanks!

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