0fdf6c3 changed the mode mask from 0o111 to 0o100. We're encountering issues when committing files marked as executable:
After committing such a file with GitPython, our repo shows the following behavior:
# git status
On branch develop
nothing to commit, working directory clean
git status shows everything as clean (as it should be).
But if we git stash the changes:
# git stash
error: feeding unmodified <file> to diffcore
error: feeding unmodified <file> to diffcore
Saved working directory and index state WIP on develop: 6cdd426 ... (10136)
HEAD is now at 6cdd426 ... (10136)
And the stash turns up empty:
# git stash show
This is an issue for us because we end up in a dirty repo and can't execute some git commands anymore without resetting/stashing some inexistent changes.
I don't know what the rational behind the 0o100 mask is, but 0o111 works for our use case.
Thanks so much for reporting this one ! It seems like a major bug caused by just a few digits. The next commit will contain the fix, and I will make a new point release in the next days as well.
Also thanks for investigating a possible fix - using 0o100 doesn't seem sensible here at all.
Activity
GaretJax commented on May 11, 2016
Also if you look at this https://github.com/libgit2/libgit2/blob/master/include/git2/types.h#L208-L209, the only two allowed modes are 0755 and 0644.
Byron commented on May 19, 2016
Thanks so much for reporting this one ! It seems like a major bug caused by just a few digits. The next commit will contain the fix, and I will make a new point release in the next days as well.
Also thanks for investigating a possible fix - using 0o100 doesn't seem sensible here at all.
improve index mode for executable files
improve index mode for executable files
improve index mode for files with executable bit