for-each-ref --format='%(symref) %(symref:short)'
commit5cdd628c84d808feb6ec407b2ecd74dfea63f865
authorJunio C Hamano <gitster@pobox.com>
Sat, 13 Feb 2010 19:57:08 +0000 (13 11:57 -0800)
committerJunio C Hamano <gitster@pobox.com>
Sat, 13 Feb 2010 19:57:08 +0000 (13 11:57 -0800)
tree1b0d628ab64a6d72aece27807cb8b8b0b2a4a6a3
parent20322e0b552b9860377c162675ce5c49bfd32e83
for-each-ref --format='%(symref) %(symref:short)'

New %(symref) output atom expands to the name of the ref a symbolic ref
points at, or an empty string if the ref being shown is not a symref.

This may help scripted Porcelain writers.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-for-each-ref.c