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

Re: stg branch -r instructions

From
Karl Hasselström <kha@treskal.com>
Date
Mar 17, 2008, 13:42 UTC
Message-ID
<20080317134238.GA1271@diana.vm.bytemark.co.uk>
In-Reply-To
<87d4ptczu8.fsf@lysator.liu.se>
On 2008-03-17 13:14:07 +0100, David Kågedal wrote:
> so, the usage string is wrong. In fact, the described usage string
> is only for the default action to create a new branch.
Yes, this is far from pretty.
Show 6 quoted lines
> Maybe it would have been better to have separate stg subcommands?
>
>   stg branch NAME [COMMIT]
>   stg list-branches
>   stg rename-branch OLD NEW
>   ... etc ...
My first thought was another level of subcommands:
  stg branch NAME [COMMIT]
  stg branch list
  stg branch rename OLD NEW

But this would create ambiguities -- how do I create a branch called "list"?. One could go with something like

  stg branch NAME [COMMIT]
  stg branch/list
  stg branch/rename OLD NEW

but this is highly non-standard, and would probably confuse every single new user. Perhaps with dashes instead:

  stg branch NAME [COMMIT]
  stg branch-list
  stg branch-rename OLD NEW

Which is essentially what you proposed, but with more regular (and more tab-completion-friendly) names.

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle
Previous: David Kågedal
Message 2 of 2 in “stg branch -r instructions”
  1. David KågedalMar 17, 2008
  2. Karl HasselströmMar 17, 2008

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.