git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Konstantin Khomoutov <kostix@bswap.ru>
Cc: Konstantin Kharlamov <hi-angel@yandex.ru>, git@vger.kernel.org
Subject: Re: Any way to make git-log to enumerate commits?
Date: Fri, 07 Dec 2018 09:12:29 +0900	[thread overview]
Message-ID: <xmqqr2eu8aaa.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20181206114835.oro32chgf4qp2yqd@tigra> (Konstantin Khomoutov's message of "Thu, 6 Dec 2018 14:48:36 +0300")

Konstantin Khomoutov <kostix@bswap.ru> writes:

>> I do not see why the "name each rev relative to HEAD" formatting
>> option cannot produce HEAD^2~2 etc.
>>  ...
> My reading was that the OP explicitly wanted to just glance at a single
> integer number and use it right away in a subsequent rebase command.
>
> I mean, use one's own short memory instead of copying and pasting.

As everybody pointed out, a single integer number will fundamentally
unworkable with distributed nature of Git that inherently makes the
history with forks and merges.  Besides, there is no way to feed
"git log" with "a single integer number", without which "making
git-log to enumerate" would not be all that useful ("git show
HEAD~4" works but "git show 4" does not).

All of these name-rev based suggestions were about using anchoring
point with memorable name plus a short path to reach from there,
which I think is the closest thing to "a single integer number" and
still is usable for the exact purpose.  "HEAD~48^2" on an
integration branch would be "the tip of the side branch that was
merged some 48 commits ago", for example.

      reply	other threads:[~2018-12-07  0:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-05 14:22 Any way to make git-log to enumerate commits? Konstantin Kharlamov
2018-12-05 14:54 ` Konstantin Khomoutov
2018-12-05 15:31   ` Elijah Newren
2018-12-05 15:43     ` Andreas Schwab
2018-12-06  0:31   ` Junio C Hamano
2018-12-06 11:48     ` Konstantin Khomoutov
2018-12-07  0:12       ` Junio C Hamano [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqr2eu8aaa.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=hi-angel@yandex.ru \
    --cc=kostix@bswap.ru \
    /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 public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).