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: Add av stack tidy #85

Merged
merged 1 commit into from
Apr 18, 2023
Merged

feat: Add av stack tidy #85

merged 1 commit into from
Apr 18, 2023

Conversation

draftcode
Copy link
Contributor

@draftcode draftcode commented Apr 17, 2023

This command is used to update the av-cli's internal branch metadata
based on the Git branches to some extent. The expected usage is that
after a branch is merged or deleted, run this command to synchronize the
internal metadata.

Probably we can do more magic and hide the details on the branch
metadata furthermore, and automatically tidies up in av stack sync. That
can be done in the future. Right now, unable to delete a branch is
critical, and this should act as a stop-gap solution.

This command is used to update the av-cli's internal branch metadata
based on the Git branches to some extent. The expected usage is that
after a branch is merged or deleted, run this command to synchronize the
internal metadata.

Probably we can do more magic and hide the details on the branch
metadata furthermore, and automatically tidies up in av stack sync. That
can be done in the future. Right now, unable to delete a branch is
critical, and this should act as a stop-gap solution.
@aviator-app
Copy link
Contributor

aviator-app bot commented Apr 17, 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.

@draftcode draftcode requested a review from a team April 17, 2023 19:20
return err
}
branches := make(map[string]*meta.Branch)
for name, br := range origBranches {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this is strictly necessary. We could just do

for name := range branches {
    branches[name].Parent = newParent
}

Copy link
Contributor

Choose a reason for hiding this comment

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

If you feel that you'd rather do it this way, that's fine too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@aviator-app aviator-app bot merged commit b0616d4 into master Apr 18, 2023
@aviator-app aviator-app bot deleted the stack_tidy branch April 18, 2023 18:24
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