Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 946c913

Browse files
committedMay 17, 2019
storage/filesystem: dotgit, Reproduce packfile parse error. Fixes #1149
1 parent 24de5ef commit 946c913

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)
This repository has been archived.