git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephan Beyer <s-beyer@gmx.net>
To: Michele Ballabio <barra_cuda@katamail.com>
Cc: git@vger.kernel.org, Pierre Habouzit <madcoder@debian.org>,
	Junio C Hamano <gitster@pobox.com>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH 1/2] api-parse-options.txt: Introduce documentation for parse options API
Date: Sun, 22 Jun 2008 15:45:50 +0200	[thread overview]
Message-ID: <20080622134550.GA5279@leksak.fem-net> (raw)
In-Reply-To: <200806221449.08307.barra_cuda@katamail.com>

> > +`PARSE_OPT_KEEP_DASHDASH`::
> > +       Usually long options (`\--long-opt`) are boiled down to their
> > +       short option equivalent, if available.
> > +       Using this flag, long options are kept.
> 
> No: PARSE_OPT_KEEP_DASHDASH keeps the "--" that usually separates options
> from files, as in

Eh, right, of course!  What I wrote doesn't make any sense. ;-)

> > +`OPT__ABBREV(&int_var)`::
> > +       Add `\--abbrev [<n>]`.
> 
> better:
> +       Add `\--abbrev[=<n>]`.
> 
> since the <n> is optional.

That's right and I also expected that print_usage_with_options() would
do so, since the other variant is ambiguous, BUT:

$ ./test-parse-options -h 2>&1 | grep abbrev
    --abbrev [<n>]        use <n> digits to display SHA-1s

And I didn't want to change parse-options.c ;-)


Any other comments?

Regards,
  Stephan

-- 
Stephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F

  reply	other threads:[~2008-06-22 13:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-22  0:00 [PATCH 1/2] api-parse-options.txt: Introduce documentation for parse options API Stephan Beyer
2008-06-22  0:00 ` [PATCH 2/2] Extend parse-options test suite Stephan Beyer
2008-06-22 12:49 ` [PATCH 1/2] api-parse-options.txt: Introduce documentation for parse options API Michele Ballabio
2008-06-22 13:45   ` Stephan Beyer [this message]
2008-06-22 14:39     ` [PATCH] parse-options.c: fix documentation syntax of optional arguments Michele Ballabio
2008-06-22 15:04       ` [PATCH v2 1/2] api-parse-options.txt: Introduce documentation for parse options API Stephan Beyer
2008-06-22 15:04         ` [PATCH v2 2/2] Extend parse-options test suite Stephan Beyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080622134550.GA5279@leksak.fem-net \
    --to=s-beyer@gmx.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=barra_cuda@katamail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=madcoder@debian.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).