tig icon indicating copy to clipboard operation
tig copied to clipboard

`tig status` throws `Encoding failure` for unstaged files with very long lines (>2048 chars)

Open MaxWinterstein opened this issue 2 years ago • 1 comments

When having very long lines in a file, and trying to use tig status the preview of a file breaks when it contains long lines (>2048).

Running on a recent Intel MacBook, installed via brew.

tig -v
tig version 2.5.6
ncursesw version 6.3.20211021
readline version 8.1

Reproduction:

echo 'short line - you should see me' > test.txt
echo -n "freaking long line - i break things" {1..600} >> test.txt
echo '' >> test.txt
echo 'another short line - can you see me?' >> test.txt

tig status with test.txt untracked:

image

tig status with test.txt added:

image

Having the line not shown in full might be okay, but dying and not displaying the following rows lead to some confusion here 😉

MaxWinterstein avatar Aug 02 '22 12:08 MaxWinterstein

Thanks for reporting the issue. Indeed encoding failures should be reported but not fatal.

koutcher avatar Aug 18 '22 16:08 koutcher