Code

Merge branch 'jc/maint-1.6.0-diff-borrow-carefully' into maint-1.6.1
authorJunio C Hamano <gitster@pobox.com>
Sun, 3 May 2009 22:01:26 +0000 (15:01 -0700)
committerJunio 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

1  2 
diff.c
t/t4020-diff-external.sh

diff --cc diff.c
Simple merge
index caea292f15437f50fd324496ff511971cc9d1d0c,f853b8a894246f1f9d09c18656e290a2e2f9ce6d..2a72e751e290ad59d5277695a1128aebb678c2a1
@@@ -125,7 -104,15 +125,15 @@@ echo NULZbetweenZwords | perl -pe 'y/Z/
  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