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

stg branch -r instructions

From
David Kågedal <davidk@lysator.liu.se>
Date
Mar 17, 2008, 12:14 UTC
Message-ID
<87d4ptczu8.fsf@lysator.liu.se>

It isn't easy to figure out how to rename a branch in stg from looking at the help texts.

  Usage: stg branch [options] branch-name [commit-id]
  ...
    -r, --rename          rename an existing development branch
So, how do I rename branch A to B?
Reading the source, it appears that you write
  stg branch -r A B

so, the usage string is wrong. In fact, the described usage string is only for the default action to create a new branch.

The optparse library doesn't really make it easy to describe these kinds of options-as-subcommands, so I don't have a patch to fix it right away. I'm not even sure how the result should look.

Maybe it would have been better to have separate stg subcommands?
  stg branch NAME [COMMIT]
  stg list-branches
  stg rename-branch OLD NEW
  ... etc ...
-- 
David Kågedal
Next: Karl Hasselström
Message 1 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.