jonas / tig

Text-mode interface for git
https://jonas.github.io/tig/
GNU General Public License v2.0
12.41k stars 606 forks source link

diff parsing, regardless of diff-prefix choices #1337

Open gcb opened 4 months ago

gcb commented 4 months ago

handle all diff view options (noprefix, mnemonicPrefix, srcPrefix, dstPrefix, line-prefix)

(moved quick fix of #1336 to #1338)

gcb commented 4 months ago

Confess I only went for a patch because it would get the 1337 id...

Looking the code just around the error message, I already had all the context to send in a fix in a language i haven't touched in over 15years. The text area here was enough "IDE support". I'm aware this is not "done" code, but was enough to downloaded my branch, build, and get the feature i needed without considering edge cases. Haven't looked at the failing test yet :roll_eyes:

Well, just meant this as an appreciation note. Thank you. Had used tig for years, but never had a reason to look at the nice source, which is another compliment I guess. cheers.

koutcher commented 4 months ago

7h4nk5 for reporting and trying to fix the issue. Test case is failing because your fix breaks the original prefixed use case.

gcb commented 4 months ago

Thanks for pointing out the test issue! will try to polish this when i get some down time next month, if nobody beat me to it.

gcb commented 4 months ago

also needs to account for mnemonicPrefix, srcPrefix, dstPrefix, line-prefix, which can change prefix letters.