From 4dbdc42d9e7c3968ff7f690d00680419c9b8cb0f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 9 Apr 2024 15:34:27 +0200 Subject: Adding upstream version 1:2.43.0. Signed-off-by: Daniel Baumann --- t/helper/test-advise.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 t/helper/test-advise.c (limited to 't/helper/test-advise.c') diff --git a/t/helper/test-advise.c b/t/helper/test-advise.c new file mode 100644 index 0000000..8a3fd00 --- /dev/null +++ b/t/helper/test-advise.c @@ -0,0 +1,22 @@ +#include "test-tool.h" +#include "advice.h" +#include "config.h" +#include "setup.h" + +int cmd__advise_if_enabled(int argc, const char **argv) +{ + if (argc != 2) + die("usage: %s ", argv[0]); + + setup_git_directory(); + git_config(git_default_config, NULL); + + /* + * Any advice type can be used for testing, but NESTED_TAG was + * selected here and in t0018 where this command is being + * executed. + */ + advise_if_enabled(ADVICE_NESTED_TAG, "%s", argv[1]); + + return 0; +} -- cgit v1.2.3