From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Tay Ray Chuan <rctay89@gmail.com>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] demonstrate git-commit --dry-run exit code behaviour
Date: Sat, 22 Feb 2014 03:34:23 -0500 [thread overview]
Message-ID: <20140222083423.GF1576@sigill.intra.peff.net> (raw)
In-Reply-To: <xmqqa9dk43pi.fsf@gitster.dls.corp.google.com>
On Fri, Feb 21, 2014 at 12:21:13PM -0800, Junio C Hamano wrote:
> Tay Ray Chuan <rctay89@gmail.com> writes:
>
> > In particular, show that --short and --porcelain, while implying
> > --dry-run, do not return the same exit code as --dry-run. This is due to
> > the wt_status.commitable flag being set only when a long status is
> > requested.
>
> I am not sure if --short/--porcelain should even be accepted by "git
> commit" in the first place. It used to be that "git status" and
> "git commit" were the same program in a different guise and "git
> status <anything>" were merely a "git commit --dry-run <anything>",
> but the recent push is in the direction of making them totally
> separate in the end-user's minds. So if we want a proper fix, I
> would actually think that these options should *error out* at the
> command line parser level, way before checking if there is anything
> to commit.
I do not think they are any less useful than "git commit --dry-run" in
the first place. If you want to ask "what would happen if I ran commit
with these arguments", you can get the answer in any of several formats
(and --porcelain is the only machine-readable one).
I have never found "commit --dry-run" to be useful, but I assumed that
somebody does.
-Peff
next prev parent reply other threads:[~2014-02-22 8:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-21 19:16 [PATCH] demonstrate git-commit --dry-run exit code behaviour Tay Ray Chuan
2014-02-21 20:21 ` Junio C Hamano
2014-02-22 8:34 ` Jeff King [this message]
2014-02-24 17:16 ` 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=20140222083423.GF1576@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=rctay89@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).