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

Re: t3010 broken by 2eac2a4

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Aug 23, 2013, 09:19 UTC
Message-ID
<CAPig+cRumXHk-30yvS8Q2xvOxA0qEEXaD7=iJo_X26HL-YRRJg@mail.gmail.com>
In-Reply-To
<7vsiy1j7dd.fsf@alter.siamese.dyndns.org>
On Fri, Aug 23, 2013 at 1:36 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 13 quoted lines
> Eric Sunshine <sunshine@sunshineco.com> writes:
>
>> I sent a patch [1] which resolves the problem, although the solution
>> is not especially pretty (due to some ugliness in the existing
>> implementation).
>
> Yeah, thanks.
>
> I tend to agree with you that fixing the "icase" callee not to rely
> on having the trailing slash (which is looking past the end of the
> given string), instead of working that breakage around on the
> caller's side like your patch did, would be a better alternative,
> though.

My concern with fixing directory_exists_in_index_icase() to add the '/' itself was that it would have to copy the string to make space for the '/', which could be expensive. However, I reworked the code so that the existing strbufs now get passed to directory_exists_in_index_icase(), which allows it to add its needed '/' without duplicating the string. So, the trailing '/' requirement of directory_exists_in_index_icase() is now a private implementation detail, placing no burden on the caller.

I'll send the revised patch series later today since the commit message needs a rewrite. Also, I'd like to try to split the change into a couple patches -- one to pass around strbufs, which has a noisy diff, and one to fix the actual bug -- though I fear that splitting may not be possible.

Previous: Junio C HamanoNext: Junio C Hamano
Message 15 of 17 in “t3010 broken by 2eac2a4”
  1. Brian GernhardtAug 21, 2013
  2. Junio C HamanoAug 21, 2013
  3. Eric SunshineAug 22, 2013
  4. Junio C HamanoAug 22, 2013
  5. Eric SunshineAug 22, 2013
  6. Junio C HamanoAug 22, 2013
  7. Eric SunshineAug 22, 2013
  8. Junio C HamanoAug 22, 2013
  9. Eric SunshineAug 22, 2013
  10. Eric SunshineAug 22, 2013
  11. Junio C HamanoAug 22, 2013
  12. Eric SunshineAug 22, 2013
  13. Eric SunshineAug 23, 2013
  14. Junio C HamanoAug 23, 2013
  15. Eric SunshineAug 23, 2013
  16. Junio C HamanoAug 23, 2013
  17. Jeff KingAug 23, 2013

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.