test-oidmap: remove 'add' subcommand
The 'add' subcommand is useless as it is mostly identical to the 'put' subcommand, so let's remove it. Helped-by: Derrick Stolee <stolee@gmail.com> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Christian Couder committed
Jun 29, 2019 at 09:57 UTC
84f559f7507c349edc6d4888b515340ecbd667e1
1 file changed
+1
-15
t/helper/test-oidmap.c
+1
-15
@@ -47,21 +47,7 @@ int cmd__oidmap(int argc, const char **argv)
47
if (p1)
48
p2 = strtok(NULL, DELIM);
49
50
- if (!strcmp("add", cmd) && p1 && p2) {
51
-
52
- if (get_oid(p1, &oid)) {
53
- printf("Unknown oid: %s\n", p1);
54
- continue;
55
- }
56
-
57
- /* create entry with oidkey from p1, value = p2 */
58
- FLEX_ALLOC_STR(entry, name, p2);
59
- oidcpy(&entry->entry.oid, &oid);
60
-
61
- /* add to oidmap */
62
- oidmap_put(&map, entry);
63
-
64
- } else if (!strcmp("put", cmd) && p1 && p2) {
50
+ if (!strcmp("put", cmd) && p1 && p2) {
51
52
if (get_oid(p1, &oid)) {
53
printf("Unknown oid: %s\n", p1);