Skip to content

Commit 84f559f

Browse files
chriscoolgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Christian Couder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a1100d2 commit 84f559f

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

t/helper/test-oidmap.c

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,7 @@ int cmd__oidmap(int argc, const char **argv)
4747
if (p1)
4848
p2 = strtok(NULL, DELIM);
4949

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) {
6551

6652
if (get_oid(p1, &oid)) {
6753
printf("Unknown oid: %s\n", p1);

0 commit comments

Comments
 (0)