summaryrefslogtreecommitdiff
path: root/git/objects/commit.py
diff options
context:
space:
mode:
authorTodd Zullinger <tmz@pobox.com>2021-05-24 17:34:42 -0400
committerTodd Zullinger <tmz@pobox.com>2021-05-25 11:42:07 -0400
commit1a04c15b1f77f908b1dd3983a27ee49c41b3a3e5 (patch)
tree81677cb062f30badff8ae37fbe05234d4d6908a7 /git/objects/commit.py
parenteae0e37c88a71a3b8ca816b820eed71fd1590f11 (diff)
downloadgitpython-1a04c15b1f77f908b1dd3983a27ee49c41b3a3e5.tar.gz
improve index mode for files with executable bit
The fix for #430 in bebc4f56 (Use correct mode for executable files, 2016-05-19) is incomplete. It fails (in most cases) when files have modes which are not exactly 0644 or 0755. Git only cares whether the executable bit is set (or not). Ensure the mode we set for the index is either 100644 or 100755 based on whether the executable bit is set for the file owner. Do this similarly to how upstream git does it in cache.h¹. Add a test covering various file modes to help catch regressions. Fixes #1253 ¹ https://github.com/git/git/blob/v2.31.1/cache.h#L247
Diffstat (limited to 'git/objects/commit.py')
0 files changed, 0 insertions, 0 deletions