summaryrefslogtreecommitdiff
path: root/advice.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-07-09 22:25:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-07-09 22:25:46 (GMT)
commitcde9a64ea35ceeaa5e8dd2da2662445510fe651c (patch)
tree9b4d154625ca23d792cda8f8a65419adcfba1fc7 /advice.c
parent34186225b3ca3109586fd63ee83aeea342dc668e (diff)
parent3883c55138dcfbe2d9a24e3f93a2a4b1d376dde6 (diff)
downloadgit-cde9a64ea35ceeaa5e8dd2da2662445510fe651c.zip
git-cde9a64ea35ceeaa5e8dd2da2662445510fe651c.tar.gz
git-cde9a64ea35ceeaa5e8dd2da2662445510fe651c.tar.bz2
Merge branch 'ds/fetch-disable-force-notice'
"git fetch" and "git pull" reports when a fetch results in non-fast-forward updates to let the user notice unusual situation. The commands learned "--no-shown-forced-updates" option to disable this safety feature. * ds/fetch-disable-force-notice: pull: add --[no-]show-forced-updates passthrough fetch: warn about forced updates in branch listing fetch: add --[no-]show-forced-updates argument
Diffstat (limited to 'advice.c')
-rw-r--r--advice.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/advice.c b/advice.c
index 2d330d2..67de6de 100644
--- a/advice.c
+++ b/advice.c
@@ -3,6 +3,7 @@
#include "color.h"
#include "help.h"
+int advice_fetch_show_forced_updates = 1;
int advice_push_update_rejected = 1;
int advice_push_non_ff_current = 1;
int advice_push_non_ff_matching = 1;
@@ -60,6 +61,7 @@ static struct {
const char *name;
int *preference;
} advice_config[] = {
+ { "fetchShowForcedUpdates", &advice_fetch_show_forced_updates },
{ "pushUpdateRejected", &advice_push_update_rejected },
{ "pushNonFFCurrent", &advice_push_non_ff_current },
{ "pushNonFFMatching", &advice_push_non_ff_matching },