Skip to content

Instantly share code, notes, and snippets.

@Scooletz
Created December 8, 2015 23:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Scooletz/3c34adf4f378435ca112 to your computer and use it in GitHub Desktop.
Save Scooletz/3c34adf4f378435ca112 to your computer and use it in GitHub Desktop.
remote="$1"
url="$2"
z40=0000000000000000000000000000000000000000
IFS=' '
while read local_ref local_sha remote_ref remote_sha
do
if [ "$local_sha" = $z40 ]
then
# Handle delete
:
else
if [ "$remote_sha" = $z40 ]
then
# New branch, examine all commits
range="$local_sha"
else
# Update to existing branch, examine new commits
exec powershell -NoProfile -ExecutionPolicy Bypas -command "& { . .\hooks.ps1; Prepare-Push -localRef '$local_ref' -localSha '$local_sha' -remoteRef '$remote_ref' -remoteSha '$remote_sha'}"
fi
fi
done
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment