diff options
author | Tim Schumacher <timschumi@gmx.de> | 2022-06-16 18:56:08 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-06-17 09:47:57 +0100 |
commit | e29e4e6c1f4fd51bbaf8f75a01323929ddbc89ca (patch) | |
tree | d8128576a5a8afa8219f405b0fcfe20848ca28d9 | |
parent | c9a70ffff5b25824fc53209168f75a352e6638f0 (diff) | |
download | serenity-e29e4e6c1f4fd51bbaf8f75a01323929ddbc89ca.zip |
Ports: Ensure that `core.autocrlf` is disabled before handling patches
While `core.autocrlf=false` should be the default, there will certainly
be users that have changed the default setting in their global
configuration.
Ensure that the setting is disabled to avoid accidentally mangling or
not applying our patches.
-rwxr-xr-x | Ports/.port_include.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Ports/.port_include.sh b/Ports/.port_include.sh index eb98b1ff2f..d97108d1ec 100755 --- a/Ports/.port_include.sh +++ b/Ports/.port_include.sh @@ -727,6 +727,7 @@ do_dev() { pushd "$git_repo" if [ ! -d "$git_repo/.git" ]; then git init . + git config core.autocrlf false git add --all --force git commit -a -m 'Initial import' fi @@ -809,14 +810,14 @@ do_dev() { ) [ -d "$git_repo" ] && [ ! -d "$workdir" ] && { - git clone "$git_repo" "$workdir" + git clone --config core.autocrlf=false "$git_repo" "$workdir" } [ -d "$workdir/.git" ] || { >&2 echo "$workdir does not appear to be a git repository, if you did this manually, you're on your own" if prompt_yes_no "Otherwise, press 'y' to remove that directory and clone it again"; then rm -fr "$workdir" - git clone "$git_repo" "$workdir" + git clone --config core.autocrlf=false "$git_repo" "$workdir" else exit 1 fi |