summaryrefslogtreecommitdiff
path: root/t/t4013
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2008-05-23 22:28:56 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2008-05-24 00:16:39 -0700
commit0569e9b8cea20d5eedfec66730a9711a0907ab0d (patch)
tree768d9acf222cb72826cd52279383b664092ab525 /t/t4013
parentdiff-files: do not play --no-index games (diff)
downloadtgif-0569e9b8cea20d5eedfec66730a9711a0907ab0d.tar.xz
"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>
Diffstat (limited to 't/t4013')
-rw-r--r--t/t4013/diff.diff_--name-status_dir2_dir1
-rw-r--r--t/t4013/diff.diff_--no-index_--name-status_dir2_dir3
2 files changed, 3 insertions, 1 deletions
diff --git a/t/t4013/diff.diff_--name-status_dir2_dir b/t/t4013/diff.diff_--name-status_dir2_dir
index ef7fdb7335..d0d96aaa91 100644
--- a/t/t4013/diff.diff_--name-status_dir2_dir
+++ b/t/t4013/diff.diff_--name-status_dir2_dir
@@ -1,3 +1,2 @@
$ git diff --name-status dir2 dir
-A dir/sub
$
diff --git a/t/t4013/diff.diff_--no-index_--name-status_dir2_dir b/t/t4013/diff.diff_--no-index_--name-status_dir2_dir
new file mode 100644
index 0000000000..6a47584777
--- /dev/null
+++ b/t/t4013/diff.diff_--no-index_--name-status_dir2_dir
@@ -0,0 +1,3 @@
+$ git diff --no-index --name-status dir2 dir
+A dir/sub
+$