From d876b9a69fda446bf9d810cca82629ccbd17bf5f Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Thu, 28 Jun 2018 20:36:56 +0200 Subject: pre-push: Add comment of how to do dry-run testing --- scripts/pre-push | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'scripts') diff --git a/scripts/pre-push b/scripts/pre-push index 5d4e280d25..71e9fd1e75 100755 --- a/scripts/pre-push +++ b/scripts/pre-push @@ -33,6 +33,19 @@ MASTER_ONLY=aea2a053e28a11497796879715be29ab0c3cd1a0 NCOMMITS_MAX=100 NFILES_MAX=100 + +# Example testing this script for "git push upstream OTP-20.3.8.2": +# +#> null=0000000000000000000000000000000000000000 +#> echo "refs/tags/OTP-20.3.8.2 dummysha refs/tags/OTP-20.3.8.2 $null" | scripts/pre-push upstream https://github.com/erlang/otp.git + +# Example to test "git push upstream master" +# +#> local_sha=`git rev-parse master` +#> remote_sha=`git rev-parse upstream/master` +#> echo "refs/heads/master $local_sha refs/heads/master $remote_sha" | scripts/pre-push upstream https://github.com/erlang/otp.git + + remote="$1" url="$2" -- cgit v1.2.3