equal
deleted
inserted
replaced
88 oid = hashlib.sha256(text).hexdigest() |
88 oid = hashlib.sha256(text).hexdigest() |
89 self.opener.lfslocalblobstore.write(oid, text) |
89 self.opener.lfslocalblobstore.write(oid, text) |
90 |
90 |
91 # replace contents with metadata |
91 # replace contents with metadata |
92 longoid = 'sha256:%s' % oid |
92 longoid = 'sha256:%s' % oid |
93 metadata = pointer.gitlfspointer(oid=longoid, size=str(len(text))) |
93 metadata = pointer.gitlfspointer(oid=longoid, size='%d' % len(text)) |
94 |
94 |
95 # by default, we expect the content to be binary. however, LFS could also |
95 # by default, we expect the content to be binary. however, LFS could also |
96 # be used for non-binary content. add a special entry for non-binary data. |
96 # be used for non-binary content. add a special entry for non-binary data. |
97 # this will be used by filectx.isbinary(). |
97 # this will be used by filectx.isbinary(). |
98 if not util.binary(text): |
98 if not util.binary(text): |