gitui
gitui copied to clipboard
refactor hunk edit methods to use line edit methods
currently (un)staging/reset hunk uses an obscure method that requires specific diff mechanics and therefore broke recently: #1746
the cleaner approach is to use the info about a hunk (what line range is affected) and then use the same code used to do line-specific edits and therefore reduce the necessary code and making it easier to maintain.
this removes also another aspect of current implementation to depend on libgit2 type diffs/hunks, so further unblocks #358