for-each-ref: fix %(numparent) and %(parent)
commit9e1a2acfb2198e29c90b59eef84eb0370ef9f03f
authorJunio C Hamano <gitster@pobox.com>
Tue, 2 Oct 2007 22:09:41 +0000 (2 15:09 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 2 Oct 2007 22:12:05 +0000 (2 15:12 -0700)
tree02e3abd35eeb189a0b1f728ed570ff099106d4d7
parentc8f203255bc7a782e3a54e73d5801009bb7f0319
for-each-ref: fix %(numparent) and %(parent)

The string value of %(numparent) was not returned correctly.
Also %(parent) misbehaved for the root commits (returned garbage)
and merge commits (returned first parent, followed by a space).

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