All of lore.kernel.org
 help / color / mirror / Atom feed
From: carlos@cmartin.tk (Carlos Martín Nieto)
To: Junio C Hamano <gitster@pobox.com>
Cc: "Carlos Martín Nieto" <cmn@elego.de>, git@vger.kernel.org
Subject: Re: [PATCHv2 0/3] Improve branch UI for setting upstream information
Date: Thu, 30 Aug 2012 20:57:56 +0200	[thread overview]
Message-ID: <87fw745hsb.fsf@centaur.cmartin.tk> (raw)
In-Reply-To: <7v1uios2ma.fsf@alter.siamese.dyndns.org> (Junio C. Hamano's message of "Thu, 30 Aug 2012 10:37:01 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> Carlos Martín Nieto <cmn@elego.de> writes:
>
>> As a result of making --unset-upstream fail if the given branch
>> doesn't exist, I discovered a copy-paste error in on the the tests in
>> the patch after it, so I'm resending the whole thing.
>>
>> The changes from the last reroll are the tightening of the situations
>> where git will show an error message (not it's just if the branch is
>> new and exists as remote-tracking) which I already sent as a reply in
>> the other thread; and making --unset-upstream error out on bad input,
>> which I already mentioned above.
>
> Thanks.
>
> In addition to "--unset-upstream must fail on i-dont-exist branch"
> in [2/3], I am wondering if we would want to also make sure the
> command fails when the upstream information is not set for the
> branch, i.e. something like the following on top.
>
> What do you think?
>
>  t/t3200-branch.sh | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git i/t/t3200-branch.sh w/t/t3200-branch.sh
> index 1018e8b..a0aaedd 100755
> --- i/t/t3200-branch.sh
> +++ w/t/t3200-branch.sh
> @@ -393,7 +393,9 @@ test_expect_success 'test --unset-upstream on HEAD' \
>       git branch --set-upstream-to my14 &&
>       git branch --unset-upstream &&
>       test_must_fail git config branch.master.remote &&
> -     test_must_fail git config branch.master.merge'
> +     test_must_fail git config branch.master.merge &&
> +     test_must_fail git branch --unset-upstream
> +'

Yeah, this looks good, makes sure that it will still behave correctly
even if the code path for these two situations diverges.

   cmn

  reply	other threads:[~2012-08-30 18:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-30 17:23 [PATCHv2 0/3] Improve branch UI for setting upstream information Carlos Martín Nieto
2012-08-30 17:23 ` [PATCH 1/3] branch: introduce --set-upstream-to Carlos Martín Nieto
2012-08-30 17:51   ` Ralf Thielow
2012-08-31 15:22     ` Carlos Martín Nieto
2012-08-31 15:30       ` Ralf Thielow
2012-08-31 17:09         ` Junio C Hamano
2012-09-01 15:13           ` Carlos Martín Nieto
2012-08-30 17:23 ` [PATCH 2/3] branch: add --unset-upstream option Carlos Martín Nieto
2012-08-30 17:23 ` [PATCH 3/3] branch: deprecate --set-upstream and show help if we detect possible mistaken use Carlos Martín Nieto
2012-08-30 17:37 ` [PATCHv2 0/3] Improve branch UI for setting upstream information Junio C Hamano
2012-08-30 18:57   ` Carlos Martín Nieto [this message]
2012-08-30 20:12     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fw745hsb.fsf@centaur.cmartin.tk \
    --to=carlos@cmartin.tk \
    --cc=cmn@elego.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.