This commit is contained in:
Unknwon 2015-11-20 02:38:41 -05:00
parent 9b6c835715
commit 987dcc5372
13 changed files with 97 additions and 13 deletions

File diff suppressed because one or more lines are too long

View file

@ -5,6 +5,7 @@
package git
import (
"errors"
"path/filepath"
)
@ -21,6 +22,8 @@ func OpenRepository(repoPath string) (*Repository, error) {
repoPath, err := filepath.Abs(repoPath)
if err != nil {
return nil, err
} else if !isDir(repoPath) {
return nil, errors.New("no such file or directory")
}
return &Repository{Path: repoPath}, nil