Skip to content

Commit 3f2f86f

Browse files
committed
Avoid use of _pygit2.Blob.hex, which has been removed in pygit2 >= 1.15
1 parent 360e46d commit 3f2f86f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fsspec/implementations/git.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def ls(self, path, detail=True, ref=None, **kwargs):
8080
{
8181
"type": "directory",
8282
"name": "/".join([path, obj.name]).lstrip("/"),
83-
"hex": obj.hex,
83+
"hex": str(obj.id),
8484
"mode": f"{obj.filemode:o}",
8585
"size": 0,
8686
}
@@ -90,7 +90,7 @@ def ls(self, path, detail=True, ref=None, **kwargs):
9090
{
9191
"type": "file",
9292
"name": "/".join([path, obj.name]).lstrip("/"),
93-
"hex": obj.hex,
93+
"hex": str(obj.id),
9494
"mode": f"{obj.filemode:o}",
9595
"size": obj.size,
9696
}
@@ -101,7 +101,7 @@ def ls(self, path, detail=True, ref=None, **kwargs):
101101
{
102102
"type": "file",
103103
"name": obj.name,
104-
"hex": obj.hex,
104+
"hex": str(obj.id),
105105
"mode": f"{obj.filemode:o}",
106106
"size": obj.size,
107107
}

0 commit comments

Comments
 (0)