git-branch: display sha1 on branch deletion
[gitweb.git] / t / t3501-revert-cherry-pick.sh
index 2dbe04fb20aea9a18e6fe751539bcb48e5e7b4d3..6da212825a447866364979c2fb10778b6bbc02d5 100755 (executable)
@@ -59,4 +59,13 @@ test_expect_success 'revert after renaming branch' '
 
 '
 
+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 &&
+       grep "Dirty index" errors
+
+'
+
 test_done