Test helper binaries clean-up.
* nd/test-tool:
Makefile: add a hint about TEST_BUILTINS_OBJS
t/helper: merge test-dump-fsmonitor into test-tool
t/helper: merge test-parse-options into test-tool
t/helper: merge test-pkt-line into test-tool
t/helper: merge test-dump-untracked-cache into test-tool
t/helper: keep test-tool command list sorted
test_expect_success 'stateless-rpc flag does not list capabilities' '
# Empty request
test-pkt-line pack >in <<-EOF &&
test-tool pkt-line pack >in <<-EOF &&
0000
EOF
git serve --stateless-rpc >out <in &&
@ -33,7 +33,7 @@ test_expect_success 'stateless-rpc flag does not list capabilities' '
@@ -33,7 +33,7 @@ test_expect_success 'stateless-rpc flag does not list capabilities' '
@ -334,7 +334,7 @@ test_expect_success 'even with handcrafted request, filter does not work if not
@@ -334,7 +334,7 @@ test_expect_success 'even with handcrafted request, filter does not work if not
git -C server config uploadpack.allowfilter 0 &&
# Custom request that tries to filter even though it is not advertised.
@ -122,7 +122,7 @@ test_expect_success 'mix want and want-ref' '
@@ -122,7 +122,7 @@ test_expect_success 'mix want and want-ref' '
EOF
git rev-parse e f | sort >expected_commits &&
test-pkt-line pack >in <<-EOF &&
test-tool pkt-line pack >in <<-EOF &&
command=fetch
0001
no-progress
@ -143,7 +143,7 @@ test_expect_success 'want-ref with ref we already have commit for' '
@@ -143,7 +143,7 @@ test_expect_success 'want-ref with ref we already have commit for' '
test_expect_success '--no-untracked-cache removes the cache' '
git update-index --no-untracked-cache &&
test-dump-untracked-cache >../actual &&
test-tool dump-untracked-cache >../actual &&
echo "no untracked cache" >../expect-no-uc &&
test_cmp ../expect-no-uc ../actual
'
test_expect_success 'git status does not change anything' '
git status &&
test-dump-untracked-cache >../actual &&
test-tool dump-untracked-cache >../actual &&
test_cmp ../expect-no-uc ../actual
'
test_expect_success 'setting core.untrackedCache to true and using git status creates the cache' '
git config core.untrackedCache true &&
test-dump-untracked-cache >../actual &&
test-tool dump-untracked-cache >../actual &&
test_cmp ../expect-no-uc ../actual &&
git status &&
test-dump-untracked-cache >../actual &&
test-tool dump-untracked-cache >../actual &&
test_cmp ../expect-from-test-dump ../actual
'
test_expect_success 'using --no-untracked-cache does not fail when core.untrackedCache is true' '
git update-index --no-untracked-cache &&
test-dump-untracked-cache >../actual &&
test-tool dump-untracked-cache >../actual &&
test_cmp ../expect-no-uc ../actual &&
git update-index --untracked-cache &&
test-dump-untracked-cache >../actual &&
test-tool dump-untracked-cache >../actual &&
test_cmp ../expect-empty ../actual
'
test_expect_success 'setting core.untrackedCache to false and using git status removes the cache' '
git config core.untrackedCache false &&
test-dump-untracked-cache >../actual &&
test-tool dump-untracked-cache >../actual &&
test_cmp ../expect-empty ../actual &&
git status &&
test-dump-untracked-cache >../actual &&
test-tool dump-untracked-cache >../actual &&
test_cmp ../expect-no-uc ../actual
'
test_expect_success 'using --untracked-cache does not fail when core.untrackedCache is false' '
git update-index --untracked-cache &&
test-dump-untracked-cache >../actual &&
test-tool dump-untracked-cache >../actual &&
test_cmp ../expect-empty ../actual
'
test_expect_success 'setting core.untrackedCache to keep' '
git config core.untrackedCache keep &&
git update-index --untracked-cache &&
test-dump-untracked-cache >../actual &&
test-tool dump-untracked-cache >../actual &&
test_cmp ../expect-empty ../actual &&
git status &&
test-dump-untracked-cache >../actual &&
test-tool dump-untracked-cache >../actual &&
test_cmp ../expect-from-test-dump ../actual &&
git update-index --no-untracked-cache &&
test-dump-untracked-cache >../actual &&
test-tool dump-untracked-cache >../actual &&
test_cmp ../expect-no-uc ../actual &&
git update-index --force-untracked-cache &&
test-dump-untracked-cache >../actual &&
test-tool dump-untracked-cache >../actual &&
test_cmp ../expect-empty ../actual &&
git status &&
test-dump-untracked-cache >../actual &&
test-tool dump-untracked-cache >../actual &&
test_cmp ../expect-from-test-dump ../actual
'
@ -671,23 +671,23 @@ test_expect_success 'test ident field is working' '
@@ -671,23 +671,23 @@ test_expect_success 'test ident field is working' '
test_expect_success 'untracked cache survives a checkout' '
git commit --allow-empty -m empty &&
test-dump-untracked-cache >../before &&
test-tool dump-untracked-cache >../before &&
test_when_finished "git checkout master" &&
git checkout -b other_branch &&
test-dump-untracked-cache >../after &&
test-tool dump-untracked-cache >../after &&
test_cmp ../before ../after &&
test_commit test &&
test-dump-untracked-cache >../before &&
test-tool dump-untracked-cache >../before &&
git checkout master &&
test-dump-untracked-cache >../after &&
test-tool dump-untracked-cache >../after &&
test_cmp ../before ../after
'
test_expect_success 'untracked cache survives a commit' '
test-dump-untracked-cache >../before &&
test-tool dump-untracked-cache >../before &&
git add done/two &&
git commit -m commit &&
test-dump-untracked-cache >../after &&
test-tool dump-untracked-cache >../after &&
test_cmp ../before ../after
'
@ -751,7 +751,7 @@ test_expect_success '"status" after file replacement should be clean with UC=tru
@@ -751,7 +751,7 @@ test_expect_success '"status" after file replacement should be clean with UC=tru
# test that the fsmonitor extension is off by default
test_expect_success 'fsmonitor extension is off by default' '
test-dump-fsmonitor >actual &&
test-tool dump-fsmonitor >actual &&
grep "^no fsmonitor" actual
'
# test that "update-index --fsmonitor" adds the fsmonitor extension
test_expect_success 'update-index --fsmonitor" adds the fsmonitor extension' '
git update-index --fsmonitor &&
test-dump-fsmonitor >actual &&
test-tool dump-fsmonitor >actual &&
grep "^fsmonitor last update" actual
'
# test that "update-index --no-fsmonitor" removes the fsmonitor extension
test_expect_success 'update-index --no-fsmonitor" removes the fsmonitor extension' '
git update-index --no-fsmonitor &&
test-dump-fsmonitor >actual &&
test-tool dump-fsmonitor >actual &&
grep "^no fsmonitor" actual
'
@ -307,9 +307,9 @@ test_expect_success 'splitting the index results in the same state' '
@@ -307,9 +307,9 @@ test_expect_success 'splitting the index results in the same state' '