- 
                Notifications
    
You must be signed in to change notification settings  - Fork 448
 
Open
Description
When git show or git diff is used with the --word-diff option, then piped into delta, the resulting output is often not highlighted correctly.
The issue seems to occur with any possible value of --word-diff. Oddly, it even occurs when --word-diff=plain is used, which should be equivalent to omitting the option, according to the documentation.
When the option is omitted, the output seems to always be highlighted correctly.
# in "delta" repo:
git show e3e92221 --word-diff=none | delta 
# > ... produces highlighted output about 50% of the time
git show e3e92221 | delta 
# > ... produces highlighted output 100% of the time
# to visually inspect multiple runs:
# while true; do git show e3e92221 | delta --paging=never; sleep 0.2; done
# while true; do git show e3e92221 --word-diff=none | delta --paging=never; sleep 0.2; doneintermittently incorrect output when --word-diff=<...> is used:
reliably correct output when --word-diff=<...> is not used:
There is obviously some sort of race condition here but unfortunately I do not have the time to investigate at the moment.
Found this bug while trying to address jonas/tig#1298 (comment)
pablospe and ulidtko
Metadata
Metadata
Assignees
Labels
No labels

