We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
tidy
1 parent ad27045 commit 41a7c83Copy full SHA for 41a7c83
src/etc/pre-push.sh
@@ -7,6 +7,20 @@
7
8
set -Euo pipefail
9
10
+# Check if the push is doing anything other than deleting remote branches
11
+SKIP=true
12
+while read LOCAL_REF LOCAL_SHA REMOTE_REF REMOTE_SHA; do
13
+ if [[ "$LOCAL_REF" != "(delete)" || \
14
+ "$LOCAL_SHA" != "0000000000000000000000000000000000000000" ]]; then
15
+ SKIP=false
16
+ fi
17
+done
18
+
19
+if $SKIP; then
20
+ echo "Skipping tidy check for branch deletion"
21
+ exit 0
22
+fi
23
24
ROOT_DIR="$(git rev-parse --show-toplevel)"
25
26
echo "Running pre-push script $ROOT_DIR/x test tidy"
0 commit comments