Merge branch 'jk/check-config-parsing-error-in-upload-pack'
[git] / t / helper / test-advise.c
1 #include "test-tool.h"
2 #include "cache.h"
3 #include "advice.h"
4 #include "config.h"
5
6 int cmd__advise_if_enabled(int argc, const char **argv)
7 {
8         if (argc != 2)
9                 die("usage: %s <advice>", argv[0]);
10
11         setup_git_directory();
12         git_config(git_default_config, NULL);
13
14         /*
15          * Any advice type can be used for testing, but NESTED_TAG was
16          * selected here and in t0018 where this command is being
17          * executed.
18          */
19         advise_if_enabled(ADVICE_NESTED_TAG, argv[1]);
20
21         return 0;
22 }