From: Junio C Hamano <gitster@pobox•com>
To: Jeff King <peff@peff•net>
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: Mon, 24 Feb 2014 09:16:01 -0800 [thread overview]
Message-ID: <xmqqha7obfe6.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20140222083423.GF1576@sigill.intra.peff.net> (Jeff King's message of "Sat, 22 Feb 2014 03:34:23 -0500")
Jeff King <peff@peff•net> writes:
> 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).
Hmph.
> I have never found "commit --dry-run" to be useful, but I assumed that
> somebody does.
Same here, and I did not really consider "commit --short" was
intentionally a valid short-hand for "commit --dry-run --short", but
its working as such was an accident, hence my comment.
prev parent reply other threads:[~2014-02-24 17:16 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
2014-02-24 17:16 ` Junio C Hamano [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=xmqqha7obfe6.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=peff@peff$(echo .)net \
--cc=rctay89@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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