about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2021-11-02 14:51:31 +0100
committerLeah Neukirchen <leah@vuxu.org>2021-11-02 14:51:31 +0100
commit51ae30614d7e41a2fe85463325b917f8bc9ff289 (patch)
tree8e1be5819d827f3bd3d0b4644b42e106c7fa785b
parent71af8890d889b62fc186421f1f04793511626bf2 (diff)
downloadgit-merge-pr-51ae30614d7e41a2fe85463325b917f8bc9ff289.tar.gz
git-merge-pr-51ae30614d7e41a2fe85463325b917f8bc9ff289.tar.xz
git-merge-pr-51ae30614d7e41a2fe85463325b917f8bc9ff289.zip
use --keep-cr by default HEAD master
This allows applying patches that change CRLF files.

It is safe here as GitHub's .patch endpoint won't inject CR by accident
(which could happen on a mail transport).
-rwxr-xr-xgit-merge-pr2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-merge-pr b/git-merge-pr
index 6ec6203..992baba 100755
--- a/git-merge-pr
+++ b/git-merge-pr
@@ -42,7 +42,7 @@ PATCH="$(mktemp)"
 trap "rm -f $PATCH" INT TERM EXIT
 $PATCH_CMD "$PATCH" https://github.com/$PROJECT/pull/"$PR".patch
 WHITESPACE="$(git config --get merge-pr.whitespace || true)"
-git am "--whitespace=${WHITESPACE:-warn}" "$@" "$PATCH"
+git am --keep-cr "--whitespace=${WHITESPACE:-warn}" "$@" "$PATCH"
 
 if [ "$(git config --bool --get merge-pr.autoclose)" = false ]; then
 	exit 0