git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: git@vger.kernel.org, Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH v3 03/10] config: Make git_config() more flexible
Date: Wed, 18 Feb 2009 13:13:11 -0800	[thread overview]
Message-ID: <7viqn7v47s.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <1234878776-13250-3-git-send-email-felipe.contreras@gmail.com> (Felipe Contreras's message of "Tue, 17 Feb 2009 15:52:49 +0200")

Felipe Contreras <felipe.contreras@gmail.com> writes:

> Currently git_config() returns an error if there is no repo config file
> available (cwd is not a git repo); it will correctly parse the system
> and global config files, but still return an error.

Currently it does???

Here is what I get from using the command from master and next:

    $ cd /var/tmp
    $ ls -d /.git /var/.git /var/tmp/.git /var/tmp/config
    ls: /.git: No such file or directory
    ls: /var/.git: No such file or directory
    ls: /var/tmp/.git: No such file or directory
    ls: /var/tmp/config: No such file or directory
    $ git config -l >/dev/null ; echo $?
    0
    $ git config alias.co; echo $?
    checkout
    0

I have $HOME/.gitconfig (where the alias comes from) and no system wide
configuration file.

Also the patch is mistitled.  Whatever you are trying to say about the
current problem which I do not seem to get, and whatever different
behaviour from the current one you are trying to implement (which is not
quite clear from the above log message), it is not about making it more
flexible.

The patch text suggests you are trying to change the function's exit
status so the title would be "git-config: report errors correctly in its
exit status", but it is unspecified in your commit log message what
definition of "correctly" you are using in this patch.

  parent reply	other threads:[~2009-02-18 21:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-17 13:52 [PATCH v3 01/10] config: Codestyle cleanups Felipe Contreras
2009-02-17 13:52 ` [PATCH v3 02/10] config: Cleanup editor action Felipe Contreras
2009-02-17 13:52   ` [PATCH v3 03/10] config: Make git_config() more flexible Felipe Contreras
2009-02-17 13:52     ` [PATCH v3 04/10] config: Trivial rename in preparation for parseopt Felipe Contreras
2009-02-17 13:52       ` [PATCH v3 05/10] config: Reorganize get_color* Felipe Contreras
2009-02-17 13:52         ` [PATCH v3 06/10] config: Use parseopt Felipe Contreras
2009-02-17 13:52           ` [PATCH v3 07/10] config: Disallow --getcolor* and other actions Felipe Contreras
2009-02-17 13:52             ` [PATCH v3 08/10] config: Disallow multiple config file locations Felipe Contreras
2009-02-17 13:52               ` [PATCH v3 09/10] config: Disallow multiple variable types Felipe Contreras
2009-02-17 13:52                 ` [PATCH v3 10/10] config: Don't allow extra arguments for -e or -l Felipe Contreras
2009-02-18 21:13     ` Junio C Hamano [this message]
2009-02-18 21:30       ` [PATCH v3 03/10] config: Make git_config() more flexible Felipe Contreras
2009-02-18 22:01         ` Junio C Hamano
2009-02-17 16:33 ` [PATCH v3 01/10] config: Codestyle cleanups Sverre Rabbelier
2009-02-18  9:18   ` Felipe Contreras
2009-02-18 19:02     ` Junio C Hamano

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=7viqn7v47s.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=felipe.contreras@gmail.com \
    --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).