This commit is contained in:
Unknwon committed 2015-11-20 02:38:41 -05:00
1 parent 9b6c835715
commit 987dcc5372
13 files changed
+97 -13

No files matched your search

+3
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