Thread (6 messages) flat view 6 messages, 4 authors, 2016-06-15

Re: help with git query

From: Björn Steinbrink <hidden>
Date: 2016-06-15 22:46:36

On 2009.04.14 01:46:54 -0400, Jeff King wrote:
On Mon, Apr 13, 2009 at 03:31:49PM -0500, Nathan W. Panike wrote:
quoted
quoted
for each branch:
 - info about the latest commit on that branch (date and time, message, etc.)
Depending on what you want to do---from a bash shell, you could do:

for i in $(git branch -a | cut -b3-); do echo $i; git show -s $i; echo; done
Ick, please use the plumbing designed for this exact thing instead of
trying to parse "git branch":

  $ git for-each-ref --format='%(subject)
    %(authorname) %(authoremail)
    %(authordate)' refs/heads/

or however you want to format it. See "git help for-each-ref" for a list
of fields (you can also just pipe the output of for-each-ref into a
shell loop, as in your example, but with the format options there is
often no need).
git log --no-walk --branches --decorate --pretty=short

is what I use, sometimes. Some other "pretty" format might be more
suitable for your use case.

Björn
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help