Pass terminal dimensions to git by setting COLUMNS and LINES
commitf0ad1f7456ad1200d23eaa02e6409854cc47b9ad
authorJonas Fonseca <fonseca@diku.dk>
Mon, 20 May 2013 19:11:58 +0000 (20 15:11 -0400)
committerJonas Fonseca <fonseca@diku.dk>
Mon, 20 May 2013 19:25:02 +0000 (20 15:25 -0400)
treea6c52e450bdbd11dbd7b276ae909b84b61e9b0a5
parent4dd65a94a9b2d6918eb6af6ad2c8236bb6a2a9a7
Pass terminal dimensions to git by setting COLUMNS and LINES

This partially reverts "Show diff stats as wide as the terminal" (commit
a7eb3057ec70d4948ca5f2de98fcf29d844085b4) which passed the terminal
width to git-diff using `--stat=%(width)`. This feature was introduced
in Git version 1.7.10 released 2013-04-06 and causes problems for older
versions of Git.

It turns out that Git will automatically read $COLUMNS when showing diff
stats, so the same effect can be achieved by passing the terminal
dimensions using environment variables.

Fixes GH-151, "Broken commit rendering on Ubuntu 10.04" since
incompatibilitis with older versions of Git is no longer an issue.
Tested using `tig 1f384f3f5b9f0ea5a78504200eb577fcb8ba600a`.
manual.txt
tig.c
tigrc.5.txt