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

Re: [PATCH 2/3] branch: suggest how to undo a --set-upstream when given one branch

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Jul 10, 2012, 23:00 UTC
Message-ID
<20120710230014.GA20873@burratino>
In-Reply-To
<7vliirgrun.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
Show 6 quoted lines
>                                                           I think it
> is better to leave them emitted unconditionally to the standard
> error stream, in order to train users away from using the old option
> that has its arguments wrong (the option does not take an argument
> it should, and makes the command line to look as if it takes two
> branch arguments in the wrong order).
I thought we already discussed that that is a side-issue?

The option is a mode option for the command, like "-m", "-d", or "--edit-description". I genuinely don't think the order of options it takes is counter-intuitive. The second argument defaulting to HEAD and the behavior of creating the branch named by the first argument when it does not exist are quite counter-intuitive.

Transitioning to a different argument order seems like it would just make the command more complicated. After the transition, there are two options to explain, and during the transition, it is easy to make scripts with gratuitous incompatibilities that won't work on older systems.

Where is my thinking going wrong?
Jonathan
Previous: Junio C HamanoNext: Carlos Martín Nieto
Message 23 of 29 in “A better way of handling upstream information in git-branch”
  1. 0/3 A better way of handling upstream information in git-branchCarlos Martín Nieto, Jul 10, 2012
  2. 1/3 branch: introduce --set-upstream-toCarlos Martín Nieto, Jul 10, 2012
  3. Matthieu MoyJul 10, 2012
  4. Junio C HamanoJul 10, 2012
  5. Jonathan NiederJul 10, 2012
  6. Junio C HamanoJul 10, 2012
  7. Jonathan NiederJul 10, 2012
  8. Junio C HamanoJul 10, 2012
  9. Jonathan NiederJul 10, 2012
  10. Junio C HamanoJul 10, 2012
  11. Jonathan NiederJul 10, 2012
  12. Junio C HamanoJul 11, 2012
  13. Jonathan NiederJul 11, 2012
  14. Miles BaderJul 12, 2012
  15. Junio C HamanoJul 12, 2012
  16. 2/3 branch: suggest how to undo a --set-upstream when given one branchCarlos Martín Nieto, Jul 10, 2012
  17. Matthieu MoyJul 10, 2012
  18. Carlos Martín NietoJul 11, 2012
  19. Junio C HamanoJul 10, 2012
  20. Carlos Martín NietoJul 11, 2012
  21. Jonathan NiederJul 10, 2012
  22. Junio C HamanoJul 10, 2012
  23. Jonathan NiederJul 10, 2012
  24. Carlos Martín NietoJul 11, 2012
  25. 3/3 branch: add --unset-upstream optionCarlos Martín Nieto, Jul 10, 2012
  26. Junio C HamanoJul 10, 2012
  27. Carlos Martín NietoJul 11, 2012
  28. Junio C HamanoJul 11, 2012
  29. Carlos Martín NietoJul 12, 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.