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

Re: [PATCH] rev-parse doc: clarify use of optional / required arguments

From
Nicolas Vigier <boklm@mars-attacks.org>
Date
Oct 15, 2013, 10:49 UTC
Message-ID
<20131015104945.GW4589@mars-attacks.org>
In-Reply-To
<20131014235742.GF865149@vauxhall.crustytoothpaste.net>
On Mon, 14 Oct 2013, brian m. carlson wrote:
Show 11 quoted lines
> On Mon, Oct 14, 2013 at 05:25:29PM +0200, Nicolas Vigier wrote:
> > The reason that I looked at this documentation in the first place was
> > that I was looking at adding an option '-S[<keyid>], --gpg-sign[=<keyid>]'
> > to git-rebase, similar to the option in git-commit, so that rebased
> > commits can be signed. In git-commit this option takes an optional argument,
> > so I think it would make sense to make it optional in git-rebase too.
> 
> It's funny you say that, because I literally started on that yesterday.
> I have cherry-pick and revert working, but I haven't gotten to anything
> else yet.  Feel free to work on it if you're interested, as I probably
> won't get around to finishing it for some time.

I have a patch for git-am working, but with a small problem : it has to assume that the optional argument to -S does not start with a dash. This is because git-rev-parse --parseopt does not allow us to see the difference between -S-q and -S -q, we don't know if -q is the next option or the argument to -S.

Maybe that's the reason why the use of optional argument options with git rev-parse --parseopt is discouraged ?

I'm going to send a patch proposal so that rev-parse --parseopt gives an empty argument for an unset optional argument.

Previous: brian m. carlson
Message 5 of 5 in “rev-parse doc: clarify use of optional / required arguments”
  1. rev-parse doc: clarify use of optional / required argumentsNicolas Vigier, Oct 14, 2013
  2. Jonathan NiederOct 14, 2013
  3. Nicolas VigierOct 14, 2013
  4. brian m. carlsonOct 14, 2013
  5. Nicolas VigierOct 15, 2013

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.