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

Re: [PATCH 1/3] name-hash: refactor polymorphic index_name_exists()

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Sep 13, 2013, 22:20 UTC
Message-ID
<CAPig+cR8oYcp1ERUtW7wUvjFN0j0921iBOUjYKor59gTOb+Zcw@mail.gmail.com>
In-Reply-To
<xmqqfvt8iczh.fsf@gitster.dls.corp.google.com>
On Fri, Sep 13, 2013 at 6:16 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 25 quoted lines
> Eric Sunshine <sunshine@sunshineco.com> writes:
>
>> Given the above. How should I proceed? Do you still feel that it is
>> advisable to keep an index_name_exists() around for compatibility
>> reasons in case any new callers are introduced? Regardless of that
>> answer, do you want index_name_exists() renamed to
>> index_file_exists()?
>
> Renaming *_name_exists() to *_file_exists() without keeping a
> compatibility one will force new topics to be rebased on this
> series.  Alternatively we could merge them to 'pu' (and later 'next'
> and 'master') with evil merges to adjust the change in the semantics
> of the called function.  That increases the risk of accidental
> breakages, I think.
>
> It is safer to keep index_name_exists() around with the older
> semantics, if we can, and rename your "file only" one to a different
> name.  That way, even if a new topic still uses index_name_exists()
> expecting the traditional behaviour, it will not break immediately
> and we do not need to risk evil merges making mistakes.
>
> Later, we can "git grep _name_exists" to spot them and convert such
> old-style calls to either "directory only" or "file only" variants
> after this series and these follow-on topics hit 'master' (and we do
> not know at this point in what order that happens).
Thanks. That's what I needed to know. I'll re-roll with the suggested changes.

(And, I'm looking into the Mac-only test breakages not related to this patch series.)

Previous: Junio C Hamano
Message 9 of 9 in “stop storing trailing slash in dir-hash”
  1. 0/3 stop storing trailing slash in dir-hashEric Sunshine, Sep 13, 2013
  2. 1/3 name-hash: refactor polymorphic index_name_exists()Eric Sunshine, Sep 13, 2013
  3. Junio C HamanoSep 13, 2013
  4. Eric SunshineSep 13, 2013
  5. 2/3 name-hash: stop storing trailing '/' on paths in index_state.dir_hashEric Sunshine, Sep 13, 2013
  6. 3/3 dir: revert work-around for retired dangerous behaviorEric Sunshine, Sep 13, 2013
  7. Eric SunshineSep 13, 2013
  8. Junio C HamanoSep 13, 2013
  9. Eric SunshineSep 13, 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.