Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/etc/pre-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@

set -Euo pipefail

# Check if the push is doing anything other than deleting remote branches
SKIP=true
while read LOCAL_REF LOCAL_SHA REMOTE_REF REMOTE_SHA; do
if [[ "$LOCAL_REF" != "(delete)" || \
"$LOCAL_SHA" != "0000000000000000000000000000000000000000" ]]; then
SKIP=false
fi
done

if $SKIP; then
echo "Skipping tidy check for branch deletion"
exit 0
fi

ROOT_DIR="$(git rev-parse --show-toplevel)"

echo "Running pre-push script $ROOT_DIR/x test tidy"
Expand Down
Loading