Merge branch 'ls/p4-retry-thrice'
[gitweb.git] / t / t7501-commit.sh
index 4003a27e6aa117e30446bca2d91f230f144ae8a9..0b6da7ae1fd3d15f0d47783d3af50cb17d2c66df 100755 (executable)
@@ -155,6 +155,15 @@ test_expect_success 'amend --only ignores staged contents' '
        git diff --exit-code
 '
 
+test_expect_success 'allow-empty --only ignores staged contents' '
+       echo changed-again >file &&
+       git add file &&
+       git commit --allow-empty --only -m "empty" &&
+       git cat-file blob HEAD:file >file.actual &&
+       test_cmp file.expect file.actual &&
+       git diff --exit-code
+'
+
 test_expect_success 'set up editor' '
        cat >editor <<-\EOF &&
        #!/bin/sh