LKML Archive on
help / color / mirror / Atom feed
From: Linus Torvalds <>
To: Theodore Tso <tytso@MIT.EDU>
Cc: Jan Engelhardt <>,,
Subject: Re: [GIT PULL] ext4 update
Date: Wed, 30 Jan 2008 19:52:20 +1100 (EST)	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

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



  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:

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

  git send-email \ \ \ \ \ \
    --cc=tytso@MIT.EDU \
    --subject='Re: [GIT PULL] ext4 update' \

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