diff options
Diffstat (limited to 'dev/tools')
| -rwxr-xr-x | dev/tools/merge-pr.sh | 8 | ||||
| -rwxr-xr-x | dev/tools/pre-commit | 6 |
2 files changed, 8 insertions, 6 deletions
diff --git a/dev/tools/merge-pr.sh b/dev/tools/merge-pr.sh index 1c94f630f2..00d04e6b3d 100755 --- a/dev/tools/merge-pr.sh +++ b/dev/tools/merge-pr.sh @@ -5,7 +5,7 @@ set -o pipefail API=https://api.github.com/repos/coq/coq OFFICIAL_REMOTE_GIT_URL="git@github.com:coq/coq" -OFFICIAL_REMOTE_HTTPS_URL="https://github.com/coq/coq" +OFFICIAL_REMOTE_HTTPS_URL="github.com/coq/coq" # This script depends (at least) on git (>= 2.7) and jq. # It should be used like this: dev/tools/merge-pr.sh /PR number/ @@ -91,8 +91,10 @@ fi REMOTE_URL=$(git remote get-url "$REMOTE" --all) if [ "$REMOTE_URL" != "${OFFICIAL_REMOTE_GIT_URL}" ] && \ [ "$REMOTE_URL" != "${OFFICIAL_REMOTE_GIT_URL}.git" ] && \ - [ "$REMOTE_URL" != "${OFFICIAL_REMOTE_HTTPS_URL}" ] && \ - [ "$REMOTE_URL" != "${OFFICIAL_REMOTE_HTTPS_URL}.git" ]; then + [ "$REMOTE_URL" != "https://${OFFICIAL_REMOTE_HTTPS_URL}" ] && \ + [ "$REMOTE_URL" != "https://${OFFICIAL_REMOTE_HTTPS_URL}.git" ] && \ + [[ "$REMOTE_URL" != "https://"*"@${OFFICIAL_REMOTE_HTTPS_URL}" ]] && \ + [[ "$REMOTE_URL" != "https://"*"@${OFFICIAL_REMOTE_HTTPS_URL}.git" ]] ; then error "remote ${BLUE}$REMOTE${RESET} does not point to the official Coq repo" error "that is ${BLUE}$OFFICIAL_REMOTE_GIT_URL" error "it points to ${BLUE}$REMOTE_URL${RESET} instead" diff --git a/dev/tools/pre-commit b/dev/tools/pre-commit index a514b8866a..b56925c370 100755 --- a/dev/tools/pre-commit +++ b/dev/tools/pre-commit @@ -27,8 +27,8 @@ then # reset work tree and index # NB: untracked files which were not added are untouched - git apply --cached -R "$index" - git apply -R "$tree" + git apply --whitespace=nowarn --cached -R "$index" + git apply --whitespace=nowarn -R "$tree" # Fix index # For end of file newlines we must go through the worktree @@ -45,7 +45,7 @@ then # making git fail. Don't fail now: we fix the worktree first. if [ -s "$fixed_index" ] then - git apply -R "$fixed_index" + git apply --whitespace=nowarn -R "$fixed_index" fi # Fix worktree |
