git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Thomas Koutcher via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Thomas Koutcher <thomas.koutcher@online.fr>
Subject: Re: [PATCH 0/2] diff- family --stat width
Date: Thu, 21 Apr 2022 14:33:32 -0700	[thread overview]
Message-ID: <xmqqczhaf7f7.fsf@gitster.g> (raw)
In-Reply-To: <pull.1256.git.git.1650572159.gitgitgadget@gmail.com> (Thomas Koutcher via GitGitGadget's message of "Thu, 21 Apr 2022 20:15:57 +0000")

"Thomas Koutcher via GitGitGadget" <gitgitgadget@gmail.com> writes:

> 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.

  parent reply	other threads:[~2022-04-21 21:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-21 20:15 [PATCH 0/2] diff- family --stat width Thomas Koutcher via GitGitGadget
2022-04-21 20:15 ` [PATCH 1/2] diff- family --stat: use the full terminal width Thomas Koutcher via GitGitGadget
2022-04-21 20:15 ` [PATCH 2/2] diff- family --stat: honour config option to limit graph width Thomas Koutcher via GitGitGadget
2022-04-21 21:33 ` Junio C Hamano [this message]
2022-04-29 17:22   ` [PATCH 0/2] diff- family --stat width Thomas Koutcher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqczhaf7f7.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=thomas.koutcher@online.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).