summaryrefslogtreecommitdiff
path: root/commit.d
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2013-05-06 09:49:23 -0400
committerJoey Hess <joey@kitenet.net>2013-05-06 09:49:23 -0400
commitd1dbe26b3398d478ea1a8ba56cc571506c08c0aa (patch)
tree29353a07c3afc61912b2293d299dd6f40855d10e /commit.d
parent77642416a16c56d590f92ecdef0d2f564425f492 (diff)
Fix warning when PUSH_REMOTE is not set. Closes: #706917
Diffstat (limited to 'commit.d')
-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