aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-10-30 12:10:29 -0700
committerJunio C Hamano <gitster@pobox.com>2013-10-30 12:10:33 -0700
commit4cebbe6f55269be0ce2fbc94457512a71c9c5262 (patch)
tree526efb294ec96e12f366e2c0f8367d713f643b43 /t
parent414b7033b16f23b724ea81d71c4b74ef42edad17 (diff)
parentc8556c6213cf6dca63f29f98ad9d074f6c5f8233 (diff)
downloadgit-4cebbe6f55269be0ce2fbc94457512a71c9c5262.tar.gz
git-4cebbe6f55269be0ce2fbc94457512a71c9c5262.tar.xz
Merge branch 'nd/magic-pathspec'
All callers to parse_pathspec() must choose between getting no pathspec or one path that is limited to the current directory when there is no paths given on the command line, but there were two callers that violated this rule, triggering a BUG(). * nd/magic-pathspec: Fix calling parse_pathspec with no paths nor PATHSPEC_PREFER_* flags
Diffstat (limited to 't')
-rwxr-xr-xt/t4208-log-magic-pathspec.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t4208-log-magic-pathspec.sh b/t/t4208-log-magic-pathspec.sh
index 72300b5f2..d8f23f488 100755
--- a/t/t4208-log-magic-pathspec.sh
+++ b/t/t4208-log-magic-pathspec.sh
@@ -46,4 +46,19 @@ test_expect_success 'git log HEAD -- :/' '
test_cmp expected actual
'
+test_expect_success 'command line pathspec parsing for "git log"' '
+ git reset --hard &&
+ >a &&
+ git add a &&
+ git commit -m "add an empty a" --allow-empty &&
+ echo 1 >a &&
+ git commit -a -m "update a to 1" &&
+ git checkout HEAD^ &&
+ echo 2 >a &&
+ git commit -a -m "update a to 2" &&
+ test_must_fail git merge master &&
+ git add a &&
+ git log --merge -- a
+'
+
test_done