Re: [PATCH] grep: --full-tree
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 26, 2009, 00:00 UTC
- Message-ID
- <7vd436p339.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <60F92BD7-6FFF-4D9A-B2F0-0858F4E90B59@wincent.com>
Wincent Colaiuta <win@wincent.com> writes:
Show 6 quoted lines
> Oh, I wouldn't like that at all. I think it would be a very ugly UI > wart, because it would basically make Git behave differently than > every other command line tool that accepts paths. If it is to deviate > from the extremely widespread convention that paths starting with / > refer to absolute paths rooted at the root of the filesystem, then the > justification for it would need to be very strong indeed.
There are at least two flaws in that argument.
- git does not accept paths (it lets you specify patterns that match, e.g. t/ to name ptahs under t/ directory).
- "/pathspec" does follow the widespread convention that a string that begin with a "/" refer to a path rooted at the root _in the context_; the definition of root may or may not match the filesystem root.
Think of things like <a href="/$path">Top</a>. Does "/$path" mean at the root of filesystem? No.
I am not married to the "git grep -e frotz /Documentation" notation, by the way. I just didn't think of a different notation that is equally short, sweet and logical. We could do //Documentation if it makes it more distinct, but I do think it is worse than a single slash.