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

RE: [BUG] ls-files showing deleted files (unchecked lstat return value)

From
Randall S. Becker <rsbecker@nexbridge.com>
Date
Feb 18, 2019, 16:14 UTC
Message-ID
<000c01d4c7a5$17915a00$46b40e00$@nexbridge.com>
In-Reply-To
<20190218151725.GL1622@szeder.dev>
On February 18, 2019 10:17, SZEDER Gábor wrote:
Show 11 quoted lines
> To: Joe Ranieri <jranieri@grammatech.com>
> Cc: git@vger.kernel.org
> Subject: Re: [BUG] ls-files showing deleted files (unchecked lstat return
> value)
> 
> On Sun, Feb 17, 2019 at 08:49:39AM -0500, Joe Ranieri wrote:
> > "git ls-files -m" can show deleted files, despite -d not having been
> > specified.
> 
> To my understanding that's intentional: a deleted file is considered modified,
> because its content clearly doesn't match the tracked content.
That's a good point and why I asked for a specific test condition that illustrated the bug as being unanticipated. I'm not sure what Joe supplied elsewhere in the thread does that.
> > This is due to ls-files.c's show_files function calling lstat but not
> > checking the return value before calling ie_modified with the
> > uninitialized stat structure.
Previous: SZEDER GáborNext: Junio C Hamano
Message 5 of 6 in “[BUG] ls-files showing deleted files (unchecked lstat return value)”
  1. Joe RanieriFeb 17, 2019
  2. Randall S. BeckerFeb 17, 2019
  3. Joe RanieriFeb 18, 2019
  4. SZEDER GáborFeb 18, 2019
  5. Randall S. BeckerFeb 18, 2019
  6. Junio C HamanoFeb 20, 2019

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.