"git diff": do not ignore index without --no-index

Even if "foo" and/or "bar" does not exist in index, "git diff foo bar"
should not change behaviour drastically from "git diff foo bar baz" or
"git diff foo".  A feature that "sometimes works and is handy" is an
unreliable cute hack.

"git diff foo bar" outside a git repository continues to work as a more
colourful alternative to "diff -u" as before.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Junio C Hamano
2008-05-23 22:28:56 -07:00
parent 6304c29d51
commit 0569e9b8ce
8 changed files with 283 additions and 338 deletions

View File

@ -1,3 +1,2 @@
$ git diff --name-status dir2 dir
A dir/sub
$