diff options
author | Alex Henrie <alexhenrie24@gmail.com> | 2023-07-13 06:41:13 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-07-13 18:14:58 +0200 |
commit | b6f3da51322345a19c259b9359065aa54cda74ff (patch) | |
tree | d469a545fe9ae41d4bf5f2a218b19801dcc541d1 /wt-status.c | |
parent | The seventh batch (diff) | |
download | git-b6f3da51322345a19c259b9359065aa54cda74ff.tar.xz git-b6f3da51322345a19c259b9359065aa54cda74ff.zip |
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 'wt-status.c')
-rw-r--r-- | wt-status.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/wt-status.c b/wt-status.c index bcd0ef8044..e3e3732ea2 100644 --- a/wt-status.c +++ b/wt-status.c @@ -1186,7 +1186,8 @@ static void wt_longstatus_print_tracking(struct wt_status *s) t_begin = getnanotime(); - if (!format_tracking_info(branch, &sb, s->ahead_behind_flags)) + if (!format_tracking_info(branch, &sb, s->ahead_behind_flags, + !s->commit_template)) return; if (advice_enabled(ADVICE_STATUS_AHEAD_BEHIND_WARNING) && |