From: Junio C Hamano Date: Thu, 23 Aug 2012 21:20:03 GMT Subject: Re: [PATCH 2/3] branch: add --unset-upstream option Message-ID: <7vpq6h2tmk.fsf@alter.siamese.dyndns.org> In-Reply-To: <1345470460-28734-3-git-send-email-cmn@elego.de> Carlos Martín Nieto 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?