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

Commit

Permalink
storage/filesystem: dotgit, Reproduce packfile parse error. Fixes #1149
Browse files Browse the repository at this point in the history
Signed-off-by: Yuichi Watanabe <yuichi.watanabe.ja@gmail.com>
  • Loading branch information
vvatanabe committed May 17, 2019
1 parent 24de5ef commit 01f0ba9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions storage/filesystem/dotgit/dotgit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 01f0ba9

Please sign in to comment.