diff options
author | Ashok Pon Kumar <ashokponkumar@gmail.com> | 2020-09-02 09:19:55 +0530 |
---|---|---|
committer | Ashok Pon Kumar <ashokponkumar@gmail.com> | 2020-09-02 09:19:55 +0530 |
commit | 70b98de4945f1b6bd0f92be049a36b90a0c23282 (patch) | |
tree | 6603b432d724b822da25938a1d00369a460518d6 /repository.go | |
parent | e7be6a4e2442826f9a54f2d40e9658552972c644 (diff) | |
download | go-git-70b98de4945f1b6bd0f92be049a36b90a0c23282.tar.gz |
support file path in PlainOpenWithOptions - do only when detect flag is enabled
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 d954333..36fc1f5 100644 --- a/repository.go +++ b/repository.go @@ -281,7 +281,7 @@ func dotGitToOSFilesystems(path string, detect bool) (dot, wt billy.Filesystem, pathinfo, err := os.Stat(path) if !os.IsNotExist(err) { - if !pathinfo.IsDir() { + if !pathinfo.IsDir() && detect { path = filepath.Dir(path) } } |