git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael J Gruber <michaeljgruber+gmane@fastmail.fm>
To: git@vger.kernel.org
Subject: Re: [BUG?] ls-files -d does not show files removed using 'git rm'
Date: Fri, 22 Aug 2008 18:49:49 +0200	[thread overview]
Message-ID: <g8mqnf$ncv$1@ger.gmane.org> (raw)
In-Reply-To: <48AEE261.8070906@forwardbias.in>

Girish Ramakrishnan venit, vidit, dixit 22.08.2008 17:59:
> If I remove a file using the shell rm, it is listed by ls-files -d.
> However, it is not listed if I use 'git rm'.
> 
> $ rm foo
> $ git ls-files -t -d
> R foo
> $ git checkout foo
> $ git rm foo
> rm 'foo'
> $ git ls-files -t -d
> $
> 
> Is this a bug? In any case, is there a way to find out what files have
> been removed using git rm using ls-files (git status does show it)?

git ls-files combines the listing from the index with the listing from
the workdir. A git rm'ed file is present in neither.

git diff --cached --name-only --diff-filter=D

would show all files which are staged for deletion (git rm'ed).

Michael

      reply	other threads:[~2008-08-22 16:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-22 15:59 [BUG?] ls-files -d does not show files removed using 'git rm' Girish Ramakrishnan
2008-08-22 16:49 ` Michael J Gruber [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

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

  git send-email \
    --in-reply-to='g8mqnf$ncv$1@ger.gmane.org' \
    --to=michaeljgruber+gmane@fastmail.fm \
    --cc=git@vger.kernel.org \
    /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.
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 NNTP newsgroup(s).