From: Uwe Brauer <oub@mat.ucm.es>
To: "Rafael Ascensão" <rafa.almas@gmail.com>
Cc: Uwe Brauer <oub@mat.ucm.es>,
git@vger.kernel.org, Alban Gruin <alban.gruin@gmail.com>
Subject: [problem with name-rev] (was: git log --graph with a sort of local revision number)
Date: Tue, 20 Aug 2019 16:32:12 +0200 [thread overview]
Message-ID: <87pnkzkivn.fsf_-_@mat.ucm.es> (raw)
In-Reply-To: 20190818190032.GA11185@rigel
[-- Attachment #1: Type: text/plain, Size: 1758 bytes --]
>>> "RA" == Rafael Ascensão <rafa.almas@gmail.com> writes:
> 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
It seems that there is problem with name-rev.
Here's what I get when I start committing on master, then switch to a
branch foo and finally merge foo into master:
git init
echo 1 > 1
git add 1
git commit -m 1
echo 1.1 > 1
git add .
git commit -m 1.1
git checkout -b foo master~1
echo 1.2 > 1
git add .
git commit -m 1.2
echo 1.2.1 > 1
git add .
git commit -m 1.2.1
git checkout master
git merge foo
echo 1.2.1/1.1 > 1
git add .
git commit -m "1.2.1/1.1"
Then
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 | more
Gives
* changeset: ae68dbe:master
|\ user: Uwe Brauer
| | date: Tue Aug 20 16:25:53 2019 +0200
| | summary: 1.2.1/1.1
| |
| * changeset: c00bb5d:master^2
| | user: Uwe Brauer
| | date: Tue Aug 20 16:25:53 2019 +0200
| | summary: 1.2.1
| |
| * changeset: 54c9230:master^2~1
| | user: Uwe Brauer
| | date: Tue Aug 20 16:25:53 2019 +0200
| | summary: 1.2
| |
* | changeset: da0712f:master~1
|/ user: Uwe Brauer
| date: Tue Aug 20 16:25:53 2019 +0200
| summary: 1.1
|
* changeset: 8eb999d:master~2
user: Uwe Brauer
date: Tue Aug 20 16:25:53 2019 +0200
summary: 1
That looks odd.
Any comments?
Uwe Brauer
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5025 bytes --]
next prev parent reply other threads:[~2019-08-20 14:32 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
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 ` Uwe Brauer [this message]
2019-08-20 15:06 ` [problem with name-rev] " 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
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=87pnkzkivn.fsf_-_@mat.ucm.es \
--to=oub@mat.ucm.es \
--cc=alban.gruin@gmail.com \
--cc=git@vger.kernel.org \
--cc=rafa.almas@gmail.com \
/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).