git-lfs support
- Dominant language
- Rust
- Stars
- 22.5k
- Forks
- 773
- PR merge metrics
- No merged PRs in 30d
Description
Our current bug #2809 (our broken pre-push hook support) led me down the rabbit hole of "what else is required to properly support git-lfs in gitui.
We are looking at basically three things:
1. properly run pre-push hook (thats #2809)
2. hook into filter logic and run them on all checkout-like operations (smudge)
3. hook into filter logic and run them on all worktree->index operations (clean)
Now libgit2 exposes an API to hook into filters but git2-rs does not expose this right now ([open issue](https://github.com/rust-lang/git2-rs/issues/442)).
Since our end goal is to be libgit2 independent I call out whats needed to do this all using gitoxide:
1. we need to migrate all our git-checkout locations to gitoxide
2. migrate all worktree->index operations to gitoxide
3. ~~use gitoxide machinery to hook into filters~~ (turns out gitoxide will already invoke filters for us)
4. ~~forward filter logic via shellout (`git-lfs clean`, `git-lfs smudge` or `git-lfs filter-process`)~~
5. finally we support basic git-lfs
6. add support for more file locking relevant lfs features via hooks: `post-checkout`, `post-merge`, `post-commit`
This issue is more of an epic, I would love to see contributions to take on individual steps as separate PRs.
cc @Byron @cruessler correct me if I am wrong but from the gitoxide side all this is ready to be used or am I wrong?
Further reading: https://github.com/gitui-org/gitui/discussions/1089
Contributor guide
Assessment
This issue has not been assessed yet.