]> git.ipfire.org Git - thirdparty/git.git/commit - t/t1506-rev-parse-diagnosis.sh
specifying ranges: we did not mean to make ".." an empty set
authorJunio C Hamano <gitster@pobox.com>
Mon, 2 May 2011 20:39:16 +0000 (13:39 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 23 Aug 2012 21:37:49 +0000 (14:37 -0700)
commit003c84f6d2b9e9c4d5bbf5262cae994bac7190cb
tree90c8c22f9d376aa92f46d42f7f4b9d74017ce9b9
parentc142616fb2152d7887f9c38ff20e07167d31b0c8
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>
Documentation/revisions.txt
builtin/rev-parse.c
revision.c
t/t1506-rev-parse-diagnosis.sh
t/t4202-log.sh