Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
t/helper: merge test-scrap-cache-tree into test-tool
author
Nguyễn Thái Ngọc Duy
<pclouds@gmail.com>
Sat, 24 Mar 2018 07:44:56 +0000
(08:44 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 27 Mar 2018 15:45:47 +0000
(08:45 -0700)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
patch
|
blob
|
history
t/helper/test-scrap-cache-tree.c
patch
|
blob
|
history
t/helper/test-tool.c
patch
|
blob
|
history
t/helper/test-tool.h
patch
|
blob
|
history
t/t0090-cache-tree.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
ae6a51f
)
diff --git
a/Makefile
b/Makefile
index adece67b8eb685281e7adf494cbcd60539e5389f..ba7c7d8a79f4454c5ad2934421da8bfa7bcb2ce2 100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-676,6
+676,7
@@
TEST_BUILTINS_OBJS += test-ref-store.o
TEST_BUILTINS_OBJS += test-regex.o
TEST_BUILTINS_OBJS += test-revision-walking.o
TEST_BUILTINS_OBJS += test-run-command.o
TEST_BUILTINS_OBJS += test-regex.o
TEST_BUILTINS_OBJS += test-revision-walking.o
TEST_BUILTINS_OBJS += test-run-command.o
+TEST_BUILTINS_OBJS += test-scrap-cache-tree.o
TEST_BUILTINS_OBJS += test-sha1.o
TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
TEST_BUILTINS_OBJS += test-sha1.o
TEST_PROGRAMS_NEED_X += test-dump-fsmonitor
@@
-684,7
+685,6
@@
TEST_PROGRAMS_NEED_X += test-fake-ssh
TEST_PROGRAMS_NEED_X += test-line-buffer
TEST_PROGRAMS_NEED_X += test-parse-options
TEST_PROGRAMS_NEED_X += test-write-cache
TEST_PROGRAMS_NEED_X += test-line-buffer
TEST_PROGRAMS_NEED_X += test-parse-options
TEST_PROGRAMS_NEED_X += test-write-cache
-TEST_PROGRAMS_NEED_X += test-scrap-cache-tree
TEST_PROGRAMS_NEED_X += test-sha1-array
TEST_PROGRAMS_NEED_X += test-sigchain
TEST_PROGRAMS_NEED_X += test-strcmp-offset
TEST_PROGRAMS_NEED_X += test-sha1-array
TEST_PROGRAMS_NEED_X += test-sigchain
TEST_PROGRAMS_NEED_X += test-strcmp-offset
diff --git
a/t/helper/test-scrap-cache-tree.c
b/t/helper/test-scrap-cache-tree.c
index d2a63bea4346fb76d38ba43508ee6e60599e41a9..d26d3e7c8b1a407e2cf40ce20750495f500d5170 100644
(file)
--- a/
t/helper/test-scrap-cache-tree.c
+++ b/
t/helper/test-scrap-cache-tree.c
@@
-1,3
+1,4
@@
+#include "test-tool.h"
#include "cache.h"
#include "lockfile.h"
#include "tree.h"
#include "cache.h"
#include "lockfile.h"
#include "tree.h"
@@
-5,7
+6,7
@@
static struct lock_file index_lock;
static struct lock_file index_lock;
-int cmd_
main
(int ac, const char **av)
+int cmd_
_scrap_cache_tree
(int ac, const char **av)
{
setup_git_directory();
hold_locked_index(&index_lock, LOCK_DIE_ON_ERROR);
{
setup_git_directory();
hold_locked_index(&index_lock, LOCK_DIE_ON_ERROR);
diff --git
a/t/helper/test-tool.c
b/t/helper/test-tool.c
index 54bdee04b9b0804a8d6c248147d6e6967edf7693..f0284cc7cf5fb25cd173c9c888b35d4f18b8a32d 100644
(file)
--- a/
t/helper/test-tool.c
+++ b/
t/helper/test-tool.c
@@
-31,6
+31,7
@@
static struct test_cmd cmds[] = {
{ "regex", cmd__regex },
{ "revision-walking", cmd__revision_walking },
{ "run-command", cmd__run_command },
{ "regex", cmd__regex },
{ "revision-walking", cmd__revision_walking },
{ "run-command", cmd__run_command },
+ { "scrap-cache-tree", cmd__scrap_cache_tree },
{ "sha1", cmd__sha1 },
};
{ "sha1", cmd__sha1 },
};
diff --git
a/t/helper/test-tool.h
b/t/helper/test-tool.h
index 0fe2dd640b497a8440351765cb9a8a8fff24bcdf..448119a44a17d80d27ab25eb0e2b2749589425ca 100644
(file)
--- a/
t/helper/test-tool.h
+++ b/
t/helper/test-tool.h
@@
-25,6
+25,7
@@
int cmd__ref_store(int argc, const char **argv);
int cmd__regex(int argc, const char **argv);
int cmd__revision_walking(int argc, const char **argv);
int cmd__run_command(int argc, const char **argv);
int cmd__regex(int argc, const char **argv);
int cmd__revision_walking(int argc, const char **argv);
int cmd__run_command(int argc, const char **argv);
+int cmd__scrap_cache_tree(int argc, const char **argv);
int cmd__sha1(int argc, const char **argv);
#endif
int cmd__sha1(int argc, const char **argv);
#endif
diff --git
a/t/t0090-cache-tree.sh
b/t/t0090-cache-tree.sh
index 3266209e4136b6dad0a68abd73e336b8aaecd53b..4ae0995cd9140d3030da7d975c74ff3d9e55b039 100755
(executable)
--- a/
t/t0090-cache-tree.sh
+++ b/
t/t0090-cache-tree.sh
@@
-115,14
+115,14
@@
test_expect_success 'update-index invalidates cache-tree' '
'
test_expect_success 'write-tree establishes cache-tree' '
'
test_expect_success 'write-tree establishes cache-tree' '
- test-scrap-cache-tree &&
+ test-
tool
scrap-cache-tree &&
git write-tree &&
test_cache_tree
'
git write-tree &&
test_cache_tree
'
-test_expect_success 'test-scrap-cache-tree works' '
+test_expect_success 'test-
tool
scrap-cache-tree works' '
git read-tree HEAD &&
git read-tree HEAD &&
- test-scrap-cache-tree &&
+ test-
tool
scrap-cache-tree &&
test_no_cache_tree
'
test_no_cache_tree
'
@@
-170,7
+170,7
@@
test_expect_success 'commit in child dir has cache-tree' '
'
test_expect_success 'reset --hard gives cache-tree' '
'
test_expect_success 'reset --hard gives cache-tree' '
- test-scrap-cache-tree &&
+ test-
tool
scrap-cache-tree &&
git reset --hard &&
test_cache_tree
'
git reset --hard &&
test_cache_tree
'