From: Junio C Hamano Date: Mon, 25 Jul 2016 21:13:44 +0000 (-0700) Subject: Merge branch 'nd/cache-tree-ita' X-Git-Tag: v2.10.0-rc0~86 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/3cc75c10d781572a073d7dbff4e1695b93a89d48?hp=-c Merge branch 'nd/cache-tree-ita' "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 --- 3cc75c10d781572a073d7dbff4e1695b93a89d48 diff --combined t/t1011-read-tree-sparse-checkout.sh index e5fa235d3a,2563d18440..c167f606ca --- a/t/t1011-read-tree-sparse-checkout.sh +++ b/t/t1011-read-tree-sparse-checkout.sh @@@ -15,11 -15,11 +15,11 @@@ test_description='sparse checkout test . "$TEST_DIRECTORY"/lib-read-tree.sh test_expect_success 'setup' ' - cat >expected <<-\EOF && + cat >expected <<-EOF && 100644 77f0ba1734ed79d12881f81b36ee134de6a3327b 0 init.t - 100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 sub/added - 100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 sub/addedtoo - 100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 subsub/added + 100644 $EMPTY_BLOB 0 sub/added + 100644 $EMPTY_BLOB 0 sub/addedtoo + 100644 $EMPTY_BLOB 0 subsub/added EOF cat >expected.swt <<-\EOF && H init.t @@@ -244,10 -244,10 +244,10 @@@ test_expect_success 'print errors when error: The following untracked working tree files would be overwritten by checkout: sub/added sub/addedtoo -Please move or remove them before you can switch branches. +Please move or remove them before you switch branches. Aborting EOF - test_cmp expected actual + test_i18ncmp expected actual ' test_expect_success 'checkout without --ignore-skip-worktree-bits' ' diff --combined t/t7063-status-untracked-cache.sh index 38b3890532,a828a5f3b4..c23a21cb74 --- a/t/t7063-status-untracked-cache.sh +++ b/t/t7063-status-untracked-cache.sh @@@ -53,7 -53,7 +53,7 @@@ A tw EOF cat >../dump.expect <../actual && cat >../expect <../actual && cat >../expect <../err && echo "warning: Untracked cache is disabled on this system or location." >../expect && - test_cmp ../expect ../err + test_i18ncmp ../expect ../err ' test_done diff --combined t/t7508-status.sh index b3bdd162aa,a42aef8317..fb00e6d9b0 --- a/t/t7508-status.sh +++ b/t/t7508-status.sh @@@ -803,7 -803,7 +803,7 @@@ EO ' cat >expect < output && - test_cmp expect output && + test_i18ncmp expect output && git config -f .gitmodules --remove-section submodule.subname ' @@@ -1387,7 -1387,7 +1387,7 @@@ test_expect_success '.git/config ignore git config --add submodule.subname.ignore all && git config --add submodule.subname.path sm && git status > output && - test_cmp expect output && + test_i18ncmp expect output && git config --remove-section submodule.subname && git config -f .gitmodules --remove-section submodule.subname ' diff --combined t/test-lib.sh index 3f8b98b2c5,9f36091bf8..d731d66e36 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@@ -162,6 -162,9 +162,9 @@@ _x40="$_x05$_x05$_x05$_x05$_x05$_x05$_x # Zero SHA-1 _z40=0000000000000000000000000000000000000000 + EMPTY_TREE=4b825dc642cb6eb9a060e54bf8d69288fbee4904 + EMPTY_BLOB=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 + # Line feed LF=' ' @@@ -170,7 -173,7 +173,7 @@@ # when case-folding filenames u200c=$(printf '\342\200\214') - export _x05 _x40 _z40 LF u200c + export _x05 _x40 _z40 LF u200c EMPTY_TREE EMPTY_BLOB # Each test should start with something like this, after copyright notices: # @@@ -798,7 -801,7 +801,7 @@@ the # override all git executables in TEST_DIRECTORY/.. GIT_VALGRIND=$TEST_DIRECTORY/valgrind mkdir -p "$GIT_VALGRIND"/bin - for file in $GIT_BUILD_DIR/git* $GIT_BUILD_DIR/test-* + for file in $GIT_BUILD_DIR/git* $GIT_BUILD_DIR/t/helper/test-* do make_valgrind_symlink $file done @@@ -1111,12 -1114,3 +1114,12 @@@ run_with_limited_cmdline () } test_lazy_prereq CMDLINE_LIMIT 'run_with_limited_cmdline true' + +build_option () { + git version --build-options | + sed -ne "s/^$1: //p" +} + +test_lazy_prereq LONG_IS_64BIT ' + test 8 -le "$(build_option sizeof-long)" +'