Skip to content

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

@MaxWinterstein

Description

@MaxWinterstein

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 😉

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions