Jeff King <[email protected]> writes:
> Yeah. That's a good reason not to use ":/" without a disambiguating "--"
> (which _does_ work, even without my series, because check_filename()
> does specific path-matching). At best, you pay for a complete useless
> history traversal before the command actually starts running. But much
> more likely is that Git just complains of ambiguity, because people tend
> to mention top-level paths in their commit messages. E.g.:
>
> $ cd t
> $ git grep foo :/Documentation
> fatal: ambiguous argument ':/Documentation': both revision and filename
>
> So it really is a pretty horrible syntax.
It does not allow it to be further annotated like "HEAD^{/^Merge
branch 'foo'}^2". Yes, I agree that ":/string" was a pretty poor
design that was done without thinking things through.
But back then in 2007, it is a bit unfair to blame the initial
design for not thinking things through. There weren't as many
precedents, good or bad, to learn from than we have today ;-)