Change builtin/mailinfo.c so that it doesn't have to rely on "the_repository" anymore - hence also allowing us the remove the USE_THE_REPOSITORY_VARIABLE guard. Signed-off-by: Kousik Sanagavarapu <five231003@xxxxxxxxx> --- builtin/mailinfo.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/builtin/mailinfo.c b/builtin/mailinfo.c index 828b2b5845..9463a8780a 100644 --- a/builtin/mailinfo.c +++ b/builtin/mailinfo.c @@ -2,7 +2,6 @@ * Another stupid program, this one parsing the headers of an * email to figure out authorship and subject */ -#define USE_THE_REPOSITORY_VARIABLE #include "builtin.h" #include "abspath.h" #include "environment.h" @@ -52,7 +51,7 @@ static int parse_opt_quoted_cr(const struct option *opt, const char *arg, int un int cmd_mailinfo(int argc, const char **argv, const char *prefix, - struct repository *repo UNUSED) + struct repository *repo) { struct metainfo_charset meta_charset; struct mailinfo mi; @@ -93,8 +92,7 @@ int cmd_mailinfo(int argc, switch (meta_charset.policy) { case CHARSET_DEFAULT: - mi.metainfo_charset = - repo_get_commit_output_encoding(the_repository); + mi.metainfo_charset = repo_get_commit_output_encoding(repo); break; case CHARSET_NO_REENCODE: mi.metainfo_charset = NULL; -- 2.47.0.73.g7a80afd5fd.dirty