aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format/packfile
diff options
context:
space:
mode:
authorpaul.t <paul.t@gembaadvantage.com>2021-11-09 15:16:55 +0000
committerpaul.t <paul.t@gembaadvantage.com>2021-11-09 15:16:55 +0000
commit7391aa4c244439c246b269ef3e946273aba7ca8b (patch)
tree89b243a88fb0d50d7ac2a9400935b950cb2fef79 /plumbing/format/packfile
parent411809ddb56551c2420c722acf49ce4e774333ad (diff)
downloadgo-git-7391aa4c244439c246b269ef3e946273aba7ca8b.tar.gz
add codecommit packfile for testing external ref resolution
Diffstat (limited to 'plumbing/format/packfile')
-rw-r--r--plumbing/format/packfile/parser_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/plumbing/format/packfile/parser_test.go b/plumbing/format/packfile/parser_test.go
index b0b4af8..9c7e218 100644
--- a/plumbing/format/packfile/parser_test.go
+++ b/plumbing/format/packfile/parser_test.go
@@ -132,6 +132,20 @@ func (s *ParserSuite) TestThinPack(c *C) {
}
+func (s *ParserSuite) TestResolveExternalRefsInThinPack(c *C) {
+ f, err := os.Open("testdata/pack-9733763ae7ee6efcf452d373d6fff77424fb1dcc.pack")
+ c.Assert(err, IsNil)
+
+ scanner := packfile.NewScanner(f)
+
+ obs := new(testObserver)
+ parser, err := packfile.NewParser(scanner, obs)
+ c.Assert(err, IsNil)
+
+ _, err = parser.Parse()
+ c.Assert(err, IsNil)
+}
+
type observerObject struct {
hash string
otype plumbing.ObjectType