Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Couder <christian.couder@gmail.com>2019-06-29 10:57:46 +0300
committerJunio C Hamano <gitster@pobox.com>2019-07-01 20:26:28 +0300
commit84f559f7507c349edc6d4888b515340ecbd667e1 (patch)
treebdd2df008289251055de00f932f07f7e4c469b91 /t/helper/test-oidmap.c
parenta1100d2ceed75a9523981bfab607dedd2564ef8c (diff)
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>
Diffstat (limited to 't/helper/test-oidmap.c')
-rw-r--r--t/helper/test-oidmap.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/t/helper/test-oidmap.c b/t/helper/test-oidmap.c
index 7036588175..0acf99931e 100644
--- a/t/helper/test-oidmap.c
+++ b/t/helper/test-oidmap.c
@@ -47,21 +47,7 @@ int cmd__oidmap(int argc, const char **argv)
if (p1)
p2 = strtok(NULL, DELIM);
- if (!strcmp("add", cmd) && p1 && p2) {
-
- if (get_oid(p1, &oid)) {
- printf("Unknown oid: %s\n", p1);
- continue;
- }
-
- /* create entry with oidkey from p1, value = p2 */
- FLEX_ALLOC_STR(entry, name, p2);
- oidcpy(&entry->entry.oid, &oid);
-
- /* add to oidmap */
- oidmap_put(&map, entry);
-
- } else if (!strcmp("put", cmd) && p1 && p2) {
+ if (!strcmp("put", cmd) && p1 && p2) {
if (get_oid(p1, &oid)) {
printf("Unknown oid: %s\n", p1);