-
-
Notifications
You must be signed in to change notification settings - Fork 933
incorrect index mode for files which have a mode not in (0644, 0755) #1253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Milestone
Comments
tmzullinger
added a commit
to tmzullinger/GitPython
that referenced
this issue
May 24, 2021
The fix for gitpython-developers#430 in bebc4f5 (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. As git only cares about executable or or not in this case, ensure the mode we set for the index is either 100644 or 100755. Do this similarly to how upstream git does it in cache.h¹. Fixes gitpython-developers#1253 ¹ https://github.com/git/git/blob/v2.31.1/cache.h#L247
tmzullinger
added a commit
to tmzullinger/GitPython
that referenced
this issue
May 24, 2021
The fix for gitpython-developers#430 in bebc4f5 (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. As git only cares about executable or or not in this case, ensure the mode we set for the index is either 100644 or 100755. Do this similarly to how upstream git does it in cache.h¹. Fixes gitpython-developers#1253 ¹ https://github.com/git/git/blob/v2.31.1/cache.h#L247
Thanks a lot for the report, and sorry for the hassle! I will continue my reply in the PR. |
No hassle at all. Thank you for all your work on GitPython! :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A recent bug report in Fedora revealed an issue where GitPython creates incorrect index modes for a file added which had mode
0700
. This is similar to issue #430 which was addressed in commit bebc4f5 (Use correct mode for executable files, 2016-05-19).I'll push a fix for this momentarily. This area could certainly use some tests. The previous commit did not add any tests for me to copy and extend. I'm happy to try to add some tests, but I'm not sure that I have enough time to bring myself up to speed. Any help would be more appreciated if we want tests to go along with this change.
A very simple example of the issue is:
The text was updated successfully, but these errors were encountered: