From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: Junio C Hamano <gitster@pobox.com>
Cc: Ramkumar Ramachandra <artagnon@gmail.com>,
Git List <git@vger.kernel.org>
Subject: Re: [PATCH 1/2] status: really ignore config with --porcelain
Date: Mon, 24 Jun 2013 18:50:26 +0200 [thread overview]
Message-ID: <vpq7ghjtpv1.fsf@anie.imag.fr> (raw)
In-Reply-To: <7vk3ljbh5r.fsf@alter.siamese.dyndns.org> (Junio C. Hamano's message of "Mon, 24 Jun 2013 09:35:44 -0700")
Junio C Hamano <gitster@pobox.com> writes:
> Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
>
>>> Basically, having the CLI parser and the config parser flip two
>>> different sets of variables, so we can discriminate who set what.
>>> What annoys me is that this is the first instance of such a
>>> requirement.
>>
>> I don't think it's the first instance, but I can't remember precise
>> examples.
>
> "First read config, override with command line" is what we always
> do. One recent workaround with selective exception I can think of
> offhand is in diff config parser 6c374008 (diff_opt: track whether
> flags have been set explicitly, 2013-05-10), but I am fairly sure
> there are others.
That was the one I had in mind.
>>> The approach I'm currently tilting towards is extending the
>>> parse-options API to allow parsing one special option early. I would
>>> argue that this is a good feature that we should have asked for when
>>> we saw 6758af89e (Merge branch 'jn/git-cmd-h-bypass-setup',
>>> 2010-12-10). What do you think?
>>
>> That's an option too, yes. But probably not easy to implement :-(.
>
> Isn't it essentially your second option (running the CLI parser
> before once, then read config, and then run the CLI parser for
> real)?
Not really. The first run should be a kind of dry-run, except for the
--porcelain part.
> In any case, I am still not convinced yet that status.short is a
> real problem if --porcelain readers trip with "## branchname"
> output. Isn't it that the readers are broken and need fixing?
Before introducing status.short, scripts could call "git status
--porcelain" and get some output. They had no way to know whether
something would be added in the future. Now, they can run the same
command and get a different output. To me, that's exactly what we're
trying to avoid in plumbing.
The configuration file here is really meant for the user, not for
scripts. Scripts that want the branch information can use --branch.
Scripts that do not have absolutely nothing to gain in getting this
extra output (only extra parser complexity).
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
next prev parent reply other threads:[~2013-06-24 16:50 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-24 12:45 [PATCH (!) 0/2] Fix serious regressions in latest master Ramkumar Ramachandra
2013-06-24 12:45 ` [PATCH 1/2] status: really ignore config with --porcelain Ramkumar Ramachandra
2013-06-24 13:51 ` Matthieu Moy
2013-06-24 14:05 ` Ramkumar Ramachandra
2013-06-24 14:51 ` Matthieu Moy
2013-06-24 16:35 ` Junio C Hamano
2013-06-24 16:50 ` Matthieu Moy [this message]
2013-06-24 17:16 ` Junio C Hamano
2013-06-24 17:21 ` Matthieu Moy
2013-06-24 18:16 ` Junio C Hamano
2013-06-24 19:30 ` Ramkumar Ramachandra
2013-06-24 22:24 ` Junio C Hamano
2013-06-24 19:49 ` Junio C Hamano
2013-06-28 1:40 ` Jeff King
2013-06-28 3:59 ` Junio C Hamano
2013-06-28 17:37 ` Junio C Hamano
2013-06-28 19:31 ` Jeff King
2013-06-28 20:15 ` Junio C Hamano
2013-06-24 16:53 ` Ramkumar Ramachandra
2013-06-24 14:55 ` Junio C Hamano
2013-06-24 15:04 ` Matthieu Moy
2013-06-24 15:50 ` Ramkumar Ramachandra
2013-06-24 12:45 ` [PATCH 2/2] commit: make it work with status.short Ramkumar Ramachandra
2013-06-24 15:17 ` Junio C Hamano
2013-06-24 15:39 ` Ramkumar Ramachandra
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=vpq7ghjtpv1.fsf@anie.imag.fr \
--to=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).