branch: move 'current' check down to the presentation layer
commitf65f13911afa8dd66d163049d91dbfe2ed73717e
authorKarthik Nayak <karthik.188@gmail.com>
Wed, 23 Sep 2015 18:11:09 +0000 (23 23:41 +0530)
committerJunio C Hamano <gitster@pobox.com>
Wed, 23 Sep 2015 18:43:08 +0000 (23 11:43 -0700)
tree24902dad2964db06127aa71a5bc4c8a1809cb64d
parent23e714df91cb8d824f6fd0594cd80c8a7dd9b751
branch: move 'current' check down to the presentation layer

We check if given ref is the current branch in print_ref_list(). Move
this check to print_ref_item() where it is checked right before
printing. This enables a smooth transition to using ref-filter APIs,
as we can later replace the current check while printing to just check
for FILTER_REFS_DETACHED instead.

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