diff options
author | Manuel Carmona <manu.carmona90@gmail.com> | 2017-08-03 09:41:22 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2017-08-03 09:41:22 +0200 |
commit | b29ccd9cf64cb3c6d7b3fdc6649d97416f3be734 (patch) | |
tree | 387355a75b7ffa6673a528c8c9bb543144450e97 /repository.go | |
parent | 3713791015259f9e32cfe5fee76f9c99fc43fffd (diff) | |
download | go-git-b29ccd9cf64cb3c6d7b3fdc6649d97416f3be734.tar.gz |
*: windows support, some more fixes (#533)
* fixed windows failed test: "134 FAIL: repository_test.go:340: RepositorySuite.TestPlainOpenBareRelativeGitDirFileTrailingGarbage"
* fixed windows failed test: "143 FAIL: worktree_test.go:367: WorktreeSuite.TestCheckoutIndexOS"
* fixed windows failed test: "296 FAIL: receive_pack_test.go:36: ReceivePackSuite.TearDownTest"
* fixed windows failed test: "152 FAIL: worktree_test.go:278: WorktreeSuite.TestCheckoutSymlink"
Diffstat (limited to 'repository.go')
-rw-r--r-- | repository.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/repository.go b/repository.go index 72beefd..8110cf1 100644 --- a/repository.go +++ b/repository.go @@ -286,7 +286,7 @@ func dotGitFileToOSFilesystem(path string, fs billy.Filesystem) (billy.Filesyste return nil, fmt.Errorf(".git file has no %s prefix", prefix) } - gitdir := line[len(prefix):] + gitdir := strings.Split(line[len(prefix):], "\n")[0] gitdir = strings.TrimSpace(gitdir) if filepath.IsAbs(gitdir) { return osfs.New(gitdir), nil |