From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carl Worth Subject: Re: Updated Kernel Hacker's guide to git Date: Fri, 22 Dec 2006 14:20:33 -0800 Message-ID: <877iwjinda.wl%cworth@cworth.org> References: <38b2ab8a0612210424o4ec5fcd5kb5086c52ccd76491@mail.gmail.com> <87slf83erg.wl%cworth@cworth.org> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/signed; boundary="pgp-sign-Multipart_Fri_Dec_22_14:20:33_2006-1"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Cc: Francis Moreau , Jay Cliburn , git@vger.kernel.org, Jeff Garzik X-From: git-owner@vger.kernel.org Fri Dec 22 23:22:18 2006 Return-path: Envelope-to: gcvg-git@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by dough.gmane.org with esmtp (Exim 4.50) id 1GxsmI-0000bD-Tv for gcvg-git@gmane.org; Fri, 22 Dec 2006 23:22:11 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753124AbWLVWWH (ORCPT ); Fri, 22 Dec 2006 17:22:07 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753103AbWLVWWH (ORCPT ); Fri, 22 Dec 2006 17:22:07 -0500 Received: from cworth.org ([217.160.249.188]:50556 "EHLO theworths.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753130AbWLVWWG (ORCPT ); Fri, 22 Dec 2006 17:22:06 -0500 Received: (qmail 24362 invoked from network); 22 Dec 2006 17:22:01 -0500 Received: from localhost (HELO raht.cworth.org) (127.0.0.1) by localhost with SMTP; 22 Dec 2006 17:22:01 -0500 To: Linus Torvalds In-Reply-To: User-Agent: Wanderlust/2.14.0 (Africa) Emacs/21.4 Mule/5.0 (SAKAKI) Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: --pgp-sign-Multipart_Fri_Dec_22_14:20:33_2006-1 Content-Type: text/plain; charset=US-ASCII On Thu, 21 Dec 2006 20:13:52 -0800 (PST), Linus Torvalds wrote: > I do it all the time, I never even use the old-fashioned syntax any more. > It's much more concise and easy to read, and it has all the nice shortcuts > (like empty meaning "HEAD", so you can do "git diff ..next" to see the > diff from HEAD to another branch). I can understand the advantage of a shortcut like "git diff ..next", but I still don't understand why it's the comparison of HEAD and next that's really interesting here. Wouldn't comparing the merge-base to next be more desirable? For example, if I'm considering whether to merge in next or not, why should I care to see in the diff all the irrelevant stuff that's happened on HEAD since next branched off? But, really, I still don't understand exactly _what_ "diff a..b" even means. Can you explain it to me? Presumably the rev-parse magic is happening to the arguments. So does the diff code just end up seeing the expanded equivalent of "b ^a" and then just use the ^ to decide which tree to be on the left side or something? > It's also useful exactly because of the semantics of things like "...". And now I'm really confused. If I'm not mistaken, rev-parse will turn "a...b" into something like "a b ^$(merge-base a b)", right? So does the diff code now end up seeing three different tree specifiers? What does it do with that? And how is this useful? (As you said before, diff is always going to end up acting on only two items, so I don't see where there could be an interesting distinction from how you obtain two items from "a..b" compared to "a...b".) But it might be just that I'm really confused here. > So "git diff a b" doesn't even look good to me any more, because it's > literally missing that mental "to" that the ".." adds for me when I read > it. OK, that's fine. But can you comment on why you want the comparison between the tips and not something based on a comparison from the merge-base to a tip? -Carl --pgp-sign-Multipart_Fri_Dec_22_14:20:33_2006-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQBFjFox6JDdNq8qSWgRAmPdAKCHaHK8YYMW8VLTDFssX7zkKwQtOQCfQLVw 9nVE3omQqrsQfn47iyvSwfo= =mvtc -----END PGP SIGNATURE----- --pgp-sign-Multipart_Fri_Dec_22_14:20:33_2006-1--