aboutsummaryrefslogtreecommitdiff
path: root/t/t7501-commit.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-07-13 15:38:05 -0700
committerJunio C Hamano <gitster@pobox.com>2012-07-13 15:38:05 -0700
commitd7afe648dcb188557173c239a337e123ec22cd1b (patch)
tree6d1f41061305022480105fe3169c51803e4511bb /t/t7501-commit.sh
parent4495f88cd84abd5e6fb5f601c451ca87ddb98929 (diff)
parent4682d8521c3ce9d722bd214fd7d5fc92063fdacb (diff)
downloadgit-d7afe648dcb188557173c239a337e123ec22cd1b.tar.gz
git-d7afe648dcb188557173c239a337e123ec22cd1b.tar.xz
Merge branch 'jc/refactor-diff-stdin'
Due to the way "git diff --no-index" is bolted onto by touching the low level code that is shared with the rest of the "git diff" code, even though it has to work in a very different way, any comparison that involves a file "-" at the root level incorrectly tried to read from the standard input. This cleans up the no-index codepath further to remove code that reads from the standard input from the core side, which is never necessary when git is running its usual diff operation. * jc/refactor-diff-stdin: diff-index.c: "git diff" has no need to read blob from the standard input diff-index.c: unify handling of command line paths diff-index.c: do not pretend paths are pathspecs
Diffstat (limited to 't/t7501-commit.sh')
-rwxr-xr-xt/t7501-commit.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh
index b20ca0eac..676da85b5 100755
--- a/t/t7501-commit.sh
+++ b/t/t7501-commit.sh
@@ -487,4 +487,16 @@ test_expect_success 'amend can copy notes' '
'
+test_expect_success 'commit a file whose name is a dash' '
+ git reset --hard &&
+ for i in 1 2 3 4 5
+ do
+ echo $i
+ done >./- &&
+ git add ./- &&
+ test_tick &&
+ git commit -m "add dash" >output </dev/null &&
+ test_i18ngrep " changed, 5 insertions" output
+'
+
test_done