public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Len Brown <lenb@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-acpi@vger.kernel.org,
	Linux Power Management List <linux-pm@lists.osdl.org>
Subject: Re: [git pull] ACPI & Suspend patches for 2.6.29-rc0
Date: Fri, 9 Jan 2009 12:12:02 -0800 (PST)	[thread overview]
Message-ID: <alpine.LFD.2.00.0901091200150.6528@localhost.localdomain> (raw)
In-Reply-To: <alpine.LFD.2.00.0901090550590.4091@localhost.localdomain>



On Fri, 9 Jan 2009, Len Brown wrote:
> 
> ps. git diff is confused about hwregs.c vs hwxface.c below
>         both got moved.  I'm running git version 1.6.1.76.gc123b,
> 	and I use "git diff -M --stat --summary linus..$RELEASE"

No, "both" didn't get moved. "hwxface.c" is a totally new file when you 
look at the big picture. Yes, it got moved in one commit, but if you look 
at the whole history, the _history_ is actually:

 - Move public interfaces from hwregs.c to new file, hwxface.c

 - rename hwxface.c to another directory

and so git - for the merge statistics - ends up showing this as

>  .../acpi/{hardware/hwregs.c => acpica/hwxface.c}   |  744 +++++++-------------

which is actually correct.

Of course, it would _also_ have been correct to show it as the 
"{hardware/hwregs.c => acpica/hwregs.c}" move that you apparently 
expected, but what git did was just a more interesting thing.

So my point is that the "movement history" is actually different in a 
small view than it is in a big one. If you do "git log -C --stat", you'll 
see the output you expect at each point:

	commit ecfbbc7b46f74ca48b9f42132739114c9e70f8e4
	Author: Bob Moore <robert.moore@intel.com>
	Date:   Tue Dec 30 11:04:48 2008 +0800
	
	    ACPICA: Move all public H/W interfaces to new hwxface
	    
	 drivers/acpi/hardware/hwregs.c  |  498 +----------------------------------
	 drivers/acpi/hardware/hwxface.c |  555 +++++++++++++++++++++++++++++++++++++++

and

	commit 95b482a8d31116f3f5c2a5089569393234d06385
	Author: Len Brown <len.brown@intel.com>
	Date:   Fri Jan 9 00:13:17 2009 -0500
	
	    ACPICA: create acpica/ directory
	
	 drivers/acpi/{hardware => acpica}/hwregs.c     |    0

but when taken all-together, git decided that the bulk of the data (even 
if not the _lines_) actally moved from

	drivers/acpi/{hardware/hwregs.c => acpica/hwxface.c}

which is thus what git shows for the merge diff (which is taken over the 
whole history).

As usual, git is actually smarter and get things more correct than people 
realize. What you found "surprising" is actually a "profound truth". 

Git is like a great indian mystic. It sees past the veil of the trivial, 
to find the true connections in life.

Or at least in source code.

			Linus

  reply	other threads:[~2009-01-09 20:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-09 10:55 [git pull] ACPI & Suspend patches for 2.6.29-rc0 Len Brown
2009-01-09 20:12 ` Linus Torvalds [this message]
2009-01-09 20:56   ` git mv (was Re: [git pull] ACPI & Suspend patches for 2.6.29-rc0) Len Brown
2009-01-09 21:16     ` Linus Torvalds
2009-01-09 21:27       ` Sam Ravnborg
2009-01-09 21:40         ` Linus Torvalds
2009-01-09 21:47         ` Harvey Harrison
2009-01-09 21:58           ` Linus Torvalds

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.0901091200150.6528@localhost.localdomain \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.osdl.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