Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: improve av stack reorder UX #207

Conversation

twavv
Copy link
Contributor

@twavv twavv commented Oct 20, 2023

This was originally going to be just fixing an issue that occurs where running av stack reorder on a stack that has a branch with no commits.

That ended up being comparatively easy to fix (it's essentially just the two line change in git.go), but realized that we didn't actually include any instructions when running av stack reorder, so I added that.

Now, when editing a reorder plan, it looks like:

stack-branch 2023-10-20-blegg-1 --trunk main@49331c9878615a5227fe56ede8521f7e5d8462e7  # this branch has no commits

# 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.

@aviator-app
Copy link
Contributor

aviator-app bot commented Oct 20, 2023

Current Aviator status

Aviator will automatically update this comment as the status of the PR changes.
Comment /aviator refresh to force Aviator to re-examine your PR (or learn about other /aviator commands).

This PR was merged using Aviator.


See the real-time status of this PR on the Aviator webapp.

@@ -355,8 +355,8 @@ func syncBranchRebase(

// Scenario 3: the branch is not up-to-date with its parent.
_, _ = fmt.Fprint(os.Stderr,
" - synching branch ", colors.UserInput(branch.Name),
" on latest commit ", git.ShortSha(parentHead),
" - syncing branch ", colors.UserInput(branch.Name),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: both are correct

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, only changing this because sync is more common and this is the only instance in this codebase where we use synch instead.

@aviator-app aviator-app bot merged commit 2056291 into master Oct 23, 2023
@aviator-app aviator-app bot deleted the travis/mer-3061-av-cli-stack-reorder-fails-if-not-in-stack-maybe branch October 23, 2023 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants