Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Commit bcaede8

Browse files
committed
storage/filesystem: dotgit, Reproduce packfile parse error. Fixes #1149
Signed-off-by: Yuichi Watanabe <yuichi.watanabe.ja@gmail.com>
1 parent 24de5ef commit bcaede8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

storage/filesystem/dotgit/dotgit_test.go

+5
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,11 @@ func testObjectPacks(c *C, fs billy.Filesystem, dir *DotGit, f *fixtures.Fixture
463463
c.Assert(err, IsNil)
464464
err = badFile.Close()
465465
c.Assert(err, IsNil)
466+
// temporary file generated by git gc
467+
tmpFile, err := fs.Create("objects/pack/.tmp-11111-pack-58rf8y4wm1b1k52bpe0kdlx6lpreg6ahso8n3ylc.pack")
468+
c.Assert(err, IsNil)
469+
err = tmpFile.Close()
470+
c.Assert(err, IsNil)
466471

467472
hashes2, err := dir.ObjectPacks()
468473
c.Assert(err, IsNil)

0 commit comments

Comments
 (0)