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

Re: [PATCH] merge-recursive: ignore_case shouldn't reject intentional removals

From
Elijah Newren <newren@gmail.com>
Date
Nov 28, 2017, 01:02 UTC
Message-ID
<CABPp-BHt0O_NQtJsAkxxkj0yAvaZDsDtxGJTd9wqmvUOvy7x6w@mail.gmail.com>
In-Reply-To
<xmqqshcz9tqa.fsf@gitster.mtv.corp.google.com>
On Mon, Nov 27, 2017 at 3:39 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 21 quoted lines
> Elijah Newren <newren@gmail.com> writes:
>
>>> As a fix, this sorely wants something new in t/ directory.
>>
>> Well, then perhaps I was wrong to submit it independent of my
>> directory rename series.  As noted in the (very lengthy) extended
>> commit message explanation, the assumption the previous code made just
>> happened to work ...
>
> Here is what I wrote in What's cooking draft (which automatically
> gets copied to the merge log message and becomes part of release
> notes when a topic graduates) for this thing.  Am I on the right
> track?
>
>     The code internal to the recursive merge strategy was not fully
>     prepared to see a path that is renamed to try overwriting another
>     path that is only different in case on case insensitive systems.
>     This does not matter in the current code, but will start to matter
>     once the rename detection logic starts taking hints from nearby
>     paths moving to some directory and moves a path that is otherwise
>     not changed along with them.

Yes, though I have one minor nit: I'd prefer "a new path" to "a path that is otherwise not changed".

(Reason for the nit: "Not changed" to me implies the file existed in the merge base and didn't change name on either side of the merge, which in turn implies the directory remains on both sides, which means there was no directory rename. Since directory rename detection is mostly about moving file adds into the right directory, this seemed like the simplest correction. There are also transitive renames, but they're much less common and trying to cover them too might make it even harder to parse.)

As a side note, the two sentences are a little bit unwieldy to try to parse. I couldn't come up with any concrete suggestions to improve it, so it's probably fine, but thought I'd mention in case others spot an easy way to simplify it.

Previous: Junio C Hamano
Message 10 of 10 in “merge-recursive: ignore_case shouldn't reject intentional removals”
  1. merge-recursive: ignore_case shouldn't reject intentional removalsElijah Newren, Nov 24, 2017
  2. Eric SunshineNov 24, 2017
  3. Elijah NewrenNov 24, 2017
  4. Junio C HamanoNov 25, 2017
  5. Elijah NewrenNov 25, 2017
  6. Junio C HamanoNov 26, 2017
  7. Junio C HamanoNov 27, 2017
  8. Elijah NewrenNov 27, 2017
  9. Junio C HamanoNov 27, 2017
  10. Elijah NewrenNov 28, 2017

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.