Skip to content

Commit

Permalink
Ignore executable flag on files
Browse files Browse the repository at this point in the history
  • Loading branch information
rjyounes committed Nov 21, 2023
1 parent 91bf4b3 commit f8a0031
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tools/setup.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@ cp "${base_dir}/tools/pre-commit" "${base_dir}/.git/hooks/"
# Make pre-commit hook executable. Needed at least on Mac, where the copied file is non-executable unless there's an existing executable file in the hooks directory, regardless of the status of the original file.
chmod +x "${base_dir}/.git/hooks/pre-commit"

# Copy serializer pre-commit to hooks directory. Needed for Mac, where the permissions on the file keep changing (after it executes?) and therefore GitHub detects.
cp "${base_dir}/tools/serializer/pre-commit" "${base_dir}/.git/hooks/pre-commit-serializer"
# Copy serializer pre-commit to hooks directory.
cp "${base_dir}/tools/serializer/pre-commit-serializer" "${base_dir}/.git/hooks/pre-commit-serializer"
# Ensure that the serializer pre-commit hook is executable.
chmod +x "${base_dir}/.git/hooks/pre-commit-serializer"

# Don't track executable flag on files. Needed on Mac, which makes files non-executable on commit.
git config core.filemode false

# Exit linux shell
exit

Expand Down

0 comments on commit f8a0031

Please sign in to comment.