git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: git@vger.kernel.org
Subject: [BUG] "git diff FILE BRANCH:FILE" erroneously report FILE does not exist in BRANCH
Date: Sat, 21 Jan 2012 20:36:27 +0100	[thread overview]
Message-ID: <4F1B13BB.8070603@gmail.com> (raw)

Here is a complete reproducer for the bug:

mkdir foo \
  && cd foo \
  && git init . \
  && >README \
  && git add README \
  && git commit -m "for all" \
  && git checkout -b devel \
  && echo dev > README \
  && git add README \
  && git commit -m "for developers" \
  && git diff devel:README master:README \
  && git diff README master:README

I'd expect the last "git diff" to report the same diffs as the previous one;
instead, it errors out with this bogus message:

  fatal: Path 'README' exists on disk, but not in 'master'.

Behaviour verified with git version 1.7.7.3 (installed from official Debian
packages) and the latest git development version (1.7.9.rc0.69.gbddcef, from
master).

Regards, and thanks for your amazing software,
  Stefano

             reply	other threads:[~2012-01-21 19:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-21 19:36 Stefano Lattarini [this message]
2012-01-21 21:33 ` [BUG] "git diff FILE BRANCH:FILE" erroneously report FILE does not exist in BRANCH Carlos Martín Nieto
2012-01-21 22:08 ` Junio C Hamano

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=4F1B13BB.8070603@gmail.com \
    --to=stefano.lattarini@gmail.com \
    --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).