git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/2] diff- family --stat width

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 21, 2022, 21:33 UTC
Message-ID
<xmqqczhaf7f7.fsf@gitster.g>
In-Reply-To
<pull.1256.git.git.1650572159.gitgitgadget@gmail.com>
"Thomas Koutcher via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 8 quoted lines
> diff- family commands do not use the full terminal width. This is visible in
> Tig which uses git diff-files to show diffs for unstaged changes. When
> trying to display diffs with long filenames, the diffstat does not improve
> when the Tig window size is increased.
>
> This patch makes diff-files, diff-index and diff-tree --stat behave like
> diff --stat and use the full terminal width. The handling of the config
> option diff.statGraphWidth is also added.

I do not think it is a good move to change the output from these plumbing commands, whose purpose of existence is to give more predictable outcome, to be affected by dynamic elements like the width of the terminal the user happens to be using.

A program or script that spawns the plumbing commands should be able to pass --stat=<width>, --stat-graph-width=<width> etc. to control its behaviour without affecting (and possibly breaking) what other programs have been depending on for the last 15+ years.

Thanks.
Previous: Thomas Koutcher via GitGitGadgetNext: Thomas Koutcher
Message 4 of 5 in “diff- family --stat width”
  1. 0/2 diff- family --stat widthThomas Koutcher via GitGitGadget, Apr 21, 2022
  2. 1/2 diff- family --stat: use the full terminal widthThomas Koutcher via GitGitGadget, Apr 21, 2022
  3. 2/2 diff- family --stat: honour config option to limit graph widthThomas Koutcher via GitGitGadget, Apr 21, 2022
  4. Junio C HamanoApr 21, 2022
  5. Thomas KoutcherApr 29, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.