diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-08-08 14:21:32 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-08-08 14:21:33 -0700 |
commit | 880b3fee51e9b5b0bb7c0361fd3bf2c5fedda5bf (patch) | |
tree | 8f8b8c40c0e6914a81d5ac2c3b3658389f06de10 /t/t4054-diff-bogus-tree.sh | |
parent | Merge branch 'mh/blame-worktree' into maint (diff) | |
parent | cache-tree: do not generate empty trees as a result of all i-t-a subentries (diff) | |
download | tgif-880b3fee51e9b5b0bb7c0361fd3bf2c5fedda5bf.tar.xz |
Merge branch 'nd/cache-tree-ita' into maint
"git add -N dir/file && git write-tree" produced an incorrect tree
when there are other paths in the same directory that sorts after
"file".
* nd/cache-tree-ita:
cache-tree: do not generate empty trees as a result of all i-t-a subentries
cache-tree.c: fix i-t-a entry skipping directory updates sometimes
test-lib.sh: introduce and use $EMPTY_BLOB
test-lib.sh: introduce and use $EMPTY_TREE
Diffstat (limited to 't/t4054-diff-bogus-tree.sh')
-rwxr-xr-x | t/t4054-diff-bogus-tree.sh | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/t/t4054-diff-bogus-tree.sh b/t/t4054-diff-bogus-tree.sh index 1d6efab3c5..18f42c5fff 100755 --- a/t/t4054-diff-bogus-tree.sh +++ b/t/t4054-diff-bogus-tree.sh @@ -3,8 +3,6 @@ test_description='test diff with a bogus tree containing the null sha1' . ./test-lib.sh -empty_tree=4b825dc642cb6eb9a060e54bf8d69288fbee4904 - test_expect_success 'create bogus tree' ' bogus_tree=$( printf "100644 fooQQQQQQQQQQQQQQQQQQQQQ" | @@ -22,13 +20,13 @@ test_expect_success 'create tree with matching file' ' test_expect_success 'raw diff shows null sha1 (addition)' ' echo ":000000 100644 $_z40 $_z40 A foo" >expect && - git diff-tree $empty_tree $bogus_tree >actual && + git diff-tree $EMPTY_TREE $bogus_tree >actual && test_cmp expect actual ' test_expect_success 'raw diff shows null sha1 (removal)' ' echo ":100644 000000 $_z40 $_z40 D foo" >expect && - git diff-tree $bogus_tree $empty_tree >actual && + git diff-tree $bogus_tree $EMPTY_TREE >actual && test_cmp expect actual ' @@ -57,11 +55,11 @@ test_expect_success 'raw diff shows null sha1 (index)' ' ' test_expect_success 'patch fails due to bogus sha1 (addition)' ' - test_must_fail git diff-tree -p $empty_tree $bogus_tree + test_must_fail git diff-tree -p $EMPTY_TREE $bogus_tree ' test_expect_success 'patch fails due to bogus sha1 (removal)' ' - test_must_fail git diff-tree -p $bogus_tree $empty_tree + test_must_fail git diff-tree -p $bogus_tree $EMPTY_TREE ' test_expect_success 'patch fails due to bogus sha1 (modification)' ' |