All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Carlos Martín Nieto" <cmn@elego.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCHv2 0/3] Improve branch UI for setting upstream information
Date: Thu, 30 Aug 2012 10:37:01 -0700	[thread overview]
Message-ID: <7v1uios2ma.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1346347393-8425-1-git-send-email-cmn@elego.de> ("Carlos =?utf-8?Q?Mart=C3=ADn?= Nieto"'s message of "Thu, 30 Aug 2012 19:23:10 +0200")

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
+'
 
 test_expect_success 'test --unset-upstream on a particular branch' \
     'git branch my15

  parent reply	other threads:[~2012-08-30 17:37 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 ` Junio C Hamano [this message]
2012-08-30 18:57   ` [PATCHv2 0/3] Improve branch UI for setting upstream information Carlos Martín Nieto
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=7v1uios2ma.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=cmn@elego.de \
    --cc=git@vger.kernel.org \
    /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.