all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Stephen J. Turnbull" <stephen@xemacs.org>
Cc: emacs-devel@gnu.org
Subject: Re: git apologia
Date: Mon, 17 Nov 2014 18:41:50 +0200	[thread overview]
Message-ID: <83ioidbwz5.fsf@gnu.org> (raw)
In-Reply-To: <87k32uvg2x.fsf@uwakimon.sk.tsukuba.ac.jp>

> From: "Stephen J. Turnbull" <stephen@xemacs.org>
> 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.



  reply	other threads:[~2014-11-17 16:41 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-14 18:37 git pull fails with merge conflicts. How can this possibly happen? Alan Mackenzie
2014-11-14 19:01 ` David Caldwell
2014-11-14 21:54   ` Alan Mackenzie
2014-11-15  5:41     ` Yuri Khan
2014-11-15  8:14       ` Eli Zaretskii
2014-11-15  9:20         ` Stephen J. Turnbull
2014-11-15 10:54           ` Eli Zaretskii
2014-11-15 11:15             ` David Engster
2014-11-15 11:19             ` David Kastrup
2014-11-15 11:30               ` Eli Zaretskii
2014-11-15 14:38                 ` David Kastrup
2014-11-15 16:21                   ` Eli Zaretskii
2014-11-15 16:31               ` Stephen J. Turnbull
2014-11-15 16:55                 ` Eli Zaretskii
2014-11-15 17:05                   ` David Kastrup
2014-11-15 17:03                 ` David Kastrup
2014-11-15 18:25                   ` Stephen J. Turnbull
2014-11-15 16:25             ` git apologia [was: git pull fails with merge conflicts. ...] Stephen J. Turnbull
2014-11-15 16:51               ` Eli Zaretskii
2014-11-15 18:16                 ` Stephen J. Turnbull
2014-11-15 18:41                   ` David Kastrup
2014-11-15 19:13                   ` Git's victory and an entertaining irony Eric S. Raymond
2014-11-16  0:04                     ` Stephen J. Turnbull
2014-11-16  6:00                       ` Eric S. Raymond
2014-11-15 18:26                 ` git apologia [was: git pull fails with merge conflicts. ...] Andreas Schwab
2014-11-15 18:37                   ` Eli Zaretskii
2014-11-15 18:47                     ` David Kastrup
2014-11-16 16:06               ` git apologia Eli Zaretskii
2014-11-16 16:36                 ` Andreas Schwab
2014-11-16 18:04                   ` Eli Zaretskii
2014-11-16 18:20                     ` Andreas Schwab
2014-11-16 18:38                       ` Eli Zaretskii
2014-11-16 18:50                         ` Andreas Schwab
2014-11-16 18:58                           ` Eli Zaretskii
2014-11-16 18:55                         ` Teemu Likonen
2014-11-17  0:14                 ` Stephen J. Turnbull
2014-11-17 16:41                   ` Eli Zaretskii [this message]
2014-11-17 16:50                     ` Andreas Schwab
2014-11-17 17:47                       ` Eli Zaretskii
2014-11-17 16:57                     ` David Kastrup
2014-11-17 18:55                     ` Achim Gratz
2014-11-18  1:16                       ` Yuri Khan
2014-11-18  8:58                     ` Thien-Thi Nguyen
2014-11-18 13:53                       ` John Yates
2014-11-18 19:45                         ` Thien-Thi Nguyen
2014-11-18  9:39                     ` Andreas Schwab
2014-11-18 16:42                       ` Barry Warsaw
2014-11-17 12:38             ` git pull fails with merge conflicts. How can this possibly happen? Sergey Organov
2014-11-17 16:05               ` Eli Zaretskii
2014-11-17 16:54                 ` David Kastrup
2014-11-17 21:09                 ` Sergey Organov
2014-11-18  3:29                 ` Glenn Morris
2014-11-18 22:57                   ` Alan Mackenzie
2014-11-15 10:56           ` David Kastrup
2014-11-15 13:43             ` Stephen J. Turnbull

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=83ioidbwz5.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=stephen@xemacs.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.