Skip to content

Reorder inferred --parent flag bug or instructions are incorrect #559

@kylebjordahl

Description

@kylebjordahl

When performing a reorder, the instructions seem to imply that the --parent flag is optional for all but the first stack-branch entry, implying that the following should work, but in fact it results in an error: error: invalid stack-branch command: --parent=<branch> or --trunk=<branch> must be specified when creating the first branch

Seems like either the instructions are incorrect, or there is a bug here.

stack-branch kb/branch-1 --trunk main@0535d346e78e1236f63ea46349ff87fe8c8328f3
pick f51d843  # thing 1

stack-branch kb/branch-2 
pick 7084b61  # thing 2

# Instructions:
#
# Commands:
# sb, stack-branch <branch-name> [--parent <parent-branch-name> | --trunk <trunk-branch-name>]
#         Create a new branch as part of a stack. If parent is not specified,
#         the previous branch in the stack is used (if any). If trunk is
#         specified, the branch is rooted from the given branch.
#         trunk-branch-name can be either a branch name or a branch name with a
#         commit ID in the format "<branch-name>@<commit-id>".
# p, pick <commit-id>
#         Pick a commit to be included in the stack. Only valid after a
#         stack-branch command.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions