lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 9 Jan 2009 12:12:02 -0800 (PST)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Len Brown <lenb@...nel.org>
cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	linux-acpi@...r.kernel.org,
	Linux Power Management List <linux-pm@...ts.osdl.org>
Subject: Re: [git pull] ACPI & Suspend patches for 2.6.29-rc0



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@...el.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@...el.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