All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Yann Dirson <ydirson@altern.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/2] git-svn: add some in-code documentation (options-related).
Date: Sun, 21 Jun 2009 16:48:30 -0700	[thread overview]
Message-ID: <7vmy81p2r5.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1245624521-30769-2-git-send-email-ydirson@altern.org> (Yann Dirson's message of "Mon\, 22 Jun 2009 00\:48\:40 +0200")

Yann Dirson <ydirson@altern.org> writes:

> +# Option structures here are used to define both command-line options
> +# and git-config keys.  They are handled by read-repo-config().
> +# Options in mixed case and with only a long form are only for the
> +# config file.  All options available from command-line are available
> +# as config-file options too, but without any dash in their names.

Hmm... I am a bit confused.  So for example:

		'authors-file|A=s' => \$_authors,
		'authors-prog=s' => \$_authors_prog,
		'repack:i' => \$Git::SVN::_repack,
		'noMetadata' => \$Git::SVN::_no_metadata,
		'useSvmProps' => \$Git::SVN::_use_svm_props,

authors-file, authors-prog and repack are not MixdCase (and the first and
third are not even "only a long form"), so it is not "only for the config
file".  But noMetadata and useSvmProps are "only for the config file".

It took me a bit to realize that these two equivalence hold:

  "not only for the config file" === "also available as command line option"
  "only for the config file"     === "cannot be given on the command line"

Since "option structures here are used for both command and config", and
"anything usable from command line can be used in config file", logically
it follows that "everything in these option structures here are usable in
the config".  It took me a bit longer than necessary for that to click,
too.

Perhaps I am slow.  But I suspect I am not the slowest around here.

After scratching my head for a few minutes, here is a rephrased
description I came up with (I am not writing this as an improved
suggestion, but to ask you to sanity check if I read what you wanted to
say correctly):

    These are all configurable in the config file (remove dash in their
    names to use these names as the config key).

    Options that have MixedCase names without short format (e.g. noMetadata)
    can only be used from the configuration (iow they cannot be given from
    the command line as options).

But then this raises a couple of questions.

 * What are the examples of MixedCase names that do have short format?
   Are they usable from the command line?

 * %fc_opts() has "noMetadata" and %init_opts() has "no-metadata"; how are
   they related, and how do they affect the above "what's available where
   and how to spell their names" rule you outlined?

  parent reply	other threads:[~2009-06-21 23:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-17 20:18 Improving git-svn documentation Yann Dirson
2009-06-17 22:04 ` Marc Branchaud
2009-06-21 22:48 ` [WIP PATCH 0/2] Some documentation improvements for git-svn Yann Dirson
2009-06-21 22:48   ` [PATCH 1/2] git-svn: add some in-code documentation (options-related) Yann Dirson
2009-06-21 22:48     ` [PATCH 2/2] git-svn user documentation update Yann Dirson
2009-06-21 23:48     ` Junio C Hamano [this message]
2009-06-22 19:12       ` [PATCH 1/2] git-svn: add some in-code documentation (options-related) Yann Dirson
2009-06-25  8:47 ` Improving git-svn documentation Eric Wong

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=7vmy81p2r5.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=ydirson@altern.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.