git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David Kågedal" <davidk@lysator.liu.se>
To: git@vger.kernel.org
Subject: git config --get-regexp exit status
Date: Thu, 13 Dec 2007 14:42:31 +0100	[thread overview]
Message-ID: <871w9qsoc8.fsf@lysator.liu.se> (raw)
In-Reply-To: 20071213133653.13925.89254.stgit@krank

David Kågedal <davidk@lysator.liu.se> writes:

> I made a patch that uses "git config --get-regexp" to get the
> description and stgit.stackformatversion options for all branches at
> once, and ignore the "protected" flag that I don't use. With this
> change, I'm almost down to half a second, which almost makes it
> usable.

One thing that annoyed me what that "git config --get-regexp" will
return zero, one, or more matches, which are all valid reponses. But
it treats the zero-match special and return an exit status of 1.

Is that a conscious choice, or just an effect of how "git config
--get" works?

Since zero matches isn't really an error, I would like the exit status
to be 0. At least for this use case :-)

-- 
David Kågedal

  reply	other threads:[~2007-12-13 13:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-13 13:38 [StGit RFC] Make "stg branch -l" faster by getting all git config information in one call David Kågedal
2007-12-13 13:42 ` David Kågedal [this message]
2007-12-13 18:06   ` git config --get-regexp exit status Junio C Hamano
2007-12-13 14:04 ` [StGit RFC] Make "stg branch -l" faster by getting all git config information in one call Catalin Marinas
2007-12-13 14:15   ` David Kågedal
2007-12-13 14:31   ` David Kågedal
2007-12-13 15:38     ` Catalin Marinas
2007-12-13 16:08       ` David Kågedal
2007-12-13 16:08     ` Karl Hasselström
2007-12-13 16:04   ` Karl Hasselström
2007-12-13 16:10     ` Catalin Marinas
2007-12-13 16:39       ` David Kågedal
2007-12-13 17:04         ` Karl Hasselström

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=871w9qsoc8.fsf@lysator.liu.se \
    --to=davidk@lysator.liu.se \
    --cc=git@vger.kernel.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).