aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-07-22 13:01:22 -0700
committerJunio C Hamano <gitster@pobox.com>2012-07-22 13:01:23 -0700
commit106ef55f3a303435519ac60a043755286f9e47f8 (patch)
treeb73df4ebbb14d4e5e3ed311748865118213e8749 /t
parent07873ca7b02a06d3f5a9db47333062aff6f18047 (diff)
parent4682d8521c3ce9d722bd214fd7d5fc92063fdacb (diff)
downloadgit-106ef55f3a303435519ac60a043755286f9e47f8.tar.gz
git-106ef55f3a303435519ac60a043755286f9e47f8.tar.xz
Merge branch 'jc/refactor-diff-stdin' into maint
"git diff", "git status" and anything that internally uses the comparison machinery was utterly broken when the difference involved a file with "-" as its name. This was due to the way "git diff --no-index" was incorrectly bolted on to the system, making any comparison that involves a file "-" at the root level incorrectly read from the standard input. * 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')
-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