Re: [PATCH] specifying ranges: we did not mean to make ".." an empty set
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:54:33
Thomas Rast [off-list ref] writes:
I don't think that ".." is really a no-op. It is true that HEAD..HEAD does not itself result in any revisions, but it *could* be used as a silly shorthand to introduce ^HEAD into the objects being walked. This can make a difference if it then excludes other objects, too. I would argue that such use is misguided, and I am in favor of the patch, but in theory it is possible.
You could say "log --all .. --" when you mean "log --all ^HEAD",
because .. === HEAD..HEAD === ^HEAD HEAD and HEAD is already
contained in --all. So it is a valid point.
You however cannot say "log --all .." without double-dash to
disambiguate, as you would get:
$ git log --all ..
fatal: ambiguous argument '..': both revision and filename
Any existing practice that used to produce useful results couldn't
have been using ".." without an explicit "--", I think, and with the
disambiguation that favors to take ".." as the parent directory,
"log --all .. --" still means "log --all ^HEAD".
So I think we are still OK.