mirror of
https://github.com/git/git
synced 2024-08-28 12:09:19 +00:00
![Nguyễn Thái Ngọc Duy](/assets/img/avatar_default.png)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
37 lines
680 B
Bash
Executable file
37 lines
680 B
Bash
Executable file
#!/bin/sh
|
|
|
|
test_description='magic pathspec tests using git-log'
|
|
|
|
. ./test-lib.sh
|
|
|
|
test_expect_success 'setup' '
|
|
test_commit initial &&
|
|
test_tick &&
|
|
git commit --allow-empty -m empty &&
|
|
mkdir sub
|
|
'
|
|
|
|
test_expect_success '"git log :/" should be ambiguous' '
|
|
test_must_fail git log :/ 2>error &&
|
|
grep ambiguous error
|
|
'
|
|
|
|
test_expect_success '"git log :" should be ambiguous' '
|
|
test_must_fail git log : 2>error &&
|
|
grep ambiguous error
|
|
'
|
|
|
|
test_expect_success 'git log -- :' '
|
|
git log -- :
|
|
'
|
|
|
|
test_expect_success 'git log HEAD -- :/' '
|
|
cat >expected <<-EOF &&
|
|
24b24cf initial
|
|
EOF
|
|
(cd sub && git log --oneline HEAD -- :/ >../actual) &&
|
|
test_cmp expected actual
|
|
'
|
|
|
|
test_done
|