]> git.ipfire.org Git - thirdparty/git.git/blobdiff - commit.c
advice: move advice.graftFileDeprecated squashing to commit.[ch]
[thirdparty/git.git] / commit.c
index 143f472c0f24bfeece3209a4c8bf70be9494b557..551de4903c1f4f5d21a4e30bc012109c593054c8 100644 (file)
--- a/commit.c
+++ b/commit.c
@@ -25,6 +25,7 @@
 static struct commit_extra_header *read_commit_extra_header_lines(const char *buf, size_t len, const char **);
 
 int save_commit_buffer = 1;
+int no_graft_file_deprecated_advice;
 
 const char *commit_type = "commit";
 
@@ -190,7 +191,8 @@ static int read_graft_file(struct repository *r, const char *graft_file)
        struct strbuf buf = STRBUF_INIT;
        if (!fp)
                return -1;
-       if (advice_graft_file_deprecated)
+       if (!no_graft_file_deprecated_advice &&
+           advice_enabled(ADVICE_GRAFT_FILE_DEPRECATED))
                advise(_("Support for <GIT_DIR>/info/grafts is deprecated\n"
                         "and will be removed in a future Git version.\n"
                         "\n"