1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- #!/bin/sh
- remote="$1"
- url="$2"
- zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0')
- while read local_ref local_oid remote_ref remote_oid
- do
- if test "$local_oid" = "$zero"
- then
-
- :
- else
- if test "$remote_oid" = "$zero"
- then
-
- range="$local_oid"
- else
-
- range="$remote_oid..$local_oid"
- fi
-
- commit=$(git rev-list -n 1 --grep '^WIP' "$range")
- if test -n "$commit"
- then
- echo >&2 "Found WIP commit in $local_ref, not pushing"
- exit 1
- fi
- fi
- done
- exit 0
|