From: Uwe Brauer <oub@mat•ucm.es>
To: Uwe Brauer <oub@mat•ucm.es>
Cc: "Rafael Ascensão" <rafa.almas@gmail•com>,
git@vger•kernel.org, "Alban Gruin" <alban.gruin@gmail•com>
Subject: [SOLVED] (was: git log --graph with a sort of local revision number)
Date: Sun, 18 Aug 2019 22:55:43 +0200 [thread overview]
Message-ID: <8736hymbw0.fsf_-_@mat.ucm.es> (raw)
In-Reply-To: 87blwmmcbp.fsf@mat.ucm.es
>>> "UB" == Uwe Brauer <oub@mat•ucm.es> writes:
>>> "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
The script to generate a test repo is
git init
echo "First" > test.org
git add test.org
git add create.sh
git commit -a -m "First commit"
git checkout master
echo "Second" >> test.org
git commit -a -m "Second"
echo "Third" >> test.org
git commit -a -m "Third"
echo "Forth" >> test.org
git commit -a -m "Fourth"
echo "Fifth" >> test.org
git commit -a -m "Fifth"
echo "Six" >> test.org
git commit -a -m "Six"
Then your command even in a short shell script
#!/bin/bash
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
Works as you described.
Thanks
Uwe Brauer
next prev parent reply other threads:[~2019-08-18 20:56 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 ` Uwe Brauer [this message]
2019-08-20 14:32 ` [problem with name-rev] (was: git log --graph with a sort of local revision number) 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=8736hymbw0.fsf_-_@mat.ucm.es \
--to=oub@mat$(echo .)ucm.es \
--cc=alban.gruin@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=rafa.almas@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox