Re: RFC: what should git rev-parse --flags HEAD do?
On Sun, Sep 26, 2010 at 3:54 AM, Junio C Hamano <gitster@pobox.com> wrote:
>
> Perhaps you are missing --no-revs.
> ...
Show 5 quoted lines
> "--flags" is an afterthought that filters out non-flags in other parts; I
> do not think it applied to the "rev" part (i.e. giving --no-revs at the
> same time would be a valid workaround if you know you do not want HEAD or
> any revision traversal argument) in any released version of git.
>
i am aware that --no-revs exists and can be used with --flags to ensure that only flag arguments are displayed.
The issue is that the documentation currently implies that --flags alone is sufficient to suppress anything that is not a flag when this is not, in fact, the case. To wit:
--flags::
Do not output any non-flag parameters.This is simply not accurate, given the current implementation.
If there is some reason --flags should not imply --no-revs, then the documentation should be updated to state:
--flags::
Do not output any non-flag parameters (unless the parameter
also specifies a revision). To output only the flag parameters,
specify --no-revs as well.jon.