Re: [PATCH] git-rev-parse.txt: Document ":path" specifier
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 24, 2010, 20:47 UTC
- Message-ID
- <7vvd98b1jh.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <2f6ddf1fa551acf6074140865fbc2940ab45ed83.1277384506.git.git@drmicha.warpmail.net>
Michael J Gruber <git@drmicha.warpmail.net> writes:
> The empty treeish in ":path" means "index", not "HEAD" like in probably > every other place.
I would suggest dropping the ', not "HEAD"... place.' part from the above. It is more confusing than useful to the readers.
E.g. "git diff <treeish>" compares with the named tree-ish, but "git diff" compares with the index, even though the latter obviously lacks <treeish> and does not default to HEAD.
The rule is more like "the index is used by default for missing value, but with an operation that does not make sense with the index, it defaults to the HEAD", I think.