Giter VIP home page Giter VIP logo

dgit's People

Contributors

bakul avatar driusan avatar guidopola avatar halfwit avatar jboverfelt avatar sirnewton01 avatar sqs avatar three7six avatar tie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dgit's Issues

rev-parse missing treeish:file syntax

You should be able to do things like "git rev-parse foo:bar/baz" to refer to the file bar/baz in the tree foo. This isn't parsed correctly and instead looks for a commit named "foo:bar/baz" currently.

Tests are noisy

The magic of SetOutput from main.go doesn't happen with tests, causing them to be noisy. (There seems to be one log statement generating a lot of the noise, but since the defaults just tell you the time it's not obvious where it is...)

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

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

Error when providing --porcelain to the status subcommand without a value

When invoking dgit status --porcelain somedir fails with an error where it cannot parse somedir as an integer. The problem is the the porcelain switch is parsed as an IntVar, but in this case it interprets somedir as the value to the porcelain switch. In the standard git the porcelain switch has an optional value and that value must be provided after an equal sign resolving the ambiguity. No value is interpreted to be the value 1.

What is the mnemonic for this project?

I keep trying to think how to pronounce the name of this project.

Is the 'd' silent? Maybe we pronounce the the first letter like dee-git? Another option could be the pronounce it like 'dig-it'?

In any case, I think that we could add a short sentence on the readme for a bit of fun and for clarification. It would be a terrible tragedy for people to have different pronunciations floating around in their heads. "Hmm, Is it Sa - eww - ron or Sore - ron?"

Also, there's a bit of the old name (go-git) floating around in the help docs that could be cleaned up.

Error updating head reference while cloning

When I try to clone a specific git repository I am getting an error updating head reference the following message:
"open .git/refs/heads/refs/heads/master: '.git/refs/heads/refs' does not exist"

The source of the error appears to come from cmd/reset.go around here:
https://github.com/driusan/go-git/blob/master/cmd/reset.go#L59

The branch name that comes back from c.GetHeadBranch() is "refs/heads/master," which is being appended to "refs/heads" creating a path that doesn't exist within the git repository.

Infinite recursion when running git merge origin/master

While running dgit merge origin/master an infinite recursion happens. Here is a snippet of the stack trace from kill -ABRT:

goroutine 1 [runnable]:
syscall.Syscall(0x3, 0x5, 0xc4203be000, 0x14, 0x14, 0x0, 0x0)
	/usr/local/go/src/syscall/asm_darwin_amd64.s:16 +0x5
syscall.read(0x5, 0xc4203be000, 0x14, 0x14, 0xc4200ac401, 0x0, 0x0)
	/usr/local/go/src/syscall/zsyscall_darwin_amd64.go:947 +0x5f
syscall.Read(0x5, 0xc4203be000, 0x14, 0x14, 0x14, 0x0, 0x0)
	/usr/local/go/src/syscall/syscall_unix.go:162 +0x49
