for-each-ref: refactor refname handling
commit8db9a4b85d6b0d7424c8a19b77a5baa8529ab64c
authorJeff King <peff@peff.net>
Tue, 7 Apr 2009 07:06:51 +0000 (7 03:06 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 8 Apr 2009 06:18:14 +0000 (7 23:18 -0700)
treefe1f9697c242bf36fc0b364a01bc3c41bb3c79d2
parent3d4ecc0e23b2b2f555e7d33b5623fd4e67cc2ac7
for-each-ref: refactor refname handling

This code handles some special magic like *-deref and the
:short formatting specifier. The next patch will add another
field which outputs a ref and wants to use the same code.

This patch splits the "which ref are we outputting" from the
actual formatting. There should be no behavioral change.

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