git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "SZEDER Gábor" <szeder.dev@gmail.com>
Cc: Joe Ranieri <jranieri@grammatech.com>, git@vger.kernel.org
Subject: Re: [BUG] ls-files showing deleted files (unchecked lstat return value)
Date: Wed, 20 Feb 2019 14:51:52 -0800	[thread overview]
Message-ID: <xmqqh8cyul87.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20190218151725.GL1622@szeder.dev> ("SZEDER Gábor"'s message of "Mon, 18 Feb 2019 16:17:25 +0100")

SZEDER Gábor <szeder.dev@gmail.com> writes:

> 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.

Hmph, I am not so sure about that.

It seems that b0391890 ("Show modified files in git-ls-files",
2005-09-19) fixes one of its draft version's bugs in
"http://public-inbox.org/git/43179E59.80106@didntduck.org/" by not
letting it use ce_match_stat() directly, but introducing
ce_modified() that inspects the data for actual changes.  The effort
however did not spot the other bug, namely, lstat() returning an
error for ENOENT.

I think the original intent was for "ls-files -d", "ls-files -m" and
"ls-files -d m" all can be used in a meaningful way by keeping these
two selectors independent.  The buggy implementation did not realize
that intent correctly, though.

      parent reply	other threads:[~2019-02-20 22:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-17 13:49 [BUG] ls-files showing deleted files (unchecked lstat return value) Joe Ranieri
2019-02-17 15:59 ` Randall S. Becker
2019-02-18 14:09   ` Joe Ranieri
2019-02-18 15:17 ` SZEDER Gábor
2019-02-18 16:14   ` Randall S. Becker
2019-02-20 22:51   ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqh8cyul87.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jranieri@grammatech.com \
    --cc=szeder.dev@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).