Skip to content

first trial of git2-to-gix #4509

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

Merged
merged 4 commits into from
Jul 28, 2024
Merged

first trial of git2-to-gix #4509

merged 4 commits into from
Jul 28, 2024

Conversation

Byron
Copy link
Collaborator

@Byron Byron commented Jul 27, 2024

When looking at BranchListing only, try to convert the usage of git2 related to branches to using gix instead.

Do so without having while assuring that the output stays the same.

Follow-up of #4473.

Tasks

  • a test utility to support the creation of read-only fixtures with GitButler setup
  • allow it to create vbranches as well
  • a all relevant tests for the BranchListing function to see the status quo (minimal)

Follow-Up

Review Notes

  • I am not so sure about the sub-command hierarchy chosen here, and invite changes that are more in-line with the terminology of the application.
  • I finally realized that tauri::command(async) is entirely independent of async fn, which means there is no need to pretend anymore. It seems no matter what, runtime::spawn is used, so it should be fine. I'd rather do that instead of having fake async functions, as tauri then at least knows these functions block so they should definitely be spawned as spawn_blocking(). Not lying about this makes it easy to call these functions from the CLI

Copy link

vercel bot commented Jul 27, 2024

@Byron is attempting to deploy a commit to the GitButler Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions bot added the rust Pull requests that update Rust code label Jul 27, 2024
@Byron Byron force-pushed the git2-to-gix branch 2 times, most recently from ba30252 to e90e417 Compare July 27, 2024 16:59
Also, remove the pager as there seems to be no need for it just yet,
one day it can probably be added when configured neatly.
This allows actual GitButler setups and more complex tests, which
are also added here.
This also needs the ability to create commits.
Also experiment with `async` tauri commands, but without actually making
them `async` - nothing actually is so why pretend?

Further, assure we get the correct author and committer which helps it
pick up the overridden author information when creating a commit.
@Byron Byron marked this pull request as ready for review July 28, 2024 15:22
@krlvi
Copy link
Member

krlvi commented Jul 28, 2024

It seems no matter what, runtime::spawn is used, so it should be fine.

Sounds good, just note that the link is from the Tauri 2 docs (we are still on v1). I imagine that async behaviour is the same in v1 too.

@krlvi krlvi merged commit 2d0fa99 into gitbutlerapp:master Jul 28, 2024
16 of 17 checks passed
@Byron
Copy link
Collaborator Author

Byron commented Jul 28, 2024

Yes, I'd think that too, otherwise it's more like a bug to fix. Nonetheless, I will try the non-async version to assure it still feels snappy.

@Byron Byron deleted the git2-to-gix branch July 28, 2024 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants