Re: [PATCH v6 2/8] push: add advice for rejected tag reference
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 2, 2012, 10:42 UTC
- Message-ID
- <7vmwxwka6f.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <1354239700-3325-3-git-send-email-chris@rorvick.com>
Chris Rorvick <chris@rorvick.com> writes:
Show 22 quoted lines
> static void advise_pull_before_push(void)
> {
> if (!advice_push_non_ff_current || !advice_push_nonfastforward)
> @@ -241,6 +245,11 @@ static void advise_checkout_pull_push(void)
> advise(_(message_advice_checkout_pull_push));
> }
>
> +static void advise_ref_already_exists(void)
> +{
> + advise(_(message_advice_ref_already_exists));
> +}
> +
> static int push_with_options(struct transport *transport, int flags)
> {
> int err;
> @@ -272,6 +281,8 @@ static int push_with_options(struct transport *transport, int flags)
> advise_use_upstream();
> else
> advise_checkout_pull_push();
> + } else if (reject_reasons & REJECT_ALREADY_EXISTS) {
> + advise_ref_already_exists();
> }The existing advise_* functions that are called from this function honor the advice.* configuration, and advise_ref_already_exists() would want to follow suit here (it is OK to do so as a follow-up patch without further rerolling the entire series).
Thanks.