aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format/packfile/fsobject.go
diff options
context:
space:
mode:
Diffstat (limited to 'plumbing/format/packfile/fsobject.go')
-rw-r--r--plumbing/format/packfile/fsobject.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/plumbing/format/packfile/fsobject.go b/plumbing/format/packfile/fsobject.go
index 330cb73..a268bce 100644
--- a/plumbing/format/packfile/fsobject.go
+++ b/plumbing/format/packfile/fsobject.go
@@ -48,7 +48,7 @@ func NewFSObject(
// Reader implements the plumbing.EncodedObject interface.
func (o *FSObject) Reader() (io.ReadCloser, error) {
obj, ok := o.cache.Get(o.hash)
- if ok {
+ if ok && obj != o {
reader, err := obj.Reader()
if err != nil {
return nil, err