summaryrefslogtreecommitdiff
path: root/commit.d/99push
diff options
context:
space:
mode:
Diffstat (limited to 'commit.d/99push')
-rwxr-xr-xcommit.d/99push11
1 files changed, 6 insertions, 5 deletions
diff --git a/commit.d/99push b/commit.d/99push
index 9c1844c..9a5d81e 100755
--- a/commit.d/99push
+++ b/commit.d/99push
@@ -1,7 +1,8 @@
#!/bin/sh
-
-if [ "$VCS" = git ] && [ -d .git ] && [ -n "$PUSH_REMOTE" ]; then
- git push "$PUSH_REMOTE" master || true
-else
- echo "PUSH_REMOTE not yet supported for $VCS" >&2
+if [ -n "$PUSH_REMOTE" ]; then
+ if [ "$VCS" = git ] && [ -d .git ]; then
+ git push "$PUSH_REMOTE" master || true
+ else
+ echo "PUSH_REMOTE not yet supported for $VCS" >&2
+ fi
fi