git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] builtin-branch: improve output when displaying remote branches

From
Jay Soffian <jaysoffian@gmail.com>
Date
Feb 13, 2009, 08:06 UTC
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 <gitster@pobox.com> wrote:
Show 8 quoted lines
> Jay Soffian <jaysoffian@gmail.com> 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.
Previous: Junio C HamanoNext: Jay Soffian
Message 10 of 14 in “builtin-branch: improve output when displaying remote branches”
  1. builtin-branch: improve output when displaying remote branchesJay Soffian, Feb 10, 2009
  2. Jay SoffianFeb 11, 2009
  3. Junio C HamanoFeb 12, 2009
  4. Jay SoffianFeb 12, 2009
  5. Junio C HamanoFeb 12, 2009
  6. builtin-branch: improve output when displaying remote branchesJay Soffian, Feb 13, 2009
  7. Junio C HamanoFeb 13, 2009
  8. Jay SoffianFeb 13, 2009
  9. Junio C HamanoFeb 13, 2009
  10. Jay SoffianFeb 13, 2009
  11. builtin-branch: improve output when displaying remote branchesJay Soffian, Feb 13, 2009
  12. martin f krafftFeb 13, 2009
  13. Junio C HamanoFeb 13, 2009
  14. Johannes SixtFeb 13, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.