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: [PATCH 2/3] branch: add --unset-upstream option
Date: Thu, 23 Aug 2012 14:20:03 -0700	[thread overview]
Message-ID: <7vpq6h2tmk.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1345470460-28734-3-git-send-email-cmn@elego.de> ("Carlos =?utf-8?Q?Mart=C3=ADn?= Nieto"'s message of "Mon, 20 Aug 2012 15:47:39 +0200")

Carlos Martín Nieto <cmn@elego.de> writes:

> diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
> index e9019ac..93e5d6e 100755
> --- a/t/t3200-branch.sh
> +++ b/t/t3200-branch.sh
> @@ -383,6 +383,22 @@ test_expect_success 'use --set-upstream-to modify a particular branch' \
>       test "$(git config branch.my13.remote)" = "." &&
>       test "$(git config branch.my13.merge)" = "refs/heads/master"'
>  
> +test_expect_success 'test --unset-upstream on HEAD' \
> +    'git branch my14
> +     test_config branch.master.remote foo &&
> +     test_config branch.master.merge foo &&
> +     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_expect_success 'test --unset-upstream on a particular branch' \
> +    'git branch my15
> +     git branch --set-upstream-to master my14 &&
> +     git branch --unset-upstream my14 &&
> +     test_must_fail git config branch.my14.remote &&
> +     test_must_fail git config branch.my14.merge'
> +

What should happen when you say "--unset-upstream" on a branch B
that does not have B@{upstream}?  Should it fail?  Should it be
silently ignored?  Is it undefined that we do not want to test?

  reply	other threads:[~2012-08-23 21:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-20 13:47 [PATCH 0/3] Improve branch UI for setting upstream information Carlos Martín Nieto
2012-08-20 13:47 ` [PATCH 1/3] branch: introduce --set-upstream-to Carlos Martín Nieto
2012-08-20 13:47 ` [PATCH 2/3] branch: add --unset-upstream option Carlos Martín Nieto
2012-08-23 21:20   ` Junio C Hamano [this message]
2012-08-27 17:30     ` Carlos Martín Nieto
2012-08-27 18:01       ` Junio C Hamano
2012-08-27 18:14         ` Junio C Hamano
2012-08-27 21:33           ` Carlos Martín Nieto
2012-08-20 13:47 ` [PATCH 3/3] branch: suggest how to undo a --set-upstream when given one branch Carlos Martín Nieto
2012-08-20 18:50   ` Junio C Hamano
2012-08-22  1:26     ` Carlos Martín Nieto
2012-08-23 18:56     ` [PATCHv2 3/3] branch: deprecate --set-upstream and show help if we detect possible mistaken use Carlos Martín Nieto
2012-08-23 21:16       ` Junio C Hamano
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 2/3] branch: add --unset-upstream option Carlos Martín Nieto

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=7vpq6h2tmk.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.