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

Parse --o in format-patch

From
Fredrik Gustafsson <iveqy@iveqy.com>
Date
Jun 28, 2013, 16:05 UTC
Message-ID
<20130628160459.GA16832@paksenarrion.iveqy.com>

Hi, I don't quite manage to figure out gits argv parsing and would need some help on the way.

I want: git format-patch -o outdir HEAD~

Work exactly the way it does now, setting output_directory to outdir. But I also want git format-patch -o HEAD~

to set output_directory with a NULL value so that I can assign a default value to it. Is that even possible with the current argv-parsing implementation?

The currect argv parser is using OPTION_CALLBACK so I thought that that callback should be able to determine if there was an outdir supplied or not.

Or is the correct solution to also add a bolean type OPTION_BOOLEAN for -o?

-- 
Med vänliga hälsningar
Fredrik Gustafsson

tel: 0733-608274
e-post: iveqy@iveqy.com
Next: Jeff King
Message 1 of 4 in “Parse --o in format-patch”
  1. Fredrik GustafssonJun 28, 2013
  2. Jeff KingJun 28, 2013
  3. Fredrik GustafssonJun 28, 2013
  4. Jeff KingJun 28, 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.