Skip to content

Unsupported mode 120000 panic while running 'git ls-tree' #15

Description

@sirnewton01

I checked out git from GitHub using the standard git tool: https://github.com/git/git

When I run 'git ls-tree' on a specific commit in that repository I get an error:

$ git ls-tree e3331758f12da22f4103eec7efe1b5304a9be5e9

panic: Unsupported mode 120000 in tree 313f70847d0dab2718d19201b5be3af52061c4da

goroutine 1 [running]:
github.com/driusan/dgit/git.TreeID.GetAllObjects(0x27ab0d7d84703f31, 0xf53abeb50192d118, 0xdac46120, 0xc42009ad80, 0x0, 0x0, 0x0, 0x0, 0x27ab0d7d84703f31, 0xf53abeb50192d118)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:482 +0x92f
github.com/driusan/dgit/git.expandGitTreeIntoIndexesRecursive(0xc42009ad80, 0x27ab0d7d84703f31, 0xf53abeb50192d118, 0xc4dac46120, 0x0, 0x0, 0xdac40000, 0x0, 0x0, 0x1, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/expandtree.go:38 +0x76
github.com/driusan/dgit/git.expandGitTreeIntoIndexes(0xc42009ad80, 0x13746e0, 0xc423be79e0, 0x100000001010000, 0x15, 0x30, 0xc42009e1b0, 0xc423fb7460, 0x10c8795)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/expandtree.go:26 +0x15a
github.com/driusan/dgit/git.lsTree(0xc42009ad80, 0x1, 0x28, 0x0, 0x13746e0, 0xc423be79e0, 0x0, 0x0, 0x0, 0x0, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/lstree.go:161 +0x72
github.com/driusan/dgit/git.LsTree(0xc42009ad80, 0x1, 0x28, 0x0, 0x13746e0, 0xc423be79e0, 0x0, 0x0, 0x0, 0x11dfd25, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/lstree.go:61 +0x11e5
github.com/driusan/dgit/cmd.LsTree(0xc42009ad80, 0xc42009a0b0, 0x1, 0x1, 0xc42009ad80, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/cmd/lstree.go:47 +0x699
main.main()
	/Users/cmcgee/go/src/github.com/driusan/dgit/main.go:178 +0x2acd

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions