Commit 4928ced3 authored by Kirill Smelkov's avatar Kirill Smelkov

git-reftop: List refs in "most recent first" order

parent 4073572e
#!/bin/sh -e
# git-reftop [pattern]
# show refs in reverse-chronological order judging by object date they point to
# (i.e. what branches are newest ?)
#
# see `git for-each-ref` for pattern syntax and details
pattern=""
test "$#" -ge 1 && pattern="$1"
git for-each-ref \
--sort=-creatordate \
--format="%(align:40,left)%(refname:short)%(end) %(creatordate:iso-strict) %(subject)" \
$pattern
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment