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

Re: [PATCH] clone: error specifically with --local and symlinked objects

From
Taylor Blau <me@ttaylorr.com>
Date
Apr 6, 2023, 21:27 UTC
Message-ID
<ZC85ODogr79t0ZXZ@nand.local>
In-Reply-To
<xmqq7curxk22.fsf@gitster.g>
On Tue, Apr 04, 2023 at 05:13:41PM -0700, Junio C Hamano wrote:
Show 6 quoted lines
>  * if lstat() succeeds, but the path is *not* a directory; errno is
>    explicitly set to ENOTDIR.  Unfortunately, if lstat(2) failed
>    with ENOTDIR (e.g. dir_iterator_begin() gets called with a path
>    whose leading component is not a directory), the caller will also
>    see ENOTDIR, but the distinction may not matter in practice.  I
>    haven't thought things through.

Yeah. The real tragedy here is that there's no way to signal that a file *is* a symbolic link and represent that as an error code in errno.

So I think the best that we can do here is to continue to report ENOTDIR, and have the caller figure out what to do with it.

Thanks, Taylor

Previous: Glen ChooNext: Glen Choo via GitGitGadget
Message 7 of 14 in “clone: error specifically with --local and symlinked objects”
  1. clone: error specifically with --local and symlinked objectsGlen Choo via GitGitGadget, Apr 4, 2023
  2. Junio C HamanoApr 5, 2023
  3. Glen ChooApr 5, 2023
  4. Junio C HamanoApr 5, 2023
  5. Taylor BlauApr 6, 2023
  6. Glen ChooApr 6, 2023
  7. Taylor BlauApr 6, 2023
  8. clone: error specifically with --local and symlinked objectsGlen Choo via GitGitGadget, Apr 10, 2023
  9. Junio C HamanoApr 10, 2023
  10. Taylor BlauApr 10, 2023
  11. Taylor BlauApr 11, 2023
  12. clone: error specifically with --local and symlinked objectsGlen Choo via GitGitGadget, Apr 11, 2023
  13. Junio C HamanoApr 11, 2023
  14. Glen ChooApr 11, 2023

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.