Re: [PATCH 14/15] branch: use ref-filter printing APIs
Karthik Nayak <karthik.188@gmail.com> writes:
Show 19 quoted lines
> Port branch.c to use ref-filter APIs for printing. This clears out
> most of the code used in branch.c for printing and replaces them with
> calls made to the ref-filter library.
>
> Introduce build_format() which gets the format required for printing
> of refs. Make amendments to print_ref_list() to reflect these changes.
>
> Change calc_maxwidth() to also account for the length of HEAD ref, by
> calling ref-filter:get_head_discription().
>
> Also change the test in t6040 to reflect the changes.
>
> 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>
> ---
> builtin/branch.c | 226 ++++++++++++++---------------------------------
> t/t6040-tracking-info.sh | 2 +-
> 2 files changed, 66 insertions(+), 162 deletions(-)
Nice reduction of the code ;-)