hggit: git_handler: use StringIO.tell(), not pos

Summary: StringIO.pos exists, but cStringIO.pos doesn't. Let's use a method that exists instead!

Reviewed By: xavierd

Differential Revision: D17790697

fbshipit-source-id: 9132a8ca9c0bfc35c0acc573b92399d5fc3f420d
This commit is contained in:
Thomas Orozco 2019-10-07 12:53:28 -07:00 committed by Facebook Github Bot
parent f1beb0a034
commit 7088442e8d

View File

@ -1300,7 +1300,7 @@ class GitHandler(object):
ret = localclient.fetch_pack(
path, determine_wants, graphwalker, f.write, gitprogress.progress
)
if f.pos != 0:
if f.tell() != 0:
f.seek(0)
self.git.object_store.add_thin_pack(f.read, None)