[BUG] "git diff FILE BRANCH:FILE" erroneously report FILE does not exist in BRANCH

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]