branch: refactor width computation
commit1051e40dba16bd8e490c41ce926c8c36b913de72
authorKarthik Nayak <karthik.188@gmail.com>
Wed, 23 Sep 2015 18:11:06 +0000 (23 23:41 +0530)
committerJunio C Hamano <gitster@pobox.com>
Wed, 23 Sep 2015 18:41:01 +0000 (23 11:41 -0700)
tree6dbf0b12a521ca49c80fe9676b105ecb96605c08
parent5242860f548d1869ac2779726ad496f0ae8ab5ca
branch: refactor width computation

Remove unnecessary variables from ref_list and ref_item which were
used for width computation. This is to make ref_item similar to
ref-filter's ref_array_item. This will ensure a smooth port of
branch.c to use ref-filter APIs in further patches.

Previously the maxwidth was computed when inserting the refs into the
ref_list. Now, we obtain the entire ref_list and then compute
maxwidth.

Based-on-patch-by: Jeff King <peff@peff.net>
Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/branch.c