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:
authorJunio C Hamano <gitster@pobox.com>2023-07-25 22:05:23 +0300
committerJunio C Hamano <gitster@pobox.com>2023-07-25 22:05:23 +0300
commit88d08c342af961c5fb57d7ea5f51233770f06639 (patch)
treedcc44c2f7942f3ab7e16126d986c9d6c799eaaf4 /remote.c
parente43f4fd0bd864e0472dd4285190d411f4342e8d8 (diff)
parentc577d65158aa78817a59a58649bb381f2daaa88d (diff)
Merge branch 'ah/advise-force-pushing'
Help newbies by suggesting that there are cases where force-pushing is a valid and sensible thing to update a branch at a remote repository, rather than reconciling with merge/rebase. * ah/advise-force-pushing: push: don't imply that integration is always required before pushing remote: don't imply that integration is always required before pushing wt-status: don't show divergence advice when committing
Diffstat (limited to 'remote.c')
-rw-r--r--remote.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/remote.c b/remote.c
index 55e7d22a00..abb24822be 100644
--- a/remote.c
+++ b/remote.c
@@ -2259,7 +2259,8 @@ int stat_tracking_info(struct branch *branch, int *num_ours, int *num_theirs,
* Return true when there is anything to report, otherwise false.
*/
int format_tracking_info(struct branch *branch, struct strbuf *sb,
- enum ahead_behind_flags abf)
+ enum ahead_behind_flags abf,
+ int show_divergence_advice)
{
int ours, theirs, sti;
const char *full_base;
@@ -2322,9 +2323,10 @@ int format_tracking_info(struct branch *branch, struct strbuf *sb,
"respectively.\n",
ours + theirs),
base, ours, theirs);
- if (advice_enabled(ADVICE_STATUS_HINTS))
+ if (show_divergence_advice &&
+ advice_enabled(ADVICE_STATUS_HINTS))
strbuf_addstr(sb,
- _(" (use \"git pull\" to merge the remote branch into yours)\n"));
+ _(" (use \"git pull\" if you want to integrate the remote branch with yours)\n"));
}
free(base);
return 1;