From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: git apologia Date: Mon, 17 Nov 2014 18:41:50 +0200 Message-ID: <83ioidbwz5.fsf@gnu.org> References: <20141114183737.GB3168@acm.acm> <5466517B.50705@porkrind.org> <20141114215404.GD3168@acm.acm> <838ujchods.fsf@gnu.org> <8761egx1k2.fsf@uwakimon.sk.tsukuba.ac.jp> <83sihkg2ds.fsf@gnu.org> <87vbmgv3b9.fsf@uwakimon.sk.tsukuba.ac.jp> <83389jdtae.fsf@gnu.org> <87k32uvg2x.fsf@uwakimon.sk.tsukuba.ac.jp> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1416242553 29908 80.91.229.3 (17 Nov 2014 16:42:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 17 Nov 2014 16:42:33 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Stephen J. Turnbull" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 17 17:42:26 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XqPNh-0002cM-Po for ged-emacs-devel@m.gmane.org; Mon, 17 Nov 2014 17:42:26 +0100 Original-Received: from localhost ([::1]:48794 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqPNh-0005hB-Af for ged-emacs-devel@m.gmane.org; Mon, 17 Nov 2014 11:42:25 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57497) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqPNO-0005gt-9t for emacs-devel@gnu.org; Mon, 17 Nov 2014 11:42:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XqPNJ-0004io-4G for emacs-devel@gnu.org; Mon, 17 Nov 2014 11:42:06 -0500 Original-Received: from mtaout24.012.net.il ([80.179.55.180]:43395) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqPNI-0004ih-OX for emacs-devel@gnu.org; Mon, 17 Nov 2014 11:42:01 -0500 Original-Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0NF600G00Z609X00@mtaout24.012.net.il> for emacs-devel@gnu.org; Mon, 17 Nov 2014 18:34:23 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NF6006H9ZDBGVA0@mtaout24.012.net.il>; Mon, 17 Nov 2014 18:34:23 +0200 (IST) In-reply-to: <87k32uvg2x.fsf@uwakimon.sk.tsukuba.ac.jp> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.180 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:177446 Archived-At: > From: "Stephen J. Turnbull" > Cc: emacs-devel@gnu.org > Date: Mon, 17 Nov 2014 09:14:14 +0900 > > > And waddaya know? HEAD~n etc. seem to _skip_ merge-commits, > > It only seems to do so. In my (not quite up-to-date) emacs repo, > "git log @address@hidden" displays no merges, but apparently that's because > there's a long sequence of non-merges (fast-forwards) on mainline. > However, "git log @~10..@" displays several, as does > "git log @address@hidden". > > Or by "merge-commits" do you mean the off-trunk commits? Yes, it turns out that's what they were, as Andreas pointed out. I was fooled by the fact that they are shown by default (unlike what I'm used to with bzr), and they seem to have no visual cues in the default output format that they are off-trunk (like, e.g., the indentation used by "bzr log"). > > so (a) the counts end up being wrong, and (b) if you want to see > > those merge-commits, you need to _know_ they are merge-commits and > > then use HEAD^2 etc. (i.e. explicitly request the 2nd parent). > > This is awful. > > If you say so, I guess it is for you. I'm curious why it's useful to > you. Because it is easy enough to count lines in "git log --oneline" or similar 1-line log format, and then request details about the Nth line. When I pull from upstream, I almost always look at the log summary lines of the last dozen commits, and then frequently examine one or more of those in detail. So I need a quick and convenient method of doing "git show" or its equivalent without the need to type the 7 hex characters of the SHA1 checksum. What's more natural than asking for the Nth previous commit? I will probably convince myself to add --first-parent to my "git log" aliases, as Andreas suggested. After all, that's what "bzr log" does by default. Then HEAD~n will work as I expect. (And don't get me started on the reader-unfriendly description of --first-parent on the git-log man page.) Or maybe I will start using "C-x v L" ;-) Thanks.