LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Theodore Tso <tytso@MIT.EDU>
Cc: Jan Engelhardt <jengelh@computergmbh.de>,
	linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [GIT PULL] ext4 update
Date: Wed, 30 Jan 2008 19:52:20 +1100 (EST)	[thread overview]
Message-ID: <alpine.LFD.1.00.0801301947540.3426@www.l.google.com> (raw)
In-Reply-To: <20080130071123.GF21944@mit.edu>



On Wed, 30 Jan 2008, Theodore Tso wrote:
> 
> That's because you are doing a diff stat of changes that haven't been
> checked in yet.  I was doing a "git log -p origin.. | diffstat -p1",
> and in that incantation you definitely do need the -p1 to diffstat.

You should *always* use "-p1" to diffstat, because if you don't, diffstat 
just makes up the paths totally (the same way you should always use "-p1" 
to GNU 'patch').

The fact is, diffstat just guesses, based on the prefix. But those guesses 
will be totally bogus at times, especially if you have newly created files 
(I _think_ that is because one of the pathnames in the diff is /dev/null, 
and that will apparently throw off the guesses).

So if you don't use an explicit "-p1", diffstat will guess the -p level 
from the longest common path prefix, _but_ get that wrong for some paths 
anyway, so sometimes you'll see the "a/" prefix etc.

Of course, rather than using diffstat at all, just do something like

	git diff --stat origin..

instead.

		Linus

  parent reply	other threads:[~2008-01-30  8:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-29  5:50 Theodore Ts'o
2008-01-29 12:53 ` Theodore Tso
2008-01-29 21:54   ` Jan Engelhardt
2008-01-30  7:11     ` Theodore Tso
2008-01-30  8:38       ` Paul Collins
2008-01-30  8:52       ` Linus Torvalds [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-04-30  2:45 Theodore Ts'o
2008-02-25 22:47 Theodore Ts'o
2008-02-10  6:33 Theodore Ts'o
2007-10-17  4:26 Theodore Ts'o
2007-10-17  4:51 ` david
2007-10-18  6:29   ` Andreas Dilger
2007-10-17 15:59 ` Linus Torvalds
2007-10-17 22:55   ` Theodore Tso
2007-10-25 23:31   ` Andrew Morton
2007-10-25 23:44     ` Linus Torvalds
2007-10-25 23:53       ` Andrew Morton
2007-07-18 13:42 Theodore Ts'o

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=alpine.LFD.1.00.0801301947540.3426@www.l.google.com \
    --to=torvalds@linux-foundation.org \
    --cc=jengelh@computergmbh.de \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@MIT.EDU \
    --subject='Re: [GIT PULL] ext4 update' \
    /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

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