From e216b0b2cc28a0fe884b6e1b572e09f1486215b1 Mon Sep 17 00:00:00 2001 From: Barry Steyn Date: Thu, 8 Oct 2015 11:26:18 -0700 Subject: [PATCH] Fix bug - pushing on an empty changeset --- pre_commit/resources/pre-push-tmpl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pre_commit/resources/pre-push-tmpl b/pre_commit/resources/pre-push-tmpl index d92f3095..40daa477 100644 --- a/pre_commit/resources/pre-push-tmpl +++ b/pre_commit/resources/pre-push-tmpl @@ -11,4 +11,10 @@ do fi done -args="$args --hook-stage push" +if [ "args" != "" ]; then + args="$args --hook-stage push" +else + # If args is empty, then an attempt to push on an empty + # changeset is being made. In this case, just exit cleanly + exit 0 +fi