aboutsummaryrefslogtreecommitdiffstats
path: root/repository_test.go
diff options
context:
space:
mode:
authorAshok Pon Kumar <ashokponkumar@gmail.com>2020-09-02 09:19:55 +0530
committerAshok Pon Kumar <ashokponkumar@gmail.com>2020-09-02 09:19:55 +0530
commit70b98de4945f1b6bd0f92be049a36b90a0c23282 (patch)
tree6603b432d724b822da25938a1d00369a460518d6 /repository_test.go
parente7be6a4e2442826f9a54f2d40e9658552972c644 (diff)
downloadgo-git-70b98de4945f1b6bd0f92be049a36b90a0c23282.tar.gz
support file path in PlainOpenWithOptions - do only when detect flag is enabled
Diffstat (limited to 'repository_test.go')
-rw-r--r--repository_test.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/repository_test.go b/repository_test.go
index 9433a3c..7d4ddce 100644
--- a/repository_test.go
+++ b/repository_test.go
@@ -583,10 +583,14 @@ func (s *RepositorySuite) TestPlainOpenDetectDotGit(c *C) {
c.Assert(err, IsNil)
c.Assert(r, NotNil)
- opt = &PlainOpenOptions{DetectDotGit: true}
r, err = PlainOpenWithOptions(file, opt)
c.Assert(err, IsNil)
c.Assert(r, NotNil)
+
+ optnodetect := &PlainOpenOptions{DetectDotGit: false}
+ r, err = PlainOpenWithOptions(file, optnodetect)
+ c.Assert(err, NotNil)
+ c.Assert(r, IsNil)
}
func (s *RepositorySuite) TestPlainOpenNotExistsDetectDotGit(c *C) {