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

Re: [PATCH v4 1/2] diff --no-index: optionally follow symlinks

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 26, 2017, 03:42 UTC
Message-ID
<CAPc5daV-12U2mNcvfXmy4UmYnEm2UQWGWPUX7EO3Uc15e1D-VQ@mail.gmail.com>
In-Reply-To
<1490477422.29662.3.camel@kaarsemaker.net>

On Sat, Mar 25, 2017 at 2:30 PM, Dennis Kaarsemaker <dennis@kaarsemaker.net> wrote:

Show 9 quoted lines
>
>>  - does this code do a reasonable thing when the path is a symbolic
>>    link that points at a directory?  what does it mean to grab
>>    st.st_size for such a thing (and then go on to open() and xmmap()
>>    it)?
>
> No, it does something entirely unreasonable. I hadn't even thought of
> testing with symlinks to directories, as my ulterior motive was the
> next commit that makes it work with pipes. This will be fixed.

To be quite honest, I do not mind it if the "toplevel pipe that came from the command line is treated as if it were a regular file" was the only change in this series, without doing anything for symbolic links. I do not use the process substitution myself, but I can see why sometimes it is handy to pass two process invocations on the command line of "diff" (if it were only one, then "-" with the usual redirection already works, but you cannot do two command using that syntax).

Perhaps we can have only that part and perfect it first and have it ready for the next release, postponing the symlink dereferencing, which is a different issue?

Previous: Dennis KaarsemakerNext: Dennis Kaarsemaker
Message 5 of 6 in “diff --no-index: support symlinks and pipes”
  1. 0/2 diff --no-index: support symlinks and pipesDennis Kaarsemaker, Mar 24, 2017
  2. 1/2 diff --no-index: optionally follow symlinksDennis Kaarsemaker, Mar 24, 2017
  3. Junio C HamanoMar 24, 2017
  4. Dennis KaarsemakerMar 25, 2017
  5. Junio C HamanoMar 26, 2017
  6. 2/2 diff --no-index: support reading from pipesDennis Kaarsemaker, Mar 24, 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.