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
git_merge() / git_index_add() errors with "invalid filemode" on 0664 mode file #2926
Comments
IIRC, when building the index for merge, we skip the |
Without even looking at the code, I think that conflicts should call an internal index add function that eschews sanity checks, while the public We could also make a public API that does this. I can imagine that a consumer of the library might want to maintain their junky data in the same way. (Maybe they're writing their own git-merge-whatever.) Or we could punt on that for later. |
A |
Note that #3032 may be related. Though we should have a unit test for this when we address that. |
I'm wondering. What does git do in this case? Does it convert the filemode to the modern version? If it does that, it might be worth looking at whether we can take the list of historically-used filemodes and whitelist them to be converted into the modern ones. |
This should be fixed with #3550 |
git_index_add() errors with "invalid filemode" on files with mode 0664.
(It does accept files with modes 0644 and 0755.)
This issue came up during a call to git_merge() on Windows.
In this test:
On Windows, this exits with the invalid filemode. Odd that it is in the conflict code at the time. I haven't tried it on other platforms yet.
The text was updated successfully, but these errors were encountered: