summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Chris Rorvick <chris@rorvick.com>2012-12-02 21:27:51 -0600
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-12-03 08:04:09 -0800
commitb450568209c8ae270d26ee7fda2e4687ad8a5327 (patch)
tree7141322da5346153ef97169966607c67ff078757 /builtin
parentpush: rename config variable for more general use (diff)
downloadtgif-b450568209c8ae270d26ee7fda2e4687ad8a5327.tar.xz
push: allow already-exists advice to be disabled
Add 'advice.pushAlreadyExists' option to disable the advice shown when an update is rejected for a reference that is not allowed to update at all (verses those that are allowed to fast-forward.) Signed-off-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/push.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/push.c b/builtin/push.c
index cf5ecfaf04..8491e431e4 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -247,6 +247,8 @@ static void advise_checkout_pull_push(void)
static void advise_ref_already_exists(void)
{
+ if (!advice_push_already_exists || !advice_push_update_rejected)
+ return;
advise(_(message_advice_ref_already_exists));
}