internal/poll.(*FD).Read(0xc4200b4d20, 0xc4203be000, 0x14, 0x14, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:153 +0x116
os.(*File).read(0xc4200b2080, 0xc4203be000, 0x14, 0x14, 0x7, 0x2259488, 0x1050940)
	/usr/local/go/src/os/file_unix.go:226 +0x4e
os.(*File).Read(0xc4200b2080, 0xc4203be000, 0x14, 0x14, 0x14, 0xc4203be000, 0x0)
	/usr/local/go/src/os/file.go:107 +0x6a
io.ReadAtLeast(0x13961e0, 0xc4200b2080, 0xc4203be000, 0x14, 0x14, 0x14, 0x12e1be0, 0x1317401, 0xc4203be000)
	/usr/local/go/src/io/io.go:309 +0x86
io.ReadFull(0x13961e0, 0xc4200b2080, 0xc4203be000, 0x14, 0x14, 0x14, 0x0, 0x0)
	/usr/local/go/src/io/io.go:327 +0x58
encoding/binary.Read(0x13961e0, 0xc4200b2080, 0x139a7e0, 0x151f3b0, 0x1311ba0, 0xc42042f958, 0x0, 0x0)
	/usr/local/go/src/encoding/binary/binary.go:245 +0xf48
github.com/driusan/dgit/git.getPackFileObject(0x13961e0, 0xc4200b2080, 0x13984e0, 0xc4200b2088, 0x6d54d16fc180d95e, 0x8edd5d6f707675dc, 0x7e4d142e, 0xc4205460c0, 0x1012368, 0x20, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/indexpack.go:235 +0x2c2
github.com/driusan/dgit/git.(*Client).getPackedObject(0xc4200ac300, 0xc4200c6400, 0x6f, 0x6d54d16fc180d95e, 0x8edd5d6f707675dc, 0xc47e4d142e, 0x0, 0x0, 0x0, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/objects.go:156 +0x1a0
github.com/driusan/dgit/git.(*Client).GetObject(0xc4200ac300, 0x6d54d16fc180d95e, 0x8edd5d6f707675dc, 0xc47e4d142e, 0x0, 0x0, 0x0, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/objects.go:179 +0xe25
github.com/driusan/dgit/git.CommitID.Parents(0x6d54d16fc180d95e, 0x8edd5d6f707675dc, 0xc47e4d142e, 0xc4200ac300, 0xc420546600, 0x1270c3f, 0xc4201de230, 0x1, 0x8)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:117 +0x5d
github.com/driusan/dgit/git.CommitID.AncestorMap(0x6d54d16fc180d95e, 0x8edd5d6f707675dc, 0xc47e4d142e, 0xc4200ac300, 0xc420186360, 0x1, 0x1)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:170 +0xcc
github.com/driusan/dgit/git.CommitID.AncestorMap(0xb52dd8645c105354, 0xe535f57c73b0a6cd, 0xc4edeef6f1, 0xc4200ac300, 0xc42013d240, 0x1, 0x1)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:183 +0x320
github.com/driusan/dgit/git.CommitID.AncestorMap(0x3e4bf91df946be93, 0xbd5a7dac21cf95c4, 0xc459574d96, 0xc4200ac300, 0xc4204b5d40, 0x1, 0x1)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:183 +0x320
github.com/driusan/dgit/git.CommitID.AncestorMap(0x2c217e3b3c7f732c, 0x853dff90415dfec5, 0xc4926fffd8, 0xc4200ac300, 0xc42031a700, 0x1, 0x1)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:183 +0x320
github.com/driusan/dgit/git.CommitID.AncestorMap(0xe7ff12d06c934b81, 0x47e9eacc3e7a30a0, 0xc4f19d43c8, 0xc4200ac300, 0xc4204c8e00, 0x1, 0x1)

This is happening with the GitHub.com/google/protobuf repository.

Note that if I run git merge origin the following error occurs:
read /Users/cmcgee/go/src/github.com/golang/protobuf/.git/refs/remotes/origin: is a directory

It should probably return a friendlier message:
merge: origin - not something we can merge

Unable to push commit to github

Clone a simple project (sirnewton01/p9-tutorial) onto my local system. Make a small modification to one of the text files. Add it and commit it with a message. Change .git/config to add the following line.

[branch "master"]
remote = origin

merge = refs/heads/master

Run 'go-git push master' and authenticate against github to push the change.

The flow gets all of the way to retrieve.go SendPack(). The HTTP request goes out to github and the response is 200 OK, but nothing seems to happen on github.

Hang on git write-tree

While attempting a write-tree command, such as dgit write-tree --prefix=path3 I encountered a hang. The dgit process consumes a lot of CPU and begins consume a lot of memory. Here is the stack trace I was able to obtain using the "kill -ABRT" trick:

goroutine 1 [runnable]:
strings.Split(0xc420016510, 0xb, 0x133475d, 0x1, 0x1, 0xc70014e000, 0x4dd84)
	/usr/local/go/src/strings/strings.go:298 +0x8e
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc700076000, 0x4dd83, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:73 +0x1d3
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6ffdee000, 0x4dd7d, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6ffb66000, 0x4dd77, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6ff8de000, 0x4dd71, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x0, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6ff656000, 0x4dd6b, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6ff3ce000, 0x4dd65, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6ff146000, 0x4dd5f, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6feebe000, 0x4dd59, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6fec36000, 0x4dd53, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x0, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6fe9ae000, 0x4dd4d, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x0, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6fe726000, 0x4dd47, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6fe49e000, 0x4dd41, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6fe216000, 0x4dd3b, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6fdf8e000, 0x4dd35, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6fdd06000, 0x4dd2f, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6fda7e000, 0x4dd29, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x0, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6fd7f6000, 0x4dd23, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x0, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6fd56e000, 0x4dd1d, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6fd2e6000, 0x4dd17, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x0, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6fd05e000, 0x4dd11, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6fcdd6000, 0x4dd0b, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6fcb4e000, 0x4dd05, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6fc8c6000, 0x4dcff, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x0, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6fc63e000, 0x4dcf9, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6fc3b6000, 0x4dcf3, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6fc12e000, 0x4dced, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6fbea6000, 0x4dce7, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6fbc1e000, 0x4dce1, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x0, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6fb996000, 0x4dcdb, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6fb70e000, 0x4dcd5, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6fb486000, 0x4dccf, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6fb1fe000, 0x4dcc9, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6faf76000, 0x4dcc3, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6facee000, 0x4dcbd, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6faa66000, 0x4dcb7, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6fa7de000, 0x4dcb1, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6fa556000, 0x4dcab, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6fa2ce000, 0x4dca5, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6fa046000, 0x4dc9f, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x0, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f9dbe000, 0x4dc99, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f9b36000, 0x4dc93, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f98ae000, 0x4dc8d, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f9626000, 0x4dc87, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x0, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f939e000, 0x4dc81, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f9116000, 0x4dc7b, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f8e8e000, 0x4dc75, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f8c06000, 0x4dc6f, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f897e000, 0x4dc69, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f86f6000, 0x4dc63, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f846e000, 0x4dc5d, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x0, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f81e6000, 0x4dc57, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f7f5e000, 0x4dc51, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f7cd6000, 0x4dc4b, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f7a4e000, 0x4dc45, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f77c6000, 0x4dc3f, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f753e000, 0x4dc39, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f72b6000, 0x4dc33, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f702e000, 0x4dc2d, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f6da6000, 0x4dc27, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f6b1e000, 0x4dc21, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f6896000, 0x4dc1b, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x0, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f660e000, 0x4dc15, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x0, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f6386000, 0x4dc0f, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f60fe000, 0x4dc09, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f5e76000, 0x4dc03, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f5bee000, 0x4dbfd, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f5966000, 0x4dbf7, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f56de000, 0x4dbf1, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f5456000, 0x4dbeb, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f51ce000, 0x4dbe5, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f4f46000, 0x4dbdf, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f4cbe000, 0x4dbd9, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x0, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f4a36000, 0x4dbd3, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f47ae000, 0x4dbcd, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f4526000, 0x4dbc7, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f429e000, 0x4dbc1, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f4016000, 0x4dbbb, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f3d8e000, 0x4dbb5, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f3b06000, 0x4dbaf, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f387e000, 0x4dba9, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f35f6000, 0x4dba3, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f336e000, 0x4db9d, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x0, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f30e6000, 0x4db97, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f2e5e000, 0x4db91, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f2bd6000, 0x4db8b, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f294e000, 0x4db85, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f26c6000, 0x4db7f, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x0, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f243e000, 0x4db79, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x0, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f21b6000, 0x4db73, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f1f2e000, 0x4db6d, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f1ca6000, 0x4db67, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f1a1e000, 0x4db61, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f1796000, 0x4db5b, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f150e000, 0x4db55, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f1286000, 0x4db4f, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f0ffe000, 0x4db49, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f0d76000, 0x4db43, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f0aee000, 0x4db3d, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
github.com/driusan/dgit/git.writeTree(0xc420010db0, 0xc6f0870000, 0x4db37, 0xc42010c340, 0x1, 0x3, 0x0, 0x0, 0x0, 0x1270467, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/writetree.go:139 +0x317
...additional frames elided...

TestLsFiles failing on Mac

When running with Go 1.10 on Mac OS X 10.13 (High Sierra) this test is failing consistently.

=== RUN   TestLsFiles
--- FAIL: TestLsFiles (0.00s)
	lsfiles_test.go:139: Case 2: Unexpected number of results: got [] want [anothertest/bar foo test/bar]
	lsfiles_test.go:139: Case 3: Unexpected number of results: got [] want [bar]
	lsfiles_test.go:139: Case 4: Unexpected number of results: got [] want [../anothertest/bar ../foo bar]
	lsfiles_test.go:148: Case 5 index 0: got ../../../../../../../../var/folders/sr/34ggszv967x3_b1gsdw2hsx80000gp/T/gitupdateindextest385424607/anothertest/bar want ../anothertest/bar
	lsfiles_test.go:148: Case 5 index 1: got ../../../../../../../../var/folders/sr/34ggszv967x3_b1gsdw2hsx80000gp/T/gitupdateindextest385424607/foo want ../foo
	lsfiles_test.go:148: Case 5 index 2: got ../../../../../../../../var/folders/sr/34ggszv967x3_b1gsdw2hsx80000gp/T/gitupdateindextest385424607/test/bar want bar
	lsfiles_test.go:139: Case 6: Unexpected number of results: got [] want [anothertest/bar]

Missing $home/.gitconfig causes panic during clone

meiling% cd /tmp
meiling% dgit clone https://github.com/driusan/dgit
&{remote origin map[url:https://github.com/driusan/dgit]}&{branch master map[remote:origin]}&{branch master map[remote:origin merge:refs/heads/master]}
Indexing objects: 0% (1/1624)
...
Indexing objects: 100% (1624/1624)Creating /tmp/dgit/.git/refs/remotes/origin/AddGitPush with 506bee2c0fd30c1344421a48d610c454ba22da32Creating /tmp/dgit/.git/refs/remotes/origin/FixBranchCmd with 9d86dddf6f8b023e42fd866f7de92870579fcfbcCreating /tmp/dgit/.git/refs/remotes/origin/RefactorGitReset with 891eb05fd3f30148bc556902445974716624f181Creating /tmp/dgit/.git/refs/remotes/origin/RefactorMergeBase with 52cf23267abdada3559ba04c3d8cf4879b4c83e9Creating /tmp/dgit/.git/refs/remotes/origin/RefixPush with 9eda1f0b964db64966a8ad64869084494fbc8379Creating /tmp/dgit/.git/refs/remotes/origin/master with 8f496b2130264f1bb080f61e46b1f44c4d9666dfpanic: open /usr/glenda/.gitconfig: '/usr/glenda/.gitconfig' does not exist

goroutine 1 [running]:
github.com/driusan/dgit/git.(*Client).GetAuthor(0x420874b70, 0x420a46b00, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/glenda/go/src/github.com/driusan/dgit/git/client.go:258 +0x346
github.com/driusan/dgit/git.updateReflog(0x420874b70, 0x420cab601, 0x4216421e0, 0x25, 0x802820, 0x42163fd60, 0x802820, 0x42163fda0, 0x421642180, 0x26, ...)
/usr/glenda/go/src/github.com/driusan/dgit/git/updateref.go:34 +0xcd
github.com/driusan/dgit/git.UpdateRefSpec(0x420874b70, 0x10000, 0x802820, 0x42163fd60, 0x0, 0x0, 0x0, 0x4ed2b8, 0x11, 0x1b4f2630216b498f, ...)
/usr/glenda/go/src/github.com/driusan/dgit/git/updateref.go:87 +0x1c2
github.com/driusan/dgit/cmd.Clone(0x420874b70, 0x420874080, 0x1, 0x1, 0xffffffffffffffff, 0x801820)
/usr/glenda/go/src/github.com/driusan/dgit/cmd/clone.go:74 +0x596
main.main()
/usr/glenda/go/src/github.com/driusan/dgit/main.go:118 +0x21e5

All subcommands can use the flag package to describe their options

It turns out that with a little customization the flag package can support multiple instances of the same flag, aliased flags and flags that detect when they are not specified. This is probably sufficient to convert all of the subcommands over and get the benefit of the scaffolding in place to display the global and local options.

The key is the flag.Value and flag.Getter interfaces in conjunction with the flag.Var() function. This allows one to define their own value type and capture the Get() and Set() calls. We could introduce some optional, alias and multi value string values in dgit and use those throughout.

For the non-flag portions of the subcommands (e.g. "...", "") there is a way to add those details to the usage from the main.go. See #49 for examples.

Switch to using a logging package instead of Printf's

There are some fmt.Printf's in the code base that provide some debugging information. If we switch to using a logging package the logging level can be adjusted at runtime without have to recompile removing/adding Printf's.

Git commit exit code is 0 if permission checks fail on .git/objects

Create a git repository. Change the filesystem permissions to prevent writes to the .git/objects/?? files.

chmod a-w .git/objects .git/objects/??

Try committing. The commit fails with an error message.

Err: No changes staged for commit.

But, the exit code is 0, which would cause an automated script to assume that the commit succeeded.

$ echo $?
0

Go get exits with non-zero exit code

When writing some go get tests to verify that it is working with dgit I noticed that it is failing, even though the git repo is present. If you check the exit code after go get it is actually non-zero. The reason appears to be that it invokes the submodule subcommand and fails on that.

Here is an excerpt from the go get test script:

 cd /home/travis/gopath/src/github.com/golang/protobuf; git submodule update --init --recursive

Segmentation fault when running git config with "--bool" switch

Try creating a new git repository.

$ git init foo

Now change directories into the git repository and getting the core.bare config parameter for it.

$ cd foo
$ git config --bool core.bare

The command produces a segmentation fault:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x123ce9e]

goroutine 1 [running]:
github.com/driusan/dgit/git.(*GitConfig).SetConfig(0xc420065b18, 0x7ffeefbffbeb, 0x6, 0x7ffeefbffbf2, 0x9)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/config.go:56 +0x28e
github.com/driusan/dgit/cmd.Config(0xc4200a6d50, 0xc4200ae0e0, 0x2, 0x2)
	/Users/cmcgee/go/src/github.com/driusan/dgit/cmd/config.go:61 +0x41d
main.main()
	/Users/cmcgee/go/src/github.com/driusan/dgit/main.go:124 +0x249a

If you run git config --list it seems that it can't read any of the configuration parameters.

Long file names not supported

Reading a long file name ( >= 0xFFF) fails to be read into the index with a panic, because it doesn't know how many characters to skip over to get to the next index entry.

Hang on dgit rev-list

When I perform a rev-list on a particular git repo dgit just hangs there consuming the CPU.

$ dgit rev-list HEAD

When I use the kill -ABRT trick after letting it run for a minute I get this information.

SIGABRT: abort
PC=0x1073e76 m=0 sigcode=0

goroutine 1 [syscall]:
syscall.Syscall(0x3, 0x3, 0xc423a50f38, 0x4, 0xc420000180, 0xc420020140, 0xc423c33bd8)
	/usr/local/go/src/syscall/asm_darwin_amd64.s:16 +0x5 fp=0xc423c33b78 sp=0xc423c33b70 pc=0x1073e45
syscall.read(0x3, 0xc423a50f38, 0x4, 0x8, 0xc420020101, 0x0, 0x0)
	/usr/local/go/src/syscall/zsyscall_darwin_amd64.go:947 +0x5f fp=0xc423c33bd8 sp=0xc423c33b78 pc=0x107314f
syscall.Read(0x3, 0xc423a50f38, 0x4, 0x8, 0x4, 0x0, 0x0)
	/usr/local/go/src/syscall/syscall_unix.go:162 +0x49 fp=0xc423c33c20 sp=0xc423c33bd8 pc=0x1070de9
internal/poll.(*FD).Read(0xc4200ac820, 0xc423a50f38, 0x4, 0x8, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:153 +0x116 fp=0xc423c33c70 sp=0xc423c33c20 pc=0x1085896
os.(*File).read(0xc4200aa038, 0xc423a50f38, 0x4, 0x8, 0x4, 0x0, 0x0)
	/usr/local/go/src/os/file_unix.go:226 +0x4e fp=0xc423c33cb8 sp=0xc423c33c70 pc=0x108ae0e
os.(*File).Read(0xc4200aa038, 0xc423a50f38, 0x4, 0x8, 0x8, 0x0, 0x0)
	/usr/local/go/src/os/file.go:107 +0x6a fp=0xc423c33d28 sp=0xc423c33cb8 pc=0x1088d0a
io.ReadAtLeast(0x13749e0, 0xc4200aa038, 0xc423a50f38, 0x4, 0x8, 0x4, 0x12ceac0, 0x1, 0xc423a50f38)
	/usr/local/go/src/io/io.go:309 +0x86 fp=0xc423c33d88 sp=0xc423c33d28 pc=0x106b186
io.ReadFull(0x13749e0, 0xc4200aa038, 0xc423a50f38, 0x4, 0x8, 0x4, 0x0, 0x0)
	/usr/local/go/src/io/io.go:327 +0x58 fp=0xc423c33de0 sp=0xc423c33d88 pc=0x106b2f8
encoding/binary.Read(0x13749e0, 0xc4200aa038, 0x1378d20, 0x14f43b0, 0x12bdd60, 0xc421a0b5f4, 0x0, 0x0)
	/usr/local/go/src/encoding/binary/binary.go:171 +0xe5 fp=0xc423c33f38 sp=0xc423c33de0 pc=0x1104785
github.com/driusan/dgit/git.getPackFileObject(0x13749e0, 0xc4200aa038, 0x1376a80, 0xc4200aa040, 0xb6f0f479ed814309, 0xf62f20a12d50307f, 0x45162627, 0xc423c344d8, 0x1012368, 0x20, ...)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/indexpack.go:241 +0x3bc fp=0xc423c34470 sp=0xc423c33f38 pc=0x124950c
github.com/driusan/dgit/git.(*Client).getPackedObject(0xc42009adb0, 0xc42008c2a0, 0x55, 0xb6f0f479ed814309, 0xf62f20a12d50307f, 0xc445162627, 0x0, 0x0, 0x0, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/objects.go:156 +0x1a0 fp=0xc423c344e8 sp=0xc423c34470 pc=0x1254c90
github.com/driusan/dgit/git.(*Client).GetObject(0xc42009adb0, 0xb6f0f479ed814309, 0xf62f20a12d50307f, 0x45162627, 0x0, 0x0, 0x0, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/objects.go:179 +0xe25 fp=0xc423c347f0 sp=0xc423c344e8 pc=0x1255d55
github.com/driusan/dgit/git.CommitID.Parents(0xb6f0f479ed814309, 0xf62f20a12d50307f, 0xc445162627, 0xc42009adb0, 0x0, 0x8, 0xc423c349d7, 0x1, 0x1)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:116 +0x5d fp=0xc423c34970 sp=0xc423c347f0 pc=0x1262cdd
github.com/driusan/dgit/git.CommitID.ancestors(0xb6f0f479ed814309, 0xf62f20a12d50307f, 0x45162627, 0xc42009adb0, 0x1, 0xc42065c0c0, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:350 +0xc3 fp=0xc423c34b08 sp=0xc423c34970 pc=0x12649c3
github.com/driusan/dgit/git.CommitID.ancestors(0xef695d7b2881fffa, 0xcc19392de28d4014, 0x6acf07f, 0xc42009adb0, 0x1, 0xc421e684c0, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c34ca0 sp=0xc423c34b08 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0xc4782e4875099c92, 0xc6ea8c0a010b68bd, 0xa06011c3, 0xc42009adb0, 0x1, 0xc4239905c0, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c34e38 sp=0xc423c34ca0 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0xea4fbc4ed63224f7, 0x7bdb4d4614512680, 0x3396ce25, 0xc42009adb0, 0x1, 0xc423ad69c0, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c34fd0 sp=0xc423c34e38 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0x9056090ca955fc23, 0x7901469b7895b58c, 0x3b1562c0, 0xc42009adb0, 0x1, 0xc4220824e0, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c35168 sp=0xc423c34fd0 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0x793b16bb31b08e69, 0xec1dde688316907f, 0x2771a502, 0xc42009adb0, 0x1, 0xc4245cc060, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c35300 sp=0xc423c35168 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0x596c948698372210, 0x80e79bd771a873f6, 0x4687ae4f, 0xc42009adb0, 0x1, 0xc423dd04c0, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c35498 sp=0xc423c35300 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0xa9af6368bae26316, 0x29526b28b384dd49, 0xa9da4900, 0xc42009adb0, 0x1, 0xc4245cc460, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c35630 sp=0xc423c35498 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0x5c9dc965f5435ff3, 0x9f8d44820b21acbb, 0x7965c44, 0xc42009adb0, 0x1, 0xc423e74860, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c357c8 sp=0xc423c35630 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0xf1fd881e68f500f3, 0x998fbb0c10398105, 0xc529500f, 0xc42009adb0, 0x1, 0xc423bfc440, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c35960 sp=0xc423c357c8 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0x3ac0c13986472942, 0x55b64303ead3e76, 0xa13ee9f5, 0xc42009adb0, 0x1, 0xc421d52060, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c35af8 sp=0xc423c35960 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0x3fbbcd4bfcea2bcc, 0xbac4044743c9b9a4, 0x47f1e030, 0xc42009adb0, 0x1, 0xc420e3a360, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c35c90 sp=0xc423c35af8 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0xda9b8cbb49dd34da, 0x45b3d563f498bfb5, 0x9bdb7639, 0xc42009adb0, 0x1, 0xc421d522a0, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c35e28 sp=0xc423c35c90 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0x4f31d8448ea92b24, 0xa314969340d284b1, 0xdb24b4c9, 0xc42009adb0, 0x1, 0xc4246646a0, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c35fc0 sp=0xc423c35e28 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0x2dc732d068be2a1f, 0x35957112fd5a0c45, 0x8f25e696, 0xc42009adb0, 0x1, 0xc421f60360, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c36158 sp=0xc423c35fc0 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0x1f214efc9a77556b, 0xf2a5819412c551f0, 0x6f38ea0, 0xc42009adb0, 0x1, 0xc421a26060, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c362f0 sp=0xc423c36158 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0x47ae343ff1c373bd, 0x5b78bba47a7756b9, 0xe58e0791, 0xc42009adb0, 0x1, 0xc421e5c320, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c36488 sp=0xc423c362f0 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0x7e1d3c43396eacf0, 0x9b1ed0a47a203993, 0x8a5ba0f7, 0xc42009adb0, 0x1, 0xc421a26100, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c36620 sp=0xc423c36488 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0xd0b0334872dfb91f, 0x2c66a88c6effadf, 0xc7ac647, 0xc42009adb0, 0x1, 0xc42404a500, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c367b8 sp=0xc423c36620 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0x90bcdb57e1a3f953, 0x376d34732cac021a, 0x8c97245e, 0xc42009adb0, 0x1, 0xc423c04280, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c36950 sp=0xc423c367b8 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0x932cc340cec8f80b, 0xe4cc5ea4016c7de9, 0xabb24dd9, 0xc42009adb0, 0x1, 0xc42440e060, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c36ae8 sp=0xc423c36950 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0xca41cc653a8927ea, 0x86586aaa660471d2, 0x1e2ff26f, 0xc42009adb0, 0x1, 0xc42201c1a0, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c36c80 sp=0xc423c36ae8 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0xf8656cfdf0aab2b3, 0x6cd977b16b635f3d, 0x139b0788, 0xc42009adb0, 0x1, 0xc42440ffa0, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c36e18 sp=0xc423c36c80 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0x6e77519fd6e756a8, 0xa7381f1f6f3d6340, 0xd5f064fd, 0xc42009adb0, 0x1, 0xc420e823a0, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c36fb0 sp=0xc423c36e18 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0xcd3a3dc1b07d99ac, 0xba95f09fc7b6fce8, 0x6971d26b, 0xc42009adb0, 0x1, 0xc4246261e0, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c37148 sp=0xc423c36fb0 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0x36b647fa7c4ab793, 0x31037dbc33b060c0, 0xe241789f, 0xc42009adb0, 0x1, 0xc420c70060, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c372e0 sp=0xc423c37148 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0xcb3aefd970bb82fa, 0xc7b8ab3dfcd476a, 0x62c30aa4, 0xc42009adb0, 0x1, 0xc423c3c100, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c37478 sp=0xc423c372e0 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0xa80c5c8d58400211, 0x598f0652da553b8d, 0x7d36d6d8, 0xc42009adb0, 0x1, 0xc420c71cc0, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c37610 sp=0xc423c37478 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0x23f8f5f3560aafeb, 0xb526d68fbc6641df, 0xdc64f823, 0xc42009adb0, 0x1, 0xc423dda0c0, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c377a8 sp=0xc423c37610 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0xe598878d0ec4fef3, 0x93ef3a27a9053f31, 0x9e51e42f, 0xc42009adb0, 0x1, 0xc420ddbde0, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c37940 sp=0xc423c377a8 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0x656844cf809e20f0, 0xdb5b4c1b8830773e, 0x9a38c75f, 0xc42009adb0, 0x1, 0xc423aec1e0, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c37ad8 sp=0xc423c37940 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0xda92206198e58e20, 0x4e0ddde8c0c12a89, 0x76f0c409, 0xc42009adb0, 0x1, 0xc424064100, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c37c70 sp=0xc423c37ad8 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0xf46b40e57872b99e, 0xfc669435fae1e763, 0x269f85a9, 0xc42009adb0, 0x1, 0xc420eb4060, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c37e08 sp=0xc423c37c70 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0x4fe4006c5d1cfa90, 0xdb1540cfa01d904c, 0x3ca6e91, 0xc42009adb0, 0x1, 0xc4244ec020, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c37fa0 sp=0xc423c37e08 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0x5f69a9d00d7df202, 0xb5a297dd3d7c33a8, 0x73ec0aad, 0xc42009adb0, 0x1, 0xc420eb5c60, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c38138 sp=0xc423c37fa0 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0xc12449dd363484ed, 0x50af3dc70c826906, 0xbddab4f0, 0xc42009adb0, 0x1, 0xc423fe2060, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c382d0 sp=0xc423c38138 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0x87416103697209a9, 0x371a56eede6d586c, 0xe5c886b6, 0xc42009adb0, 0x1, 0xc424186040, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c38468 sp=0xc423c382d0 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0x94dc95f59cff6380, 0x10ae10337da2e714, 0x83c8f531, 0xc42009adb0, 0x1, 0xc421ee0060, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c38600 sp=0xc423c38468 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0x13a19acec03d8f07, 0xb4119c5eebcf77ce, 0xfe7da9ea, 0xc42009adb0, 0x1, 0xc421fbdf60, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c38798 sp=0xc423c38600 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0x38d57234c3bbe192, 0x58da379df333599d, 0x5330e0e7, 0xc42009adb0, 0x1, 0xc421ee1b20, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c38930 sp=0xc423c38798 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0x69cac7b1d561368d, 0xc68858a02536868a, 0xc1d30460, 0xc42009adb0, 0x1, 0xc423eb1f20, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c38ac8 sp=0xc423c38930 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0xac20d962e737900, 0xe33d59d54380a6b2, 0x7f37f158, 0xc42009adb0, 0x1, 0xc423e49fa0, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c38c60 sp=0xc423c38ac8 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0x9b83600885dab85e, 0x87b89e0780ab38df, 0x3144765b, 0xc42009adb0, 0x1, 0xc424440060, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c38df8 sp=0xc423c38c60 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0x1c44615159d9a26d, 0x46ddb879f5b1d1be, 0x208e0a97, 0xc42009adb0, 0x1, 0xc423d45ec0, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c38f90 sp=0xc423c38df8 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0x6a6f40bf34444018, 0xcfc52033d72e896f, 0xdd87c19c, 0xc42009adb0, 0x1, 0xc424441920, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c39128 sp=0xc423c38f90 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0xcdb71a637b2422cf, 0x843f5817992801fe, 0x326feadf, 0xc42009adb0, 0x1, 0xc423a97d20, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c392c0 sp=0xc423c39128 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0x423ebe57bf2a5d08, 0xe47fc2c87d0bad4c, 0x8e252119, 0xc42009adb0, 0x1, 0xc423b49e40, 0x0, 0x1, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c39458 sp=0xc423c392c0 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.ancestors(0x2fa22df1581733e3, 0x30b5e1efc7ee0341, 0xe9e59b4a, 0xc42009adb0, 0x13353d4, 0x6, 0xe9e59b4a, 0x1377b80, 0xc4200b40e0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:357 +0x43c fp=0xc423c395f0 sp=0xc423c39458 pc=0x1264d3c
github.com/driusan/dgit/git.CommitID.Ancestors(0x2fa22df1581733e3, 0x30b5e1efc7ee0341, 0xe9e59b4a, 0xc42009adb0, 0x2fa22df1581733e3, 0x30b5e1efc7ee0341, 0xc4e9e59b4a, 0x0, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/sha1.go:303 +0x5a fp=0xc423c396a0 sp=0xc423c395f0 pc=0x126475a
github.com/driusan/dgit/git.ParsedRevision.Ancestors(0x2fa22df1581733e3, 0x30b5e1efc7ee0341, 0xe9e59b4a, 0xc42009adb0, 0xc4200d2380, 0x1, 0x1, 0x0, 0x0)
	/Users/cmcgee/go/src/github.com/driusan/dgit/git/revparse.go:47 +0xd9 fp=0xc423c39720 sp=0xc423c396a0 pc=0x12611e9
github.com/driusan/dgit/cmd.RevList(0xc42009adb0, 0xc42009a0b0, 0x1, 0x1, 0x0, 0x0, 0x0, 0x3, 0x5)
	/Users/cmcgee/go/src/github.com/driusan/dgit/cmd/rev-list.go:65 +0x8f5 fp=0xc423c39b28 sp=0xc423c39720 pc=0x128c0c5
main.main()
	/Users/cmcgee/go/src/github.com/sirnewton01/dgit/main.go:179 +0x868 fp=0xc423c39f88 sp=0xc423c39b28 pc=0x1291e78
runtime.main()
	/usr/local/go/src/runtime/proc.go:198 +0x212 fp=0xc423c39fe0 sp=0xc423c39f88 pc=0x102c472
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc423c39fe8 sp=0xc423c39fe0 pc=0x1055e81

rax    0x4
rbx    0x0
rcx    0xc423c33b70
rdx    0x0
rdi    0x3
rsi    0xc423a50f38
rbp    0xc423c33bc8
rsp    0xc423c33b70
r8     0x0
r9     0x0
r10    0x0
r11    0x206
r12    0xf4
r13    0xf3
r14    0x200
r15    0x1054c10
rip    0x1073e76
rflags 0x206
cs     0x7
fs     0x0
gs     0x0

I have attached the git repository that exhibits the problem.
badrepo2.zip

When pushing foo.pack is left behind

Patch should fix, seems that the defer was left commented out:

70c70
< 			//defer os.Remove("foo.pack")
---
> 			defer os.Remove("foo.pack")
79a80
> 

cat-file missing --batch mode

Most of the test cases in the official git cat-file test are failing because --batch isn't implemented.

This is likely masking other failures where the test using --batch is actually testing something.

Clone needs refactoring

The cmd/Clone function predates the repo being converted into a cmd and a git package, and directly invokes other commands in the cmd package. It should be refactored to only use the git package, so that we can improve the test coverage of it.

(There are a few other commands in this boat, but #69 just reminded me of this one. )

Test suite covering basic git collaboration

The second goal of dgit is to enable simple collaborative interactions. It will be good to build a test suite that covers typical interactions when working with a small project so that we can understand what remains, if anything, to achieve that goal. Once developed, the test suite may fail with the current implementation, but it will be useful to determine the prioritization of bugs/enhancements.

Symbolic link support is not working

Symbolic links are not working in a few different ways. For example, if you have a broken symbolic link that points to a non-existent file/folder and the target has a space in it when you run this command it fails:

$ git update-index --add link
link does not exist and --remove not passed

If you have a symbolic link to a file and the link is not broken you can run this command:

$ git update-index --add foo.txt

However, it adds it to the index as a regular file, not a symbolic link, which you can see by running a git status with either dgit or standard git. Note that the latter will also flag a type change as there is an inconsistency between the type of the entry in the index and what is on disk.

Unable to Push to GitHub / raw mode

tenshi% git push master
origin  on  https://github.com/henesy/cs327.git
Username: henesy
Password: [Redacted]
Setting password  henesy [Redacted]
404 Not Found

The above is a transcript of trying to push to a test repository (One I don't particularly care about). Is the push syntax above invalid?

Also if this is intended to be run primarily on Plan 9, it would be nice if it didn't echo passwords in plaintext and set rawon for its rio window.

Flags can not be glued to the option name

The Go flag package requires a space separating options from their parameters. The git command line does not. This sometimes comes up in test cases where they do things like -m"foo" or -U0.

Support for local "remote" repositories

The official git client supports adding remote repositories that are local filesystem paths. You can fetch from and push to those repositories. Many of the official git tests use local repositories to test push/pull functionality since they are meant to be run in isolation from any remote server.

Support for check-ignore

Check ignore is a useful tool to figure out if a file will be ignored or not given the current ignore configuration.

Support for ignore patterns that negate other patterns

The '!' operator is meant to negate other ignore patterns. This task will involve detecting that operator and apply the precedence rules for the negation of other patterns.

When complete, try not skipping the t0008-ignores test cases. It is expected that most of them should be passing once the negation is implemented.

Compile errors on darwin

There appear to be some compile problems with darwin (Mac) in the git/file_inode_darwin.go. These changes seem to be working for me now.

func (f File) INode() uint32 {
        stat, err := f.Lstat()
        if err != nil {
                return 0
        }
        rawstat := stat.Sys().(*syscall.Stat_t)
        return uint32(rawstat.Ino)
}

DGit 9P file server

While DGit aims to be a drop-in replacement for git, especially for Plan 9 that lacks an official git client, there can be more that we can do with this project than just aim for parity.

I think that it would be interesting to have a subcommand that would start a 9P file server for a specified git repository.

Here's a rough proposal:
dgit serve <git repository path>
-Creates a 9P file server at /srv/git that can be mounted

Filesystem structure:
/worktree/ - the current contents of the work tree
/ctl -send git plumbing commands here with some adjustments
/commits/ - access commits as-needed using a ctl file
/log/ - the history of the current branch in ascending order (0, 1, 2, ...)
/branch/ - create and read branch information
/tag/ - create and read tag information

I'm not sure if we should expose object and index files directly from the .git directory.

This would allow anyone to mount a git repository and bind it anywhere they like. Modifications that they make to it can be tracked and committed. The repository can be shared across your processes and network. You can use acme/sam to perform your git operations without using interactive ('win') mode.

It would be nice to try to hook into other plan 9 services and conventions in this server mode. For example, use factotum for authenticating against other servers. Use plumber to bring up editors.

checkoutbranch forcebranch option not implemented

In git.CheckoutBranch, the branch option (-b) is implemented but forcebranch (-B) isn't.

Implementing it should just be a matter of checking if the refspec exists before creating the branch, and erroring out if ForceBranch isn't set, but calling UpdateRef if it is.

Add more tests from the official git test suite that are passing

After running all of the test suites, looking for ones that are already passing, and filtering those for ones that actually invoke git (not some test tool) here is a list of candidates that could be added to travis to help catch regressions. Each should be vetted for whether it is passing for good reasons and if it will be helpful moving forward.

t0004-unwritable.sh
t0010-racy-git.sh
t0040-parse-options.sh
t0062-revision-walking.sh
t0070-fundamental.sh
t0200-gettext-basic.sh
t1009-read-tree-new-index.sh
t1304-default-acl.sh
t2009-checkout-statinfo.sh
t3070-wildmatch.sh
t3103-ls-tree-misc.sh
t4113-apply-ending.sh
t4123-apply-shrink.sh
t5705-clone-2gb.sh
t7062-wtstatus-ignorecase.sh
t7511-status-index.sh

Tag support

There is not tag subcommand for creating or querying for tags.

Pushing to a repository ahead in time causes panic

If I push to a repository that's ahead in commits while local is behind dgit will crash:

sav% git push master
origin  on  https://github.com/henesy/Practice-Code
Username: henesy
Password: 
report-status
delete-refs
side-band-64k
quiet
atomic
ofs-delta
agent=git/github-g8e539663647e

Refname: refs/heads/master Remote Sha1: 98833bb3f14fd6093e73fa4cc2c1947280a1c4e3 Local Sha1: b12040419cbbfb4c574767c9aaa5e73770338010
panic: ^98833bb3f14fd6093e73fa4cc2c1947280a1c4e3:Invalid revision commit

goroutine 1 [running]:
github.com/driusan/dgit/cmd.Push(0x420870bd0, 0x420870080, 0x1, 0x1)
	/usr/henesy/go/src/github.com/driusan/dgit/cmd/push.go:52 +0xf25
main.main()
	/usr/henesy/go/src/github.com/driusan/dgit/main.go:183 +0x24ab

Since pull/merge isn't implemented there's no way to sync up, that's okay though.

Should this be handled rather than causing a panic?

Consider moving dgit from my account to github org?

Now that there's more than 1 person actively contributing, it might be worth moving the repo from directly under my account on github to a new dgit org. This would have the advantages of:

  1. My changes won't get special treatment (which right now can result in me accidentally breaking the build.)
  2. My dev and the master branch won't get intermingled
  3. It would look more professional/mature which could potentially attract more developers
  4. There would be an obvious place for related repos such as the proposed 9p server.

The disadvantage is that rewriting the import paths everywhere would be a bit of a pain, and we'd need to point people to the new location from here, but I don't think there's such a large userbase right now that that would be too onerous if it's a one time thing.

Intermittent failures in tests

There are intermittent failures in TestStatus (status_test.go) that happen rarely on Mac, quite often on Travis CI (disabled using an environment variable for now), sometimes on Plan 9 and often on Dragonfly. UnidiffApply also appears to be failing only on Plan 9 or Dragonfly. These tests should be more robust and work on multiple platforms so that dgit can be verified in a variety of places.

Git Pull command

Dgit has a push, but not pull command, which causes "go get -u" to fail. Once this is implemented, the go-get-tests.sh has commented out tests for it.

mktree subcommand mising

The git "mktree" subcommand isn't implemented.

This is probably a fairly easy command to implement, since there are only 3 options in the man page and the t1010-mktree.sh test case in the official git test suite only has 7 test cases.

git show command missing

4 of the remaining 6 test failures from the t0000-basic tests from git are failing because the test suite uses git show -- pretty=raw in order to verify the commit from commit-tree, which is missing

update-index fails with a directory/file conflict

The test from t0000-basic.sh testing that replacing a directory with a file in the index works is failing.

(This may be because of a bug, or it may be because --replace isn't implemented. Needs to be investigated.)

git update-index --refresh not implemented

The git test suite uses git update-index --refresh in the basic tests, which is not currently implemented. The option is parsed but ignored, causing dgit to incorrectly report that the command was successful when the stat information in the index isn't actually updated.

Is the cmd package intended to be used as a library?

The cmd package has a number of exported functions, which could lead a third-party implementor to use them directly as function calls. Is this the intent or just a side-effect of the package structure (ie. callable from main.go in the parent package)?

missing git fsck subcommand

Many of the git fetch tests (including the setup) depend on git fsck to validate the git repo. This needs to be implemented to run those tests.

The relevent test for fsck itself is t1450.

Running dgit with no arguments exits with return code 2 instead of 1

I am attempting to run the standard git test suite (https://github.com/git/git/tree/master/t) against dgit to see if it can show us the major gaps in the core functionality. I can provide more details if you are interested in running it yourself.

The standard git command will return 1 if you just run 'git' with no arguments, however dgit returns 2 in this case failing some of the tests. The problem seems to be here

dgit/main.go

Line 43 in 5022e16

os.Exit(2)

When I change that line to return 1 and with some other small work arounds I can run most of the basic git test suite. 32 tests are passing out of 78!

git update-index --index-info missing 1 variant

Of the 3 variants of --index-info listed in git-update-index(1) only the one used by the t0000-basic.sh test suite is implemented.

It should be fairly to add support for the other two variants by basing them on the one which is implemented in UpdateIndexFromReader and adding new test cases.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.