summaryrefslogtreecommitdiff
path: root/git/index/fun.py
diff options
context:
space:
mode:
authorYobmod <yobmod@gmail.com>2021-06-17 17:38:42 +0100
committerYobmod <yobmod@gmail.com>2021-06-17 17:38:42 +0100
commit3a84459c6a5a1d8a81e4a51189091ef135e1776e (patch)
treee1207dbe034f82deacbb76369716779608e7056d /git/index/fun.py
parentdf39446bb7b90ab9436fa3a76f6d4182c2a47da2 (diff)
parent636f77bf8d58a482df0bde8c0a6a8828950a0788 (diff)
downloadgitpython-3a84459c6a5a1d8a81e4a51189091ef135e1776e.tar.gz
add travis
Diffstat (limited to 'git/index/fun.py')
-rw-r--r--git/index/fun.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/git/index/fun.py b/git/index/fun.py
index 96d9b475..3fded347 100644
--- a/git/index/fun.py
+++ b/git/index/fun.py
@@ -11,6 +11,7 @@ from stat import (
S_ISDIR,
S_IFMT,
S_IFREG,
+ S_IXUSR,
)
import subprocess
@@ -115,7 +116,7 @@ def stat_mode_to_index_mode(mode: int) -> int:
return S_IFLNK
if S_ISDIR(mode) or S_IFMT(mode) == S_IFGITLINK: # submodules
return S_IFGITLINK
- return S_IFREG | 0o644 | (mode & 0o111) # blobs with or without executable bit
+ return S_IFREG | (mode & S_IXUSR and 0o755 or 0o644) # blobs with or without executable bit
def write_cache(entries: Sequence[Union[BaseIndexEntry, 'IndexEntry']], stream: IO[bytes],