From: "Rafael Ascensão" <rafa.almas@gmail.com>
To: Uwe Brauer <oub@mat.ucm.es>
Cc: git@vger.kernel.org, Alban Gruin <alban.gruin@gmail.com>
Subject: Re: git log --graph with a sort of local revision number
Date: Sun, 18 Aug 2019 20:00:32 +0100 [thread overview]
Message-ID: <20190818190032.GA11185@rigel> (raw)
In-Reply-To: <87blwq7rn5.fsf@mat.ucm.es>
You can achieve something close (on small repos, more on that later) with:
$ git log --graph --color \
--format='%C(auto)changeset: %h:%H%nuser: %an%ndate: %ad%nsummary: %s%n' \
| git name-rev --refs=$(git rev-parse --abbrev-ref HEAD) --name-only --stdin
* changeset: 5fa0f52:master
| user: Junio C Hamano
| date: Fri Aug 16 10:28:23 2019 -0700
| summary: Git 2.23
|
* changeset: 8e0fa0e:master~1
|\ user: Junio C Hamano
| | date: Fri Aug 16 10:22:51 2019 -0700
| | summary: Merge tag 'l10n-2.23.0-rnd2' of git://github.com/git-l10n/git-po
| |
| * changeset: a6cd2cc:master~1^2
| | user: Jiang Xin
| | date: Tue Jul 30 10:02:22 2019 +0800
| | summary: l10n: zh_CN: for git v2.23.0 l10n round 1~2
And in this case, since we are using HEAD to describe the commits by
using --refs=$(git rev-parse --abbrev-ref HEAD), you can refer to
a6cd2cc either as master~1^2 or HEAD~1^2.
Now, git-name-rev has some memory/performance problems in repos with a
high number of references. Alban Gruin was working on this issue[1], but
I don't know what's the status of it.
[1]:https://github.com/agrn/git/tree/ag/fix-name-rev-leak
next prev parent reply other threads:[~2019-08-18 19:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-15 8:35 git log --graph with a sort of local revision number Uwe Brauer
2019-08-18 19:00 ` Rafael Ascensão [this message]
2019-08-18 19:16 ` Uwe Brauer
2019-08-18 20:46 ` Uwe Brauer
2019-08-18 20:55 ` [SOLVED] (was: git log --graph with a sort of local revision number) Uwe Brauer
2019-08-20 14:32 ` [problem with name-rev] " Uwe Brauer
2019-08-20 15:06 ` SZEDER Gábor
2019-08-20 17:49 ` Rafael Ascensão
2019-08-20 18:21 ` [problem with name-rev] Junio C Hamano
2019-08-20 19:34 ` Uwe Brauer
2019-08-20 19:57 ` Phil Hord
2019-08-21 7:50 ` Uwe Brauer
2019-08-21 12:37 ` Uwe Brauer
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=20190818190032.GA11185@rigel \
--to=rafa.almas@gmail.com \
--cc=alban.gruin@gmail.com \
--cc=git@vger.kernel.org \
--cc=oub@mat.ucm.es \
/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.
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.