Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2021-08-23 13:44:02 +0300
committerJunio C Hamano <gitster@pobox.com>2021-08-25 22:07:52 +0300
commitab628588f80e8dd889b700515c41548c1a356dcc (patch)
tree5d0808dccd5db4848038b992cdb5667f7074e098 /advice.c
parentc2a4b6d4ee4f7f52521c1c36d63744f1a3c08d50 (diff)
advice: move advice.graftFileDeprecated squashing to commit.[ch]
Move the squashing of the advice.graftFileDeprecated advice over to an external variable in commit.[ch], allowing advice() to purely use the new-style API of invoking advice() with an enum. See 8821e90a09a (advice: don't pointlessly suggest --convert-graft-file, 2018-11-27) for why quieting this advice was needed. It's more straightforward to move this code to commit.[ch] and use it builtin/replace.c, than to go through the indirection of advice.[ch]. Because this was the last advice_config variable we can remove that old facility from advice.c. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'advice.c')
-rw-r--r--advice.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/advice.c b/advice.c
index 41cfea82d0..e716ddebff 100644
--- a/advice.c
+++ b/advice.c
@@ -4,8 +4,6 @@
#include "help.h"
#include "string-list.h"
-int advice_graft_file_deprecated = 1;
-
static int advice_use_color = -1;
static char advice_colors[][COLOR_MAXLEN] = {
GIT_COLOR_RESET,
@@ -34,13 +32,6 @@ static const char *advise_get_color(enum color_advice ix)
}
static struct {
- const char *name;
- int *preference;
-} advice_config[] = {
- { "graftFileDeprecated", &advice_graft_file_deprecated },
-};
-
-static struct {
const char *key;
int enabled;
} advice_setting[] = {
@@ -162,13 +153,6 @@ int git_default_advice_config(const char *var, const char *value)
if (!skip_prefix(var, "advice.", &k))
return 0;
- for (i = 0; i < ARRAY_SIZE(advice_config); i++) {
- if (strcasecmp(k, advice_config[i].name))
- continue;
- *advice_config[i].preference = git_config_bool(var, value);
- break;
- }
-
for (i = 0; i < ARRAY_SIZE(advice_setting); i++) {
if (strcasecmp(k, advice_setting[i].key))
continue;