summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-07-08 20:15:04 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-07-08 20:15:04 (GMT)
commite867110340c236d2ba977d2c4bf1274a297f4e21 (patch)
tree9fbb0b5d2dd64c2753d1232ff23fe776c862703f /t
parent11819cb74123efd1102a4c7f482ce8620a9bd674 (diff)
parent338abb0f045b87df5e628543800e74dec0e72cdf (diff)
downloadgit-e867110340c236d2ba977d2c4bf1274a297f4e21.zip
git-e867110340c236d2ba977d2c4bf1274a297f4e21.tar.gz
git-e867110340c236d2ba977d2c4bf1274a297f4e21.tar.bz2
Merge branch 'ab/cmd-foo-should-return'
Code clean-up. * ab/cmd-foo-should-return: builtins + test helpers: use return instead of exit() in cmd_*
Diffstat (limited to 't')
-rw-r--r--t/helper/test-hash-speed.c2
-rw-r--r--t/helper/test-hash.c2
-rw-r--r--t/helper/test-match-trees.c2
-rw-r--r--t/helper/test-reach.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/t/helper/test-hash-speed.c b/t/helper/test-hash-speed.c
index 432233c..f40d9ad 100644
--- a/t/helper/test-hash-speed.c
+++ b/t/helper/test-hash-speed.c
@@ -57,5 +57,5 @@ int cmd__hash_speed(int ac, const char **av)
free(p);
}
- exit(0);
+ return 0;
}
diff --git a/t/helper/test-hash.c b/t/helper/test-hash.c
index 0a31de6..261c545 100644
--- a/t/helper/test-hash.c
+++ b/t/helper/test-hash.c
@@ -54,5 +54,5 @@ int cmd_hash_impl(int ac, const char **av, int algo)
fwrite(hash, 1, algop->rawsz, stdout);
else
puts(hash_to_hex_algop(hash, algop));
- exit(0);
+ return 0;
}
diff --git a/t/helper/test-match-trees.c b/t/helper/test-match-trees.c
index b9fd427..4079fde 100644
--- a/t/helper/test-match-trees.c
+++ b/t/helper/test-match-trees.c
@@ -23,5 +23,5 @@ int cmd__match_trees(int ac, const char **av)
shift_tree(the_repository, &one->object.oid, &two->object.oid, &shifted, -1);
printf("shifted: %s\n", oid_to_hex(&shifted));
- exit(0);
+ return 0;
}
diff --git a/t/helper/test-reach.c b/t/helper/test-reach.c
index cda804e..2f65c7f 100644
--- a/t/helper/test-reach.c
+++ b/t/helper/test-reach.c
@@ -166,5 +166,5 @@ int cmd__reach(int ac, const char **av)
print_sorted_commit_ids(list);
}
- exit(0);
+ return 0;
}