Merge pull request #3 from Sixeight/patch/1

Fix never use default local repository root issue
This commit is contained in:
motemen 2014-06-04 15:06:32 +09:00
commit 8cf2d1c5a6

7
git.go
View file

@ -17,7 +17,12 @@ func GitConfigAll(key string) ([]string, error) {
return nil, err
}
return strings.Split(value, "\000"), nil
var values = strings.Split(value, "\000")
if len(values) == 1 && values[0] == "" {
values = values[:0]
}
return values, nil
}
func gitConfig(key string, all bool) (string, error) {