summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-10-16 07:16:05 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-10-16 07:16:05 (GMT)
commit98f3f007f520de518c732c74085234dede144926 (patch)
tree38aa575117222d8d91c60545f078b4a0cfebd87e /t
parente366d0c6d04a5c29a8ef49c61bc28209f543f69a (diff)
parent3e73cc62c0d80fedd1fc612e256b5eb3f3068de4 (diff)
downloadgit-98f3f007f520de518c732c74085234dede144926.zip
git-98f3f007f520de518c732c74085234dede144926.tar.gz
git-98f3f007f520de518c732c74085234dede144926.tar.bz2
Merge branch 'en/status-multiple-renames-to-the-same-target-fix'
The code in "git status" sometimes hit an assertion failure. This was caused by a structure that was reused without cleaning the data used for the first run, which has been corrected. * en/status-multiple-renames-to-the-same-target-fix: commit: fix erroneous BUG, 'multiple renames on the same target? how?'
Diffstat (limited to 't')
-rwxr-xr-xt/t7500-commit.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/t/t7500-commit.sh b/t/t7500-commit.sh
index 170b481..31ab608 100755
--- a/t/t7500-commit.sh
+++ b/t/t7500-commit.sh
@@ -359,4 +359,27 @@ test_expect_success 'new line found before status message in commit template' '
test_i18ncmp expected-template editor-input
'
+test_expect_success 'setup empty commit with unstaged rename and copy' '
+ test_create_repo unstaged_rename_and_copy &&
+ (
+ cd unstaged_rename_and_copy &&
+
+ echo content >orig &&
+ git add orig &&
+ test_commit orig &&
+
+ cp orig new_copy &&
+ mv orig new_rename &&
+ git add -N new_copy new_rename
+ )
+'
+
+test_expect_success 'check commit with unstaged rename and copy' '
+ (
+ cd unstaged_rename_and_copy &&
+
+ test_must_fail git -c diff.renames=copy commit
+ )
+'
+
test_done