-
Notifications
You must be signed in to change notification settings - Fork 534
Unix executables changed to regular files upon clone in Windows #373
Comments
What is more, actually the executable status of those files on the filesystem is set correctly (using Git Bash for Windows this is what I get):
As you see there is executable permission on By adding a small Windows specific workaround to |
Closing in favour of #378 |
A Windows clone of a repository that contains Unix executables results in executable file permission change in the change set to regular directly upon clone. I guess the reason lies somewhere in
func (w *Worktree) checkoutChangeRegularFile(...) error
due to the fact thatfilemode.NewFromOSFileMode(fi.Mode())
infunc (w *Worktree) addIndexFromFile(name string, h plumbing.Hash, idx *index.Index) error
delivers on Windowsregular
for anything that is actually executable on Unix.Version used: master
Here is the behaviour that I observed. First, here is a clone with the default git client. The clone causes no file permission change:
Next, the same clone with the following go-git code:
Triggers permission change upon clone:
And checking the status with the default git client:
Now checking what are the differences:
The text was updated successfully, but these errors were encountered: