git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Nguyen Thai Ngoc Duy <pclouds@gmail.com>,
	Nikolay Vladimirov <nikolay@vladimiroff.com>,
	git@vger.kernel.org
Subject: Re: [PATCH] buitin_config: return postitive status in get_value
Date: Sun, 29 Jul 2012 17:39:28 -0400	[thread overview]
Message-ID: <20120729213928.GA3071@sigill.intra.peff.net> (raw)
In-Reply-To: <7vipd7vzql.fsf@alter.siamese.dyndns.org>

On Sat, Jul 28, 2012 at 11:38:10PM -0700, Junio C Hamano wrote:

> > Then the following patch may be better because it leaves other cases
> > untouched (I'm not saying that we should or should not do it though)
> 
> I personally think that the documentation unnecessarily exposes the
> useless value assignment of the exit codes (the use of different
> exit codes was done merely to aid debugging the git-config command
> itself) by describing the then-current set of conditions, and should
> be reduced to say "0 for success, non-zero for any error".

We use ret=5 in the test suite to say "unset this variable, but it's OK if
it wasn't set in the first place" but still fail on error. The only
other one I can imagine that would be useful is "you tried to get a
variable but it did not exist, and there was no other error". Which is
probably what ret=1 is attempting to do, though it also encompasses
syntactically bogus keys.

-Peff

      parent reply	other threads:[~2012-07-29 21:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-28 11:42 [PATCH] buitin_config: return postitive status in get_value Nikolai Vladimirov
2012-07-28 12:59 ` Nguyen Thai Ngoc Duy
2012-07-28 13:18   ` Nikolay Vladimirov
2012-07-28 13:29     ` Nguyen Thai Ngoc Duy
2012-07-29  6:38       ` Junio C Hamano
2012-07-29 20:43         ` Junio C Hamano
2012-07-29 21:41           ` Jeff King
2012-07-30 12:26           ` Nguyen Thai Ngoc Duy
2012-07-30 15:51             ` Junio C Hamano
2012-07-29 21:39         ` Jeff King [this message]

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=20120729213928.GA3071@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=nikolay@vladimiroff.com \
    --cc=pclouds@gmail.com \
    /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).