diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2017-07-19 22:04:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-19 22:04:46 +0200 |
commit | 8738a04708b91683d5804b4c648c871fdeb87f82 (patch) | |
tree | 017b15080dee8bd64026c9358d832e61d12674d5 /worktree.go | |
parent | 595dfe6e53a038da4949263ea2d9a7a0020c48b7 (diff) | |
parent | 4a7e7cddc0e4f88085b263693c87635254de7f35 (diff) | |
download | go-git-8738a04708b91683d5804b4c648c871fdeb87f82.tar.gz |
Merge pull request #493 from src-d/windows
*: several windows support fixes
Diffstat (limited to 'worktree.go')
-rw-r--r-- | worktree.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/worktree.go b/worktree.go index e0f5fdf..13b2497 100644 --- a/worktree.go +++ b/worktree.go @@ -496,6 +496,10 @@ func (w *Worktree) Submodules() (Submodules, error) { } c, err := w.r.Config() + if err != nil { + return nil, err + } + for _, s := range m.Submodules { l = append(l, w.newSubmodule(s, c.Submodules[s.Name])) } @@ -527,6 +531,7 @@ func (w *Worktree) readGitmodulesFile() (*config.Modules, error) { return nil, err } + defer f.Close() input, err := stdioutil.ReadAll(f) if err != nil { return nil, err |