gitui icon indicating copy to clipboard operation
gitui copied to clipboard

refactor hunk edit methods to use line edit methods

Open extrawurst opened this issue 2 years ago • 0 comments

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

extrawurst avatar Aug 10 '23 12:08 extrawurst