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

Re: Redirect isn't working:

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Jan 20, 2023, 01:46 UTC
Message-ID
<Y8nyi2QxQN0+kOOk@tapette.crustytoothpaste.net>
In-Reply-To
<CAKepmaibtbRsKqmiZEtDNoLHWr=JyZ7Fhang4dnmw5ROGmBQTQ@mail.gmail.com>
On 2023-01-19 at 18:06:17, Jack Adrian Zappa wrote:
Show 23 quoted lines
> Here is the filled out form for submitting a bug report:
> 
> What did you do before the bug happened? (Steps to reproduce your issue)
> 
>   At the command line, I typed the following command:
> 
>   $ git diff --no-index --word-diff --color=always <(od -An -t x1
> -w10000000000 file1.txt) <(od -An -t x1 -w10000000000 file2.txt)
> 
> What did you expect to happen? (Expected behavior)
> 
>   I expected to see the diff of the two files.
> 
> What happened instead? (Actual behavior)
> 
>   Instead I saw this:
> 
>   error: Could not access '/proc/1961/fd/63'
> 
> What's different between what you expected and what actually happened?
> 
>   The difference is that I would get the difference between the two
> files as opposed to a critical failure message.

Thanks for the report. This has come up before (and I attempted a patch), but the ultimate problem here is that the /proc/PID/fd/* files are symlinks on Linux, and instead of dereferencing symlinks, Git tries to read them and print where they point to. That doesn't work in this case because the symlinks are symlinks to anonymous pipes, which can't be resolved.

On other systems, the behaviour may be different because those files may be represented differently.

My patch attempted to solve this by simply opening the contents instead of stat'ing them as normal, but I think we found some edge cases and it didn't get finished. Note that this behaviour is what plain diff does because it doesn't handle symlinks at all.

-- 
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA
Previous: Jack Adrian ZappaNext: Johannes Schindelin
Message 2 of 3 in “Redirect isn't working:”
  1. Jack Adrian ZappaJan 19, 2023
  2. brian m. carlsonJan 20, 2023
  3. Johannes SchindelinMar 27, 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.