From: garciagj <garciagj@ensibm.imag.fr>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Jorge Juan Garcia Garcia
<Jorge-Juan.Garcia-Garcia@ensimag.imag.fr>, <git@vger.kernel.org>,
<gitster@pobox.com>,
Mathieu Lienard--Mayor <Mathieu.Lienard--Mayor@ensimag.imag.fr>,
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Subject: Re: [PATCH 1/2] status: introduce status.short to enable --short by default
Date: Mon, 10 Jun 2013 10:01:34 +0200 [thread overview]
Message-ID: <3774bdd37ba5b330143d5a2b675955dc@ensibm.imag.fr> (raw)
In-Reply-To: <CALkWK0kvKzFoZmz313hR-3Z71y-MDPT37BfUi7Qrgy7hz_sErQ@mail.gmail.com>
El 2013-06-08 17:25, Ramkumar Ramachandra escribió:
> Jorge Juan Garcia Garcia wrote:
>> Some people always run 'git status -s'.
>> The configuration variable status.short allows to set it by default.
>
> Good feature.
>
>> @@ -1112,6 +1112,15 @@ static int git_status_config(const char *k,
>> const char *v, void *cb)
>> s->submodule_summary = -1;
>> return 0;
>> }
>> + if (!strcmp(k, "status.short")) {
>> + if (!v)
>> + return config_error_nonbool(k);
>> + if (git_config_bool(k,v)) {
>> + status_format = STATUS_FORMAT_SHORT;
>> + wt_shortstatus_print(s);
>> + }
>> + return 0;
>> + }
>
> Incorrect. This is the wrong place to use config_error_nonbool():
> this is very much a bool, and a "[status] short" in ~/.gitconfig
> should not error out (all boolean variables behave in the same
> manner). When in doubt, consult config_error_nonbool(); there's
> clearly a comment stating:
Ok. We will change it.
>
> /*
> * Call this to report error for your variable that should not
> * get a boolean value (i.e. "[my] var" means "true").
> */
>
> Also, why are you calling wt_shortstatus_print() here, instead of
> returning control to cmd_status(), which is going to do it anyway?
Yes, it's obviously a mistake.
prev parent reply other threads:[~2013-06-10 8:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-08 9:28 [PATCH 1/2] status: introduce status.short to enable --short by default Jorge Juan Garcia Garcia
2013-06-08 9:28 ` [PATCH 2/2] status: introduce status.branch to enable --branch " Jorge Juan Garcia Garcia
2013-06-08 15:25 ` [PATCH 1/2] status: introduce status.short to enable --short " Ramkumar Ramachandra
2013-06-09 18:54 ` Junio C Hamano
2013-06-09 19:26 ` Matthieu Moy
2013-06-10 8:02 ` garciagj
2013-06-10 8:01 ` garciagj [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=3774bdd37ba5b330143d5a2b675955dc@ensibm.imag.fr \
--to=garciagj@ensibm.imag.fr \
--cc=Jorge-Juan.Garcia-Garcia@ensimag.imag.fr \
--cc=Mathieu.Lienard--Mayor@ensimag.imag.fr \
--cc=Matthieu.Moy@grenoble-inp.fr \
--cc=artagnon@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).