git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: NoName Req <nonamereq29@gmail.com>
To: Duy Nguyen <pclouds@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Bug(feature?) on git-diff-files
Date: Fri, 12 Apr 2019 15:41:22 +0300	[thread overview]
Message-ID: <CABgj7uu95Pg7jJY1CN7kUS-SWE6+FCgQshuzWWRrhMqBd_zMMA@mail.gmail.com> (raw)
In-Reply-To: <CACsJy8B0dmonaCuAmT6wNJae8iX0JxUOvU-P=zvjVUrQnoHoUw@mail.gmail.com>

Okay thanks for the reply. I didn't know about git update-index will
try that now.

On Thu, Apr 11, 2019 at 3:57 PM Duy Nguyen <pclouds@gmail.com> wrote:
>
> On Thu, Apr 11, 2019 at 7:49 PM NoName Req <nonamereq29@gmail.com> wrote:
> >
> > Summary
> >    `git -C (folder path) diff-files --name-only` output is not correct
> >
> > Steps to Reproduce
> > 1. Apply change to a clean git repository. Go to another folder (not
> > within this repository) and apply the command
> >    `git -C repo-path diff-files --name-only`
> > The above command lists dirty files in that repository.
> > 2. Now undo your changes on the repository
> > 3. Issue the same command. It still lists the file.
> >
> > More Information
> >
> > `git -C repo-path diff`  command doesn't seem to have this problem.
>
> I haven't tried to reproduce. But my first impression is diff-files,
> as a low-level plumbing sometimes requires you to refresh the index
> first. Sometimes without that, you'll get wrong output.
>
> "git diff" is a more high-level command that always refreshes the
> index internally.
>
> >
> > System Information
> >
> > Arch Linux 5.0.7-arch1-1-ARCH
> > git version 2.21.0
>
>
>
> --
> Duy

  reply	other threads:[~2019-04-12 12:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-11 12:47 Bug(feature?) on git-diff-files NoName Req
2019-04-11 12:56 ` Duy Nguyen
2019-04-12 12:41   ` NoName Req [this message]
2019-04-11 12:57 ` Jeff King

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=CABgj7uu95Pg7jJY1CN7kUS-SWE6+FCgQshuzWWRrhMqBd_zMMA@mail.gmail.com \
    --to=nonamereq29@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=pclouds@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).