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

Re: [PATCH] http: add_fill_function checks if function has been added

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 7, 2009, 21:49 UTC
Message-ID
<7vd4ctm29m.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<be6fef0d0903071249s42ac7f94o82461ca32dcdfcd5@mail.gmail.com>
Tay Ray Chuan <rctay89@gmail.com> writes:
Show 6 quoted lines
> Calling a fill function repeatedly won't break behaviour, because fill
> functions (those that are currently defined in git) are designed to be
> called repeatedly. But it's just useless to call the same fill
> function repeatedly without any reason.
>
> So should I still address the "THIS and THAT breakages"?

Your above explanation is good, but it was given after I asked ;-). Making unnecessary call repeatedly counts as a breakage your patch fixes, right?

I didn't look at the callers of add_fill_function(), but "fill" takes a callback data and different invocation of add_fill_function() could be passing different callback data. In such a case, doesn't it feel wrong to omit the "duplicated" calls to register the fill callback? Your patch makes me suspect that it _might_ be better to fix the callers not to call the function repeatedly when they know they only want one-shot invocation.

Previous: Tay Ray ChuanNext: Tay Ray Chuan
Message 4 of 7 in “http: add_fill_function checks if function has been added”
  1. http: add_fill_function checks if function has been addedTay Ray Chuan, Mar 7, 2009
  2. Junio C HamanoMar 7, 2009
  3. Tay Ray ChuanMar 7, 2009
  4. Junio C HamanoMar 7, 2009
  5. Tay Ray ChuanMar 8, 2009
  6. Junio C HamanoMar 8, 2009
  7. Tay Ray ChuanMar 9, 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.