Recursively setting file permissions on git remotes breaks git
hooks for anyone who uses git templates and symlinks their hooks
across repositories by removing execute permissions on the shared
Since the original commit that added this feature:
was a fix for a Windows only issue:
The proposed solution provided in this PR is to only apply the
file permissions in Windows.
A previous fix for #3117
explicitly set the permissions for all files to a hard-coded
value, regardless of what the permissions were previously.
This changes that behavior to *add* the permissions that were
previously being *set* so that existing execute permissions are
This is a redo of the much more blunt solution attempted in
thanks to some very helpful feedback from @othiym23