git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Fix "git diff --stat" for interesting - but empty - file changes
Date: Wed, 17 Oct 2012 12:35:48 -0700	[thread overview]
Message-ID: <CA+55aFzChDPv3Vu5D9rXmXvQmxoxsxgZYVEyf9CaUmYP+Xs0OA@mail.gmail.com> (raw)
In-Reply-To: <7v4nltoswd.fsf@alter.siamese.dyndns.org>

On Wed, Oct 17, 2012 at 11:28 AM, Junio C Hamano <gitster@pobox.com> wrote:
>
> I think listing a file whose content remain unchanged with 0 as the
> number of lines affected makes sense, and it will mesh well with
> Duy's
>
>   http://thread.gmane.org/gmane.comp.version-control.git/207749
>
> I first wondered if we would get a division-by-zero while scaling
> the graph, but we do not scale smaller numbers up to fill the
> columns, so we should be safe.

Note that we should be safe for a totally different - and more
fundamental - reason: the zero line case is by no means new. We've
always done it for the rename case.

> These days, we omit 0 insertions and 0 deletions, so I am not sure
> what you should get for this case, though:
>
>>  Makefile | 0
>>  1 file changed, 0 insertions(+), 0 deletions(-)
>
> Should we just say "1 file changed"?

If that is what it does for the rename case, then yes. I think it
should fall out naturally.

              Linus

      reply	other threads:[~2012-10-17 19:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-17 17:00 Fix "git diff --stat" for interesting - but empty - file changes Linus Torvalds
2012-10-17 18:28 ` Junio C Hamano
2012-10-17 19:35   ` Linus Torvalds [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=CA+55aFzChDPv3Vu5D9rXmXvQmxoxsxgZYVEyf9CaUmYP+Xs0OA@mail.gmail.com \
    --to=torvalds@linux-foundation.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).