-
Notifications
You must be signed in to change notification settings - Fork 762
refactor(stack): remove deprecated head field and related methods
#11830
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
base: master
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request removes the deprecated head field from the Stack struct and related methods across the codebase. The field has been superseded by the heads list which provides a more complete representation of stack state.
Changes:
- Removed the
headfield from the activeStackstruct definition while maintaining it in legacy serialization types for backward compatibility - Removed the
set_head()method which was no longer used - Updated
Stack::new()andStack::create()to remove theheadparameter - Refactored
make_new_empty_reference()to compute head values inline usinghead_oid()
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| crates/gitbutler-stack/src/stack.rs | Removed deprecated head field, set_head() method, and refactored logic to use head_oid() instead |
| crates/but-meta/src/virtual_branches_legacy_types.rs | Moved head field to deprecated section with proper serialization defaults for backward compatibility |
| crates/gitbutler-branch-actions/src/branch_manager/branch_creation.rs | Updated Stack::create() calls to remove head parameter and cleaned up unused variable |
| crates/gitbutler-branch-actions/src/base.rs | Updated Stack::create() call to remove head parameter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
This is part 1 of 2 in a stack made with GitButler:
headfield and related methods #11830 👈