author | Junio C Hamano <gitster@pobox.com> | |
Sun, 3 May 2009 22:01:26 +0000 (15:01 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 3 May 2009 22:01:26 +0000 (15:01 -0700) |
* jc/maint-1.6.0-diff-borrow-carefully:
diff --cached: do not borrow from a work tree when a path is marked as assume-unchanged
diff --cached: do not borrow from a work tree when a path is marked as assume-unchanged
1 | 2 | |||
---|---|---|---|---|
diff.c | patch | | diff1 | | diff2 | | blob | history |
t/t4020-diff-external.sh | patch | | diff1 | | diff2 | | blob | history |
diff --cc diff.c
Simple merge
diff --cc t/t4020-diff-external.sh
index caea292f15437f50fd324496ff511971cc9d1d0c,f853b8a894246f1f9d09c18656e290a2e2f9ce6d..2a72e751e290ad59d5277695a1128aebb678c2a1
+++ b/t/t4020-diff-external.sh
test_expect_success 'force diff with "diff"' '
echo >.gitattributes "file diff" &&
git diff >actual &&
- test_cmp ../t4020/diff.NUL actual
+ test_cmp "$TEST_DIRECTORY"/t4020/diff.NUL actual
'
+ test_expect_success 'diff --cached' '
+ git add file &&
+ git update-index --assume-unchanged file &&
+ echo second >file &&
+ git diff --cached >actual &&
+ test_cmp ../t4020/diff.NUL actual
+ '
+
test_done