summaryrefslogtreecommitdiff
path: root/remote.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2021-09-10 11:46:29 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-09-10 11:46:29 -0700
commitfd0d7036e0da248f354e91fb8be8771fb20adfac (patch)
tree2fe4ef0cec6a9724df9fa5e15860bb0867fc817c /remote.c
parentMerge branch 'mk/clone-recurse-submodules' (diff)
parentadvice: move advice.graftFileDeprecated squashing to commit.[ch] (diff)
downloadtgif-fd0d7036e0da248f354e91fb8be8771fb20adfac.tar.xz
Merge branch 'ab/retire-advice-config'
Code clean up to migrate callers from older advice_config[] based API to newer advice_if_enabled() and advice_enabled() API. * ab/retire-advice-config: advice: move advice.graftFileDeprecated squashing to commit.[ch] advice: remove use of global advice_add_embedded_repo advice: remove read uses of most global `advice_` variables advice: add enum variants for missing advice variables
Diffstat (limited to 'remote.c')
-rw-r--r--remote.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/remote.c b/remote.c
index dfb863d808..4ef53a6e30 100644
--- a/remote.c
+++ b/remote.c
@@ -1111,7 +1111,7 @@ static void show_push_unqualified_ref_name_error(const char *dst_value,
"Neither worked, so we gave up. You must fully qualify the ref."),
dst_value, matched_src_name);
- if (!advice_push_unqualified_ref_name)
+ if (!advice_enabled(ADVICE_PUSH_UNQUALIFIED_REF_NAME))
return;
if (get_oid(matched_src_name, &oid))
@@ -2118,7 +2118,7 @@ int format_tracking_info(struct branch *branch, struct strbuf *sb,
strbuf_addf(sb,
_("Your branch is based on '%s', but the upstream is gone.\n"),
base);
- if (advice_status_hints)
+ if (advice_enabled(ADVICE_STATUS_HINTS))
strbuf_addstr(sb,
_(" (use \"git branch --unset-upstream\" to fixup)\n"));
} else if (!sti) {
@@ -2129,7 +2129,7 @@ int format_tracking_info(struct branch *branch, struct strbuf *sb,
strbuf_addf(sb,
_("Your branch and '%s' refer to different commits.\n"),
base);
- if (advice_status_hints)
+ if (advice_enabled(ADVICE_STATUS_HINTS))
strbuf_addf(sb, _(" (use \"%s\" for details)\n"),
"git status --ahead-behind");
} else if (!theirs) {
@@ -2138,7 +2138,7 @@ int format_tracking_info(struct branch *branch, struct strbuf *sb,
"Your branch is ahead of '%s' by %d commits.\n",
ours),
base, ours);
- if (advice_status_hints)
+ if (advice_enabled(ADVICE_STATUS_HINTS))
strbuf_addstr(sb,
_(" (use \"git push\" to publish your local commits)\n"));
} else if (!ours) {
@@ -2149,7 +2149,7 @@ int format_tracking_info(struct branch *branch, struct strbuf *sb,
"and can be fast-forwarded.\n",
theirs),
base, theirs);
- if (advice_status_hints)
+ if (advice_enabled(ADVICE_STATUS_HINTS))
strbuf_addstr(sb,
_(" (use \"git pull\" to update your local branch)\n"));
} else {
@@ -2162,7 +2162,7 @@ int format_tracking_info(struct branch *branch, struct strbuf *sb,
"respectively.\n",
ours + theirs),
base, ours, theirs);
- if (advice_status_hints)
+ if (advice_enabled(ADVICE_STATUS_HINTS))
strbuf_addstr(sb,
_(" (use \"git pull\" to merge the remote branch into yours)\n"));
}