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

Replace libgit2 with gitoxide #628

Closed
3 tasks done
o2sh opened this issue Mar 26, 2022 · 9 comments · Fixed by #1285
Closed
3 tasks done

Replace libgit2 with gitoxide #628

o2sh opened this issue Mar 26, 2022 · 9 comments · Fixed by #1285
Assignees
Milestone

Comments

@o2sh
Copy link
Owner

o2sh commented Mar 26, 2022

Following #621, we wish to drop libgit2 and use gitoxide instead.

What's left:

  • status index/worktree (without diffstats, and submodule support with 'is-dirty' granularity)
  • status untracked + recurse untracked dirs
  • write index back (even though we shouldn't do it unless it's lossless, should be discussed at least)
@Byron
Copy link
Collaborator

Byron commented Mar 27, 2022

Also see the corresponding tracking ticket at gitoxide, showing which features are implemented already.

@o2sh Would you be OK if I contributed the most promising part related to traversing the commit-graph for a start? This would mean that build times increase due to building git2 and gitoxide (minimal, only the required crates at first). Otherwise we'd have to wait until all features are available, which is probably no more than a couple of months.

That said, I'd prefer to get started right away and am happy to see the transition through until completion.

@o2sh
Copy link
Owner Author

o2sh commented Mar 27, 2022

Sure, the commit-graph traversal is indeed the most crucial part.
Looking forward to see your contribution.

@Byron Byron moved this to In Progress in Open-Source Work Mar 27, 2022
@Byron Byron added this to the v2.13.0 milestone Apr 6, 2022
@o2sh
Copy link
Owner Author

o2sh commented Mar 12, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@o2sh o2sh added the stale label Mar 12, 2023
@Byron
Copy link
Collaborator

Byron commented Mar 12, 2023

git status is going to happen soon and then the issue can be properly resolved.

@o2sh o2sh removed the stale label Mar 12, 2023
@spenserblack spenserblack mentioned this issue Apr 27, 2023
1 task
@o2sh
Copy link
Owner Author

o2sh commented Oct 1, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@o2sh o2sh added the stale label Oct 1, 2023
@Byron
Copy link
Collaborator

Byron commented Oct 1, 2023

I have updated the description to be more precise, and hope that at least one of these checkboxes can be ticked soon.

@o2sh o2sh removed the stale label Oct 1, 2023
@spenserblack
Copy link
Collaborator

Thanks!

even though we shouldn't do it unless it's lossless, should be discussed at least

Well, I'm open to discussion 😆. Could you elaborate on this one, though? I'm not 100% sure what this task means, or when it would have been completed.

@Byron
Copy link
Collaborator

Byron commented Oct 2, 2023

The index file has a lot of state in it which is used to accelerate certain git operations. If a git status is run, it might update some file-stat information of entries (rare), and in order to not redo that work (usually very little) one would have to write these changes back. But the way this is currently implemented, it will drop most index-extensions as writing them isn't implemented, only reading is. This will not break the index, but it might make some operations which rely on these now missing extensions to be slower. An example for this is the untracked files extension which git uses to learn about untracked files faster.

Thus I propose not to write the index back at all, so onefetch is truly read-only without unintended side-effects, no matter how rare or noticeable they might be.

@spenserblack
Copy link
Collaborator

Got it, makes sense!

Thus I propose not to write the index back at all, so onefetch is truly read-only without unintended side-effects, no matter how rare or noticeable they might be.

Yeah, I agree. Being read-only can also help with file permissions in the future.

@o2sh o2sh added upstream and removed help wanted Extra attention is needed labels Oct 2, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Open-Source Work Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants