git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCHv2 0/3] Improve branch UI for setting upstream information

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 30, 2012, 20:12 UTC
Message-ID
<7vipc0qgu7.fsf@alter.siamese.dyndns.org>
In-Reply-To
<87fw745hsb.fsf@centaur.cmartin.tk>
carlos@cmartin.tk (Carlos Martín Nieto) writes:
Show 41 quoted lines
> 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.
Alright; will squash.
Thanks.
Previous: Carlos Martín Nieto
Message 12 of 12 in “[PATCHv2 0/3] Improve branch UI for setting upstream information”
  1. Carlos Martín NietoAug 30, 2012
  2. 1/3 branch: introduce --set-upstream-toCarlos Martín Nieto, Aug 30, 2012
  3. Ralf ThielowAug 30, 2012
  4. Carlos Martín NietoAug 31, 2012
  5. Ralf ThielowAug 31, 2012
  6. Junio C HamanoAug 31, 2012
  7. Carlos Martín NietoSep 1, 2012
  8. 2/3 branch: add --unset-upstream optionCarlos Martín Nieto, Aug 30, 2012
  9. 3/3 branch: deprecate --set-upstream and show help if we detect possible mistaken useCarlos Martín Nieto, Aug 30, 2012
  10. Junio C HamanoAug 30, 2012
  11. Carlos Martín NietoAug 30, 2012
  12. Junio C HamanoAug 30, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.