From: Jay Soffian Date: Fri, 13 Feb 2009 08:06:25 GMT Subject: Re: [PATCH v2] builtin-branch: improve output when displaying remote branches Message-ID: <76718490902130006r4f125752wa207056d72630e84@mail.gmail.com> In-Reply-To: <7veiy2eptb.fsf@gitster.siamese.dyndns.org> On Fri, Feb 13, 2009 at 2:52 AM, Junio C Hamano wrote: > Jay Soffian writes: > >> This strikes me as premature optimization. > > It is *not* an optimization. It is reduction of code duplication to > improve maintainability before copy-and-paste gets out of hand. > > The proper adjective for it is not "premature" but "preemptive". I'll re-roll the patch again. However, if you look at the rest of builtin-branch.c, you'll see there are more places than that which are structured similarly (e.g. delete_branches). So if someone wanted to add another branch type, that would be the time (IMO), to refactor the statement at the top of append_ref(). j.