linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Chris Mason <chris.mason@oracle.com>
Cc: linux-btrfs@vger.kernel.org,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [GIT PULL] Btrfs updates
Date: Thu, 27 May 2010 10:47:22 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.2.00.1005271036400.3689@i5.linux-foundation.org> (raw)
In-Reply-To: <20100527173220.GG3835@think>



On Thu, 27 May 2010, Chris Mason wrote:
> 
> # git diff v2.6.34 HEAD | diffstat

That still has the potential to be wrong (but got the numbers I expected 
this time). It will be wrong in several cases:

 - "diffstat" has some random common prefix removal logic that I've never 
   figured out the exact rules for.

   You don't happen to see it, because you actually had changes outside of 
   fs/btrfs (so there was no common prefix to worry about), but if 
   everything had been inside fs/btrfs, then at least some versions of 
   diffstat will just remove that whole thing as common, and talk about 
   changes to 'ioctl.c' rather than 'fs/btrfs/ioctl.c'

   (And no, I'm not entirely sure what triggers it. It might only happen 
   for certain patterns and/or certain versions of diffstat, but it's a 
   reason to avoid diffstat in general, or at least use "-p1" to make it 
   reliable)

 - it will do the wrong thing for renames and copies.

 - it doesn't give the summary that pull-request does, which talks about 
   new, deleted and file-mode-changed files.

So just do

	git diff --stat --summary -M v2.6.34..HEAD

instead, which gets all the above cases right. Also, you don't even need 
to remember where you started - you might as well use git to do that too, 
and write it as (assuming you have an 'origin' branch that points to the 
upstream tree):

	git diff --stat --summary -M origin...HEAD

(note the *three* dots: that says that you should diff against the common 
ancestor, so git will just figure out where you started on its own).

		Linus

  reply	other threads:[~2010-05-27 17:51 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-27 15:15 [GIT PULL] Btrfs updates Chris Mason
2010-05-27 17:18 ` Linus Torvalds
2010-05-27 17:32   ` Chris Mason
2010-05-27 17:47     ` Linus Torvalds [this message]
2010-06-02  2:59 ` Miao Xie
2010-09-12 12:38 ` Felipe Contreras
  -- strict thread matches above, loose matches on Subject: below --
2013-05-18 14:30 Chris Mason
2013-03-29 17:47 Chris Mason
2013-03-09  0:38 Chris Mason
2013-02-16  1:55 Chris Mason
2012-12-17 21:44 Chris Mason
2012-08-29 16:01 Chris Mason
2012-07-05 19:55 Chris Mason
2012-06-21 15:47 Chris Mason
2012-06-15 18:09 Chris Mason
2012-06-15 23:57 ` Linus Torvalds
2012-06-16  0:21   ` Chris Mason
2012-06-01 13:18 Chris Mason
2012-04-13 13:38 Chris Mason
2012-03-10  2:01 Chris Mason
2012-02-24 16:41 Chris Mason
2011-12-01 15:39 Chris Mason
2011-08-18 18:04 Chris Mason
2011-07-27 22:46 Chris Mason
2011-06-27 18:15 Chris Mason
2011-06-20  1:12 Chris Mason
2011-06-12 11:57 Chris Mason
2011-06-12 18:08 ` Linus Torvalds
2011-06-13  1:02 ` Andi Kleen
2011-06-13  1:52   ` Chris Mason
2011-06-13  2:05   ` Li Zefan
2011-06-04 14:37 Chris Mason
2011-05-27 19:55 Chris Mason
2011-05-27 21:44 ` Chester
2011-05-15 14:47 Chris Mason
2011-04-26 14:24 Chris Mason
2011-04-18 14:26 Chris Mason
2011-02-15  3:49 Chris Mason
2011-02-07 20:12 Chris Mason
2011-01-17 21:13 Chris Mason
2010-12-14  1:54 Chris Mason
2010-04-05 19:36 Chris Mason
2010-04-06 15:40 ` Chris Mason
2010-03-15 19:18 Chris Mason
2010-03-16 21:01 ` Chris Mason
2010-03-18 16:59   ` Chris Mason
2009-10-15  0:06 Chris Mason

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.2.00.1005271036400.3689@i5.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=chris.mason@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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).