summaryrefslogtreecommitdiff
path: root/t/t3501-revert-cherry-pick.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t3501-revert-cherry-pick.sh')
-rwxr-xr-xt/t3501-revert-cherry-pick.sh14
1 files changed, 13 insertions, 1 deletions
diff --git a/t/t3501-revert-cherry-pick.sh b/t/t3501-revert-cherry-pick.sh
index 51f3bbb..4f2a263 100755
--- a/t/t3501-revert-cherry-pick.sh
+++ b/t/t3501-revert-cherry-pick.sh
@@ -96,7 +96,7 @@ test_expect_success 'revert forbidden on dirty working tree' '
echo content >extra_file &&
git add extra_file &&
test_must_fail git revert HEAD 2>errors &&
- test_i18ngrep "Your local changes would be overwritten by " errors
+ test_i18ngrep "your local changes would be overwritten by " errors
'
@@ -141,4 +141,16 @@ test_expect_success 'cherry-pick "-" works with arguments' '
test_cmp expect actual
'
+test_expect_success 'cherry-pick works with dirty renamed file' '
+ test_commit to-rename &&
+ git checkout -b unrelated &&
+ test_commit unrelated &&
+ git checkout @{-1} &&
+ git mv to-rename.t renamed &&
+ test_tick &&
+ git commit -m renamed &&
+ echo modified >renamed &&
+ git cherry-pick refs/heads/unrelated
+'
+
test_done