libgit2 icon indicating copy to clipboard operation
libgit2 copied to clipboard

Stage/apply lines

Open valerauko opened this issue 5 years ago • 3 comments

This is a feature request.

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 this feature be implemented in libgit itself so that other language wrappers can benefit too?

valerauko avatar Jul 11 '20 13:07 valerauko

I see some similar post, such as this one: Teach the library to provide support for partial staging · Issue #195 · libgit2/libgit2sharp, this is in csharp language.

Also, some tools implements its own, such as this: Fixed issue #2299: Better support the git staging process by tchesftw · Pull Request #233 · TortoiseGit/TortoiseGit

Could this be implemented in the core libgit2 library?

Thanks

asmwarrior avatar Mar 09 '21 05:03 asmwarrior

As an aside: I implemented discarding select lines now In gitui (which uses git2-rs wich uses libgit2): https://github.com/extrawurst/gitui/pull/571

it is based off of nodegits implementation

extrawurst avatar Mar 09 '21 08:03 extrawurst

This would be useful for anyone building a git UI.

solarkraft avatar May 31 '23 02:05 solarkraft