summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2020-01-22 15:07:30 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-01-22 15:07:30 -0800
commit9403e5dcdd50661a31f7d5103c150a95ab9f0529 (patch)
tree6491823e49dc511bd079f416f0340618f80d8371 /t
parentMerge branch 'dl/credential-netrc' (diff)
parentcommit: honor advice.statusHints when rejecting an empty commit (diff)
downloadtgif-9403e5dcdd50661a31f7d5103c150a95ab9f0529.tar.xz
Merge branch 'hw/commit-advise-while-rejecting'
"git commit" gives output similar to "git status" when there is nothing to commit, but without honoring the advise.statusHints configuration variable, which has been corrected. * hw/commit-advise-while-rejecting: commit: honor advice.statusHints when rejecting an empty commit
Diffstat (limited to 't')
-rwxr-xr-xt/t7500-commit-template-squash-signoff.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t7500-commit-template-squash-signoff.sh b/t/t7500-commit-template-squash-signoff.sh
index 46a5cd4b73..6d19ece05d 100755
--- a/t/t7500-commit-template-squash-signoff.sh
+++ b/t/t7500-commit-template-squash-signoff.sh
@@ -382,4 +382,13 @@ test_expect_success 'check commit with unstaged rename and copy' '
)
'
+test_expect_success 'commit without staging files fails and displays hints' '
+ echo "initial" >file &&
+ git add file &&
+ git commit -m initial &&
+ echo "changes" >>file &&
+ test_must_fail git commit -m update >actual &&
+ test_i18ngrep "no changes added to commit (use \"git add\" and/or \"git commit -a\")" actual
+'
+
test_done