Merge branch 'bs/maint-1.6.0-tree-walk-prefix' into maint-1.6.1
authorJunio C Hamano <gitster@pobox.com>
Sun, 3 May 2009 22:01:19 +0000 (15:01 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 3 May 2009 22:01:19 +0000 (15:01 -0700)
* bs/maint-1.6.0-tree-walk-prefix:
match_tree_entry(): a pathspec only matches at directory boundaries
tree_entry_interesting: a pathspec only matches at directory boundary

1  2 
t/t4010-diff-pathspec.sh
diff --combined t/t4010-diff-pathspec.sh
index 9322298ecc6cb79f0123dea4e329317c5bfbfd11,4c4c8b1570c01721e8ac2c8d16837e68ecaa30f5..94df7ae53a0ef47c0ef10ca6b3215ffdf38fa399
@@@ -10,7 -10,7 +10,7 @@@ Prepare
          path1/file1
  '
  . ./test-lib.sh
 -. ../diff-lib.sh ;# test-lib chdir's into trash
 +. "$TEST_DIRECTORY"/diff-lib.sh ;# test-lib chdir's into trash
  
  test_expect_success \
      setup \
@@@ -62,4 -62,12 +62,12 @@@ test_expect_success 
      'git diff-index --cached $tree -- file0/ >current &&
       compare_diff_raw current expected'
  
+ test_expect_success 'diff-tree pathspec' '
+       tree2=$(git write-tree) &&
+       echo "$tree2" &&
+       git diff-tree -r --name-only $tree $tree2 -- pa path1/a >current &&
+       >expected &&
+       test_cmp expected current
+ '
  test_done