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

From: "Randall S. Becker" <[email-masked]>
Date: Mon, 18 Feb 2019 11:14:52 -0500

On February 18, 2019 10:17, SZEDER Gábor wrote:
> To: Joe Ranieri <[email-masked]>
> Cc: [email-masked]
> 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.