aboutsummaryrefslogtreecommitdiffstats
path: root/storage/filesystem/dotgit/dotgit_test.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2020-03-10 00:03:43 +0100
committerGitHub <noreply@github.com>2020-03-10 00:03:43 +0100
commit586d45a14f4646e3d6280cb723d2cfb152a6a9f8 (patch)
tree14fbc2ef81a499fb47c1cf79393359d9737dc371 /storage/filesystem/dotgit/dotgit_test.go
parenteef67789e846acc85e1ed2af2760d6716b2a9f07 (diff)
parent51320886176abed6647d2d7bab5bd6df17c4d44f (diff)
downloadgo-git-586d45a14f4646e3d6280cb723d2cfb152a6a9f8.tar.gz
Merge pull request #6 from go-git/pr-1153
storage/filesystem: dotgit, unable to work with .git folder with temporal packfiles
Diffstat (limited to 'storage/filesystem/dotgit/dotgit_test.go')
-rw-r--r--storage/filesystem/dotgit/dotgit_test.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/storage/filesystem/dotgit/dotgit_test.go b/storage/filesystem/dotgit/dotgit_test.go
index 31c6fe0..bd4e9f0 100644
--- a/storage/filesystem/dotgit/dotgit_test.go
+++ b/storage/filesystem/dotgit/dotgit_test.go
@@ -464,6 +464,11 @@ func testObjectPacks(c *C, fs billy.Filesystem, dir *DotGit, f *fixtures.Fixture
c.Assert(err, IsNil)
err = badFile.Close()
c.Assert(err, IsNil)
+ // temporary file generated by git gc
+ tmpFile, err := fs.Create("objects/pack/.tmp-11111-pack-58rf8y4wm1b1k52bpe0kdlx6lpreg6ahso8n3ylc.pack")
+ c.Assert(err, IsNil)
+ err = tmpFile.Close()
+ c.Assert(err, IsNil)
hashes2, err := dir.ObjectPacks()
c.Assert(err, IsNil)