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:
authorAlex Henrie <alexhenrie24@gmail.com>2023-07-13 07:41:13 +0300
committerJunio C Hamano <gitster@pobox.com>2023-07-13 19:14:58 +0300
commitb6f3da51322345a19c259b9359065aa54cda74ff (patch)
treed469a545fe9ae41d4bf5f2a218b19801dcc541d1 /builtin/checkout.c
parenta646b86cd10282de2ceb64ef33b5412e4fb2a54c (diff)
wt-status: don't show divergence advice when committing
When the user is in the middle of making a commit, they are not yet at the point where they are ready to think about integrating their local branch with the corresponding remote branch or force-pushing over the remote branch. Don't include advice on how to deal with divergent branches in the commit template, to avoid giving the impression that the divergence needs to be dealt with immediately. Similar advice will be printed when it is most relevant, that is, if the user does try to push without first reconciling the two branches. Signed-off-by: Alex Henrie <alexhenrie24@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/checkout.c')
-rw-r--r--builtin/checkout.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c
index fd6ee8c272..c278c2169d 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -916,7 +916,7 @@ static void report_tracking(struct branch_info *new_branch_info)
struct strbuf sb = STRBUF_INIT;
struct branch *branch = branch_get(new_branch_info->name);
- if (!format_tracking_info(branch, &sb, AHEAD_BEHIND_FULL))
+ if (!format_tracking_info(branch, &sb, AHEAD_BEHIND_FULL, 1))
return;
fputs(sb.buf, stdout);
strbuf_release(&sb);