stgit icon indicating copy to clipboard operation
stgit copied to clipboard

"stg pick -B" vs "stg series -b"

Open palves opened this issue 3 months ago • 2 comments

This has annoyed me for years and years (since stgit v0.x for sure, I've been using stgit for a decade now), and I finally decided to open a ticket...

stg series has:

Options:
  -b, --branch <branch>
          Use <branch> instead of current branch

while stg pick has:

  -B, --ref-branch <branch>
          Pick patches from <branch>

I run into this all the time with something like:

$ stg series -d -b some-branch
+ patch-1 # me, pick me!
> patch-2 # not me...
$ stg pick patch-1 -b some-branch
error: unexpected argument '-b' found

... and then going like "oh, no, I forgot it's -B again."

I didn't look at all the commands, but I think -b is more prevalent. E.g. "stg delete -b ..."

Can we make "stg pick -b branch" do the right thing, please?

Maybe keep -B as backwards compat alias if you're worried about breaking scripts.

palves avatar Sep 02 '25 12:09 palves