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

[PATCH v2] Re: add documentation for mailinfo.scissors and '--no-scissors'

From
NSNicolas Sebrecht <nicolas.s.dev@gmx.fr>
Date
Sep 12, 2009, 03:03 UTC
Message-ID
<20090912030351.GC18684@vidovic>
In-Reply-To
<7v8wglw60x.fsf@alter.siamese.dyndns.org>
[ Thank you (again) for this very good explanation. ]
The 11/09/09, Junio C Hamano wrote:
Show 12 quoted lines
> Nicolas Sebrecht <nicolas.s.dev@gmx.fr> writes:
> 
> > Ok. So, the fact that the usage of git-am doesn't tell about
> > --no-scissors is the expected behaviour?
> 
> You _could_ argue that we _could_ describe a long option "frotz" that
> lacks the '!' flag in OPTIONS_SPEC as "--[no-]frotz" in the output by
> changing the rev-parse --parseopt, if you really want to.
> 
> However, I think that is not done deliberately to avoid cluttering the
> output.  I Cc'ed the primary guilty party ;-) of the parse-options
> infrastructure.

Well, if it is expected to not have the "--[no-]frotz" in usage where applicable I'll be fine with that (even if it may sounds a bit odd for a sane user). Otherwise, I believe it could be a (small) improvement for the UI.

Show 15 quoted lines
> Currently, non-bool options are not marked with '!'.  Nobody sane would
> say "git am --no-directory foo", but "rev-parse --parseopt" acccepts such
> a nonsense input, and it is up to the calling script to catch it and barf.
> But "rev-parse --parseopt" will start saying "--[no-]directory=" with such
> a change, which is not good.
> 
> And --no-scissors is not that special.  We could add --no-signoff to say
> "I do not want to sign-off this one time" explicitly, and it is crazy if
> we had to add another line in OPTIONS_SPEC when we want to do so, when it
> is clear "signoff" option is a boolean.
> 
> As a long term direction, I'd rather not to see "no-" in OPTIONS_SPEC, but
> have that taken care of by "rev-parse --parseopt" to keep our sanity.  The
> only existing offender is "no-verify" in "rebase -i".  Let's solve it (if
> there is anything to solve, which I doubt) without adding new ones.

Now (with all this background in mind), I agree that the "no-" in OPTIONS_SPEC looks ugly.

<If there were something to change>

As you say, we can't blindly rely on the "is a boolean" and "option name begin with 'no-'" things altogether. Perhaps a new magic character ('-'?) beside the current flags of PARSEOPT could smartly do the trick?

</>
Pierre, opinion?
-- 
Nicolas Sebrecht
Previous: Junio C HamanoNext: Nicolas Sebrecht
Message 20 of 24 in “What's cooking in git.git (Sep 2009, #02; Mon, 07)”
  1. Junio C HamanoSep 8, 2009
  2. Nanako ShiraishiSep 8, 2009
  3. Junio C HamanoSep 8, 2009
  4. Jakub NarebskiSep 8, 2009
  5. Sverre RabbelierSep 8, 2009
  6. jk/1.7.0-status, was: What's cooking in git.git (Sep 2009, #02; Mon, 07)Jeff King, Sep 9, 2009
  7. Daniel BarkalowSep 10, 2009
  8. Johannes SchindelinSep 10, 2009
  9. Daniel BarkalowSep 10, 2009
  10. Junio C HamanoSep 10, 2009
  11. scissors definition and documentationNicolas Sebrecht, Sep 11, 2009
  12. 1/2 mailinfo: add '--scissors' to usage messageNicolas Sebrecht, Sep 11, 2009
  13. 2/2 add documentation for mailinfo.scissors and '--no-scissors'Nicolas Sebrecht, Sep 11, 2009
  14. add documentation for mailinfo.scissors and '--no-scissors'Nicolas Sebrecht, Sep 11, 2009
  15. Junio C HamanoSep 11, 2009
  16. Re: add documentation for mailinfo.scissors and '--no-scissors'Nicolas Sebrecht, Sep 11, 2009
  17. Junio C HamanoSep 11, 2009
  18. Re: add documentation for mailinfo.scissors and '--no-scissors'Nicolas Sebrecht, Sep 11, 2009
  19. Junio C HamanoSep 11, 2009
  20. Re: add documentation for mailinfo.scissors and '--no-scissors'Nicolas Sebrecht, Sep 12, 2009
  21. 2/2 add documentation for mailinfo.scissors and '--no-scissors'Nicolas Sebrecht, Sep 11, 2009
  22. Junio C HamanoSep 12, 2009
  23. Junio C HamanoSep 12, 2009
  24. Sverre RabbelierSep 12, 2009

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.