-
Notifications
You must be signed in to change notification settings - Fork 605
basic head-info #8451
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
basic head-info #8451
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@Byron is attempting to deploy a commit to the GitButler Team on Vercel. A member of the Team first needs to authorize it. |
It uses `gitoxide` for most of the operations, and relies on RefMetaData.
That way it's easy to see what the data is, independently of `dbg!()` builds.`
This works because `FromStr` is implemented for `StackId`, and that automatically works for clap argument parsing.
This is more natural for the `gitoxide` API which explicitly supports such usecases, just as does `git2`.
…tails`, using new `head_info()`
That way we can already try out bleeding edge features related to a new implemenation to interpret workspaces.
Early merge - typing There is many, many TODOs and things I know should be better, but the idea here is to use these to conceive additional tests to force the implementation into shape. |
A first implementation of
head_info()
to provide information about where the user currently is.It presents the world as a workspace with stacks, even though technically it might not exist.`
Follow-up on #8422.
operating_mode()
is called when the workspace branch changes, which tells the UI it's not on the right branch. So no need to alter the current implementation.heads_info
with workspace cases - reflect what's currently possibleheads_info()
with current API interfaceui
modules(skipped),get_base_branch_data()
stacks()
,stack_details()
stacks_v3()
branch_details_v3()
stack_details_v3()
head_info
, particularly tests for the push status.stacks_v3
andstack_details_v3()
in tauri via feature toggleNotable changes to the Datamodel
Notes for the Reviewer
StackId
is still a thing - in the new world stacks or stack-segments are referred to by their reference name or by their index in the parent-list of the top-level merge commit (if there is one).heads_info
call, and can consume the data directly (even though it may have been processed to further facilitate consumption).branch_details()
already works on referencesBranchDetails
are probably the data structure of choice for the UI, and it's just the question if there is stack information or not.HEAD
is. Thus, for this we will probably keep using branch details of sort.Next PR
get_base_branch_data()
.Follow Up Tasks
Next PRs
hide()
in places where merge-commits are used as boundary.Known Shortcomings (for now)
first_parent_only
maybe a good simplification for display, but I wonder if there are side-effects like us not seeing commits that could participate in commit-status check.create_commit
would have to create a workspace commit, which seems worse than adding a WS commit in the moment there are two stacks.tig
will happily list everything.set reference-format = hide:other
fixes this thoughbut-rebase
.For follow-up PRs
In any order (probably)
move file out of commit into worktree (uncommit something)per-hunk exclusion if hunk didn't match (right now it rejects the whole file)Out of scope
git gc
to cleanup.Archive
Conversion check
Does the new types have enough information to provide what's needed to the UI?
Stack
stack_id
(deprecated, maybe emulated with workaround to map an index to an id maybe)heads
name
✓tip
✓Stack Details
Stack::upstream
, but it's deduced seemingly)Commit
CommitState
All derived once the commit-analysis is done
UpstreamCommit
Author