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

Re: [PATCH 1/2] test-path-utils.c: remove incorrect assumption

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 3, 2015, 17:13 UTC
Message-ID
<xmqqlhbj3mfo.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CAOYw7dubGJ=m5+EnjGy7jTQxR+b0uBmyG138KEQ5rzX2K7WcgA@mail.gmail.com>
Ray Donnelly <mingw.android@gmail.com> writes:
Show 5 quoted lines
> In normalize_ceiling_entry(), we test that normalized paths end with
> slash, *unless* the path to be normalized was already the root
> directory.
>
> However, normalize_path_copy() does not even enforce this condition.

Perhaps the real issue to be addressed is the above, and your patch is killing a coalmine canary?

Some callers of this function in real code (i.e. not the one you are removing the check) do seem to depend on that condition, e.g. the codepath in clone that leads to add_to_alternates_file() wants to make sure it does not add an duplicate, so it may end up not noticing /foo/bar and /foo/bar/ are the same thing, no? There may be others.

Previous: Ray DonnellyNext: Ray Donnelly
Message 3 of 9 in “test-path-utils.c: remove incorrect assumption”
  1. 1/2 test-path-utils.c: remove incorrect assumptionRay Donnelly, Oct 3, 2015
  2. Ray DonnellyOct 3, 2015
  3. Junio C HamanoOct 3, 2015
  4. Ray DonnellyOct 4, 2015
  5. Junio C HamanoOct 4, 2015
  6. Ray DonnellyOct 4, 2015
  7. Ray DonnellyOct 8, 2015
  8. Junio C HamanoOct 9, 2015
  9. Ray DonnellyOct 9, 2015

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.