From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932886Ab0E0RvH (ORCPT ); Thu, 27 May 2010 13:51:07 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:38578 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932550Ab0E0RvA (ORCPT ); Thu, 27 May 2010 13:51:00 -0400 Date: Thu, 27 May 2010 10:47:22 -0700 (PDT) From: Linus Torvalds To: Chris Mason cc: linux-btrfs@vger.kernel.org, linux-kernel , linux-fsdevel@vger.kernel.org Subject: Re: [GIT PULL] Btrfs updates In-Reply-To: <20100527173220.GG3835@think> Message-ID: References: <20100527151515.GA3835@think> <20100527173220.GG3835@think> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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