git show-branch displays commits using the relative revision expressions that can be parsed by git-parse-rev, for example "dev~106^2~52". How can I get the same output from git-log?
Asked
Active
Viewed 281 times
1
-
This question may be related to http://stackoverflow.com/questions/5128866/git-relative-revision-numbers – Lawrence I. Siden Jul 08 '11 at 18:18
2 Answers
1
No.
The documentation for git log
(git help log
) describes ways to customize the output using --pretty=tformat:...
, but unfortunately there is no placeholder for git describe
-style revision identifiers, nor is there a placeholder to run a shell command and use its output. Either would make it possible to do what you want. Perhaps you can suggest them to the Git developers.

Richard Hansen
- 51,690
- 20
- 90
- 97
0
Yes?: Something like git log | git name-rev --stdin
, that is, see the git name-rev
man page for obtaining this format.
I had a similar question describe a commit relative to a tag in parent^/ancestor~ format which was linked back here ;-)

Community
- 1
- 1

Philip Oakley
- 13,333
- 9
- 48
- 71