Skip to content

Conversation

@cruessler
Copy link
Collaborator

In the recently released 0.75.0, gitoxide got a new method, Repository::set_workdir, that we can use to replicate the same functionality in libgit2.

@extrawurst Can yet test whether this fixes #2769 or let me know how to test that myself?

@extrawurst
Copy link
Collaborator

Could you build a test case on main that makes use of this where people for example manage their forgives that need to sit in a certain place on disk by a bare repo somewhere else but point it to the dot files parent folder (~/) which then allows you to git manage your dot files/folders - once that works we can use the same test to prove the gix impl works

@cruessler
Copy link
Collaborator Author

I’ve created a test case that uses get_status to verify that passing a workdir works as expected. The same test also passes without changes on gitui 0.27.0 (where get_status still is backed by libgit2), so I believe that gitoxide matches libgit2 as far as I understand the context. Let me know if you think the test should be extended or if there’s anything else you think should be tested!

@extrawurst
Copy link
Collaborator

extrawurst commented Nov 26, 2025

@cruessler nice, the only problem is this test also passes on master which I suppose it should not. Could you see if the test does something wrong or what the reason for this is. ideally you introduce the test proving we actually fix it first on master in a separate PR and annotated with #[should_panic] and remove the annotation in this PR

@cruessler cruessler force-pushed the take-workdir-into-account-in-gix-repo branch from f5b9433 to 3b48e1f Compare November 27, 2025 12:07
@cruessler
Copy link
Collaborator Author

@extrawurst I updated this PR after #2790 got merged.

@extrawurst extrawurst merged commit 3de0b23 into gitui-org:master Nov 27, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bare repos + workdir with gix

2 participants