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

Commit 12f3027

Browse files
committed
Fix infinite recursion in FSObject.
Signed-off-by: Filip Navara <[email protected]>
1 parent d5bd4e3 commit 12f3027

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plumbing/format/packfile/fsobject.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func NewFSObject(
4848
// Reader implements the plumbing.EncodedObject interface.
4949
func (o *FSObject) Reader() (io.ReadCloser, error) {
5050
obj, ok := o.cache.Get(o.hash)
51-
if ok {
51+
if ok && obj != o {
5252
reader, err := obj.Reader()
5353
if err != nil {
5454
return nil, err

0 commit comments

Comments
 (0)