diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-05-03 00:39:16 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-08-24 01:37:49 +0400 |
commit | 003c84f6d2b9e9c4d5bbf5262cae994bac7190cb (patch) | |
tree | 90c8c22f9d376aa92f46d42f7f4b9d74017ce9b9 /t/t4202-log.sh | |
parent | c142616fb2152d7887f9c38ff20e07167d31b0c8 (diff) |
specifying ranges: we did not mean to make ".." an empty set
Either end of revision range operator can be omitted to default to HEAD,
as in "origin.." (what did I do since I forked) or "..origin" (what did
they do since I forked). But the current parser interprets ".." as an
empty range "HEAD..HEAD", and worse yet, because ".." does exist on the
filesystem, we get this annoying output:
$ cd Documentation/howto
$ git log .. ;# give me recent commits that touch Documentation/ area.
fatal: ambiguous argument '..': both revision and filename
Use '--' to separate filenames from revisions
Surely we could say "git log ../" or even "git log -- .." to disambiguate,
but we shouldn't have to.
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4202-log.sh')
-rwxr-xr-x | t/t4202-log.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/t/t4202-log.sh b/t/t4202-log.sh index 71be59d446..45058cc8cb 100755 --- a/t/t4202-log.sh +++ b/t/t4202-log.sh @@ -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 |