summaryrefslogtreecommitdiff
path: root/test-match-trees.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2016-04-13 13:22:42 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-04-15 17:12:19 (GMT)
commite6e7530d10b74d763b4311ea93e0a831b810d6c2 (patch)
tree7ac83d3fecd39d6076f24eaddd6719a24c3b6ce8 /test-match-trees.c
parent7897d84b8240720352e23030c35db461581b68e3 (diff)
downloadgit-e6e7530d10b74d763b4311ea93e0a831b810d6c2.zip
git-e6e7530d10b74d763b4311ea93e0a831b810d6c2.tar.gz
git-e6e7530d10b74d763b4311ea93e0a831b810d6c2.tar.bz2
test helpers: move test-* to t/helper/ subdirectory
This keeps top dir a bit less crowded. And because these programs are for testing purposes, it makes sense that they stay somewhere in t/ Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'test-match-trees.c')
-rw-r--r--test-match-trees.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/test-match-trees.c b/test-match-trees.c
deleted file mode 100644
index 4dad709..0000000
--- a/test-match-trees.c
+++ /dev/null
@@ -1,26 +0,0 @@
-#include "cache.h"
-#include "tree.h"
-
-int main(int ac, char **av)
-{
- unsigned char hash1[20], hash2[20], shifted[20];
- struct tree *one, *two;
-
- setup_git_directory();
-
- if (get_sha1(av[1], hash1))
- die("cannot parse %s as an object name", av[1]);
- if (get_sha1(av[2], hash2))
- die("cannot parse %s as an object name", av[2]);
- one = parse_tree_indirect(hash1);
- if (!one)
- die("not a tree-ish %s", av[1]);
- two = parse_tree_indirect(hash2);
- if (!two)
- die("not a tree-ish %s", av[2]);
-
- shift_tree(one->object.oid.hash, two->object.oid.hash, shifted, -1);
- printf("shifted: %s\n", sha1_to_hex(shifted));
-
- exit(0);
-}