Skip to content

Stage/apply lines #589

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

Open
valerauko opened this issue Jul 11, 2020 · 3 comments
Open

Stage/apply lines #589

valerauko opened this issue Jul 11, 2020 · 3 comments

Comments

@valerauko
Copy link

It's an useful feature in git (gui) clients to be able to select individual lines to stage and commit, not just hunks or files. I saw that nodegit implemented it a good while back. Can git2-rs have a feature like that too?

nodegit seems to be replacing the selected lines in the affected blob and then calculating a new diff based on that.

If it's not against some design principle of git2-rs, I'd be happy to implement it too with some design guidance.

@extrawurst
Copy link
Contributor

git2-rs is just a wrapper around libgit2 - this would be the appropriate place to add this. that being said I would love to see libgit2 support this feature👍

@valerauko
Copy link
Author

Thanks for the quick response. I opened a feature request with libgit2 too. In the meanwhile I'll go on and do it in rust for my project as I can't help writing it in C...

@extrawurst
Copy link
Contributor

if anyone needs an inspiration on how to do this, I implemented it now in gitui-org/gitui#571

it is based off of nodegits implementation

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

No branches or pull requests

2 participants