git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: RFC: what should git rev-parse --flags HEAD do?

From
Jon Seymour <jon.seymour@gmail.com>
Date
Sep 25, 2010, 19:46 UTC
Message-ID
<AANLkTim65zQp5Et2YQqk2ZZTuW-Dr0fJph+-8YZ0fDzw@mail.gmail.com>
In-Reply-To
<7vfwwxogiv.fsf@alter.siamese.dyndns.org>
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.
Previous: Jon Seymour
Message 4 of 4 in “RFC: what should git rev-parse --flags HEAD do?”
  1. Jon SeymourSep 25, 2010
  2. Junio C HamanoSep 25, 2010
  3. Jon SeymourSep 25, 2010
  4. Jon SeymourSep 25, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.