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

Re: [PATCH 07/25] parse-options: make some arguments optional, add callbacks.

From
René Scharfe <rene.scharfe@lsrfire.ath.cx>
Date
Oct 16, 2007, 17:04 UTC
Message-ID
<4714EF2F.70506@lsrfire.ath.cx>
In-Reply-To
<Pine.LNX.4.64.0710161742040.25221@racer.site>
Johannes Schindelin schrieb:
Show 22 quoted lines
> Hi,
> 
> On Tue, 16 Oct 2007, Ren? Scharfe wrote:
> 
>> Pierre Habouzit schrieb:
>>> This bit is to allow to aggregate options with arguments together when
>>> the argument is numeric.
>>>
>>>     +#if 0
>>>     +		/* can be used to understand -A1B1 like -A1 -B1 */
>>>     +		if (flag & OPT_SHORT && opt->opt && isdigit(*opt->opt)) {
>>>     +			*(int *)opt->value = strtol(opt->opt, (char **)&opt->opt, 10);
>>>     +			return 0;
>>>     +		}
>>>     +#endif
>> I don't like it, it complicates number options with unit suffixes (e.g.
>> --windows-memory of git-pack-objects).
> 
> Why?  It only means that you cannot say -W10mxabc instead of -W10m xabc.  
> 
> Remember: this is a special case for OPT_INTEGER.  Nothing to do with 
> OPT_SIZE, which you'd probably implement as a callback.

You mean I need to take a look at the actual patch to get a bit more context? ;-) Now that I did, I retract my comment.

Pierre, FYI: I didn't see your patches coming through the NNTP gateway of gmane.org, which is my way of reading this list. Its web interface doesn't show them, either, so it's probably not caused by my news reader.

René
Previous: Nicolas PitreNext: Nicolas Pitre
Message 10 of 24 in “[parse-options] proposal for merge, take 1”
  1. Pierre HabouzitOct 16, 2007
  2. Pierre HabouzitOct 16, 2007
  3. Pierre HabouzitOct 16, 2007
  4. Pierre HabouzitOct 16, 2007
  5. Johannes SchindelinOct 16, 2007
  6. René ScharfeOct 16, 2007
  7. Johannes SchindelinOct 16, 2007
  8. Pierre HabouzitOct 16, 2007
  9. Nicolas PitreOct 16, 2007
  10. René ScharfeOct 16, 2007
  11. Nicolas PitreOct 16, 2007
  12. Pierre HabouzitOct 16, 2007
  13. Shawn O. PearceOct 17, 2007
  14. Johannes SchindelinOct 17, 2007
  15. Michael WittenOct 16, 2007
  16. Michael WittenOct 16, 2007
  17. Johannes SchindelinOct 16, 2007
  18. Michael WittenOct 16, 2007
  19. Pierre HabouzitOct 16, 2007
  20. Alex RiesenOct 16, 2007
  21. Pierre HabouzitOct 16, 2007
  22. Alex RiesenOct 17, 2007
  23. Shawn O. PearceOct 17, 2007
  24. Pierre HabouzitOct 17, 2007

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.