Skip to content

Commit 9bdf9cf

Browse files
committed
Windows
1 parent a8dff6b commit 9bdf9cf

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

git-incrypt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,15 @@ from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
3535
from cryptography.hazmat.primitives import padding
3636
from cryptography.hazmat.backends import default_backend
3737

38+
if not hasattr(pygit2.enums, 'FileMode'):
39+
class FileMode(enum.IntFlag):
40+
'definitions missing in older versions of pygit2'
41+
# pylint: disable=c-extension-no-member disable=protected-access
42+
TREE = pygit2._pygit2.GIT_FILEMODE_TREE
43+
# pylint: disable=c-extension-no-member disable=protected-access
44+
BLOB = pygit2._pygit2.GIT_FILEMODE_BLOB
45+
pygit2.enums.FileMode = FileMode
46+
3847
CRYPTREADME = '''# 401 Unauthorized
3948
4049
This is an encrypted git repository. You can clone it, but you will not be

0 commit comments

Comments
 (0)