From: Jeff King Date: Tue, 16 Feb 2010 07:29:58 GMT Subject: Re: [PATCH v2 1/4] Refactoring: remove duplicated code from builtin-send-pack.c and transport.c Message-ID: <20100216072958.GH2169@coredump.intra.peff.net> In-Reply-To: <1266276411-5796-2-git-send-email-michael.lukashov@gmail.com> On Mon, Feb 15, 2010 at 11:26:47PM +0000, Michael Lukashov wrote: > diff --git a/builtin-fetch.c b/builtin-fetch.c > index 8654fa7..d3b9d8a 100644 > --- a/builtin-fetch.c > +++ b/builtin-fetch.c > [...] > @@ -224,7 +224,7 @@ static int update_local_ref(struct ref *ref, > > if (!hashcmp(ref->old_sha1, ref->new_sha1)) { > if (verbosity > 0) > - sprintf(display, "= %-*s %-*s -> %s", SUMMARY_WIDTH, > + sprintf(display, "= %-*s %-*s -> %s", TRANSPORT_SUMMARY_WIDTH, > "[up to date]", REFCOL_WIDTH, remote, > pretty_ref); If you are refactoring, can all of these fetch lines just call print_ref_status, which handles the summary width stuff itself? The push and fetch formats are meant to be quite similar. -Peff