Merge branch 'jc/dotdot-is-parent-directory' into maint-1.7.11

"git log .." errored out saying it is both rev range and a path when
there is no disambiguating "--" is on the command line.  Update the
command line parser to interpret ".." as a path in such a case.

* jc/dotdot-is-parent-directory:
  specifying ranges: we did not mean to make ".." an empty set
This commit is contained in:
Junio C Hamano
2012-09-12 14:00:34 -07:00
5 changed files with 56 additions and 4 deletions

View File

@ -182,4 +182,18 @@ test_expect_success '<commit>:file correctly diagnosed after a pathname' '
test_cmp expect actual
'
test_expect_success 'dotdot is not an empty set' '
( H=$(git rev-parse HEAD) && echo $H && echo ^$H ) >expect &&
git rev-parse HEAD.. >actual &&
test_cmp expect actual &&
git rev-parse ..HEAD >actual &&
test_cmp expect actual &&
echo .. >expect &&
git rev-parse .. >actual &&
test_cmp expect actual
'
test_done

View File

@ -806,4 +806,11 @@ test_expect_success 'log --graph with diff and stats' '
test_cmp expect actual.sanitized
'
test_expect_success 'dotdot is a parent directory' '
mkdir -p a/b &&
( echo sixth && echo fifth ) >expect &&
( cd a/b && git log --format=%s .. ) >actual &&
test_cmp expect actual
'
test_done