aboutsummaryrefslogtreecommitdiff
path: root/t/t7501-commit.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t7501-commit.sh')
-rwxr-xr-xt/t7501-commit.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh
index 7940901d4..e1181f097 100755
--- a/t/t7501-commit.sh
+++ b/t/t7501-commit.sh
@@ -88,6 +88,16 @@ test_expect_success \
"amend commit" \
"EDITOR=./editor git commit --amend"
+test_expect_success 'amend --only ignores staged contents' '
+ cp file file.expect &&
+ echo changed >file &&
+ git add file &&
+ git commit --no-edit --amend --only &&
+ git cat-file blob HEAD:file >file.actual &&
+ test_cmp file.expect file.actual &&
+ git diff --exit-code
+'
+
test_expect_success \
"passing -m and -F" \
"echo 'enough with the bongos' >file && \