aboutsummaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorYuichi Watanabe <yuichi.watanabe.ja@gmail.com>2019-05-17 13:58:30 +0900
committerYuichi Watanabe <yuichi.watanabe.ja@gmail.com>2019-05-17 13:58:30 +0900
commitbcaede84719f0fd36b944a1b4f78e7ecc1ba10fe (patch)
tree4799a4bea99897d6a6608b50caa944caf02e401a /storage
parent24de5efe77a202ddba83abb4d14095474dcdf1f6 (diff)
downloadgo-git-bcaede84719f0fd36b944a1b4f78e7ecc1ba10fe.tar.gz
storage/filesystem: dotgit, Reproduce packfile parse error. Fixes #1149
Signed-off-by: Yuichi Watanabe <yuichi.watanabe.ja@gmail.com>
Diffstat (limited to 'storage')
-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 73b0291..4cda2f9 100644
--- a/storage/filesystem/dotgit/dotgit_test.go
+++ b/storage/filesystem/dotgit/dotgit_test.go
@@ -463,6 +463,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)