From 05c414a169a75ca933402e5be19a5c4304aa4f00 Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Mon, 26 Mar 2018 23:18:54 +0200 Subject: *: Use CheckClose with named returns Previously some close errors were losts. This is specially problematic in go-git as lots of work is done here like generating indexes and moving packfiles. Signed-off-by: Javi Fontan --- plumbing/object/commit.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plumbing/object/commit.go') diff --git a/plumbing/object/commit.go b/plumbing/object/commit.go index a317714..c9a4c0e 100644 --- a/plumbing/object/commit.go +++ b/plumbing/object/commit.go @@ -226,7 +226,7 @@ func (b *Commit) Encode(o plumbing.EncodedObject) error { return b.encode(o, true) } -func (b *Commit) encode(o plumbing.EncodedObject, includeSig bool) error { +func (b *Commit) encode(o plumbing.EncodedObject, includeSig bool) (err error) { o.SetType(plumbing.CommitObject) w, err := o.Writer() if err != nil { -- cgit