summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-10-05 21:01:52 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-10-05 21:01:52 (GMT)
commit19dd352d03adc75d0b6530975a44b7bb23c69063 (patch)
tree004d7ebcd753d22060530bbe149a15d7d5df6fc2 /t
parent8250ab0b8c814ce4491b57a52c7d6d95fa01d992 (diff)
parent842385b8a4fa56678f13cda599ee96463004e7bf (diff)
downloadgit-19dd352d03adc75d0b6530975a44b7bb23c69063.zip
git-19dd352d03adc75d0b6530975a44b7bb23c69063.tar.gz
git-19dd352d03adc75d0b6530975a44b7bb23c69063.tar.bz2
Merge branch 'jk/unused'
Code cleanup. * jk/unused: dir.c: drop unused "untracked" from treat_path_fast() sequencer: handle ignore_footer when parsing trailers test-advise: check argument count with argc instead of argv sparse-checkout: fill in some options boilerplate sequencer: drop repository argument from run_git_commit() push: drop unused repo argument to do_push() assert PARSE_OPT_NONEG in parse-options callbacks env--helper: write to opt->value in parseopt helper drop unused argc parameters convert: drop unused crlf_action from check_global_conv_flags_eol()
Diffstat (limited to 't')
-rw-r--r--t/helper/test-advise.c4
-rw-r--r--t/helper/test-submodule-nested-repo-config.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/t/helper/test-advise.c b/t/helper/test-advise.c
index 38cdc28..a7043df 100644
--- a/t/helper/test-advise.c
+++ b/t/helper/test-advise.c
@@ -5,8 +5,8 @@
int cmd__advise_if_enabled(int argc, const char **argv)
{
- if (!argv[1])
- die("usage: %s <advice>", argv[0]);
+ if (argc != 2)
+ die("usage: %s <advice>", argv[0]);
setup_git_directory();
git_config(git_default_config, NULL);
diff --git a/t/helper/test-submodule-nested-repo-config.c b/t/helper/test-submodule-nested-repo-config.c
index bc97929..c5fd452 100644
--- a/t/helper/test-submodule-nested-repo-config.c
+++ b/t/helper/test-submodule-nested-repo-config.c
@@ -1,7 +1,7 @@
#include "test-tool.h"
#include "submodule-config.h"
-static void die_usage(int argc, const char **argv, const char *msg)
+static void die_usage(const char **argv, const char *msg)
{
fprintf(stderr, "%s\n", msg);
fprintf(stderr, "Usage: %s <submodulepath> <config name>\n", argv[0]);
@@ -14,13 +14,13 @@ int cmd__submodule_nested_repo_config(int argc, const char **argv)
const struct submodule *sub;
if (argc < 3)
- die_usage(argc, argv, "Wrong number of arguments.");
+ die_usage(argv, "Wrong number of arguments.");
setup_git_directory();
sub = submodule_from_path(the_repository, &null_oid, argv[1]);
if (repo_submodule_init(&subrepo, the_repository, sub)) {
- die_usage(argc, argv, "Submodule not found.");
+ die_usage(argv, "Submodule not found.");
}
/* Read the config of _child_ submodules. */