diff options
| author | Alex Henrie <alexhenrie24@gmail.com> | 2023-07-12 22:41:13 -0600 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-07-13 09:14:58 -0700 |
| commit | b6f3da51322345a19c259b9359065aa54cda74ff (patch) | |
| tree | d469a545fe9ae41d4bf5f2a218b19801dcc541d1 /t | |
| parent | a646b86cd10282de2ceb64ef33b5412e4fb2a54c (diff) | |
| download | git-b6f3da51322345a19c259b9359065aa54cda74ff.tar.xz | |
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 't')
| -rwxr-xr-x | t/t7508-status.sh | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/t/t7508-status.sh b/t/t7508-status.sh index 36567708f5..845af287d7 100755 --- a/t/t7508-status.sh +++ b/t/t7508-status.sh @@ -847,7 +847,6 @@ test_expect_success 'dry-run of partial commit excluding new file in index' ' On branch main Your branch and '\''upstream'\'' have diverged, and have 1 and 2 different commits each, respectively. - (use "git pull" to merge the remote branch into yours) Changes to be committed: (use "git restore --staged <file>..." to unstage) @@ -1013,7 +1012,7 @@ test_expect_success 'status -s submodule summary' ' ' test_expect_success 'status submodule summary (clean submodule): commit' ' - cat >expect <<EOF && + cat >expect-status <<EOF && On branch main Your branch and '\''upstream'\'' have diverged, and have 2 and 2 different commits each, respectively. @@ -1033,12 +1032,13 @@ Untracked files: no changes added to commit (use "git add" and/or "git commit -a") EOF + sed "/git pull/d" expect-status > expect-commit && git commit -m "commit submodule" && git config status.submodulesummary 10 && test_must_fail git commit --dry-run >output && - test_cmp expect output && + test_cmp expect-commit output && git status >output && - test_cmp expect output + test_cmp expect-status output ' cat >expect <<EOF @@ -1065,7 +1065,6 @@ test_expect_success 'commit --dry-run submodule summary (--amend)' ' On branch main Your branch and '\''upstream'\'' have diverged, and have 2 and 2 different commits each, respectively. - (use "git pull" to merge the remote branch into yours) Changes to be committed: (use "git restore --source=HEAD^1 --staged <file>..." to unstage) @@ -1558,7 +1557,6 @@ test_expect_success 'git commit --dry-run will show a staged but ignored submodu On branch main Your branch and '\''upstream'\'' have diverged, and have 2 and 2 different commits each, respectively. - (use "git pull" to merge the remote branch into yours) Changes to be committed: (use "git restore --staged <file>..." to unstage) |
