From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Michael J Gruber <git@drmicha.warpmail.net>, git@vger.kernel.org
Subject: Re: [RFC] Should "log --cc" imply "log --cc -p"?
Date: Tue, 5 Feb 2013 04:33:07 -0500 [thread overview]
Message-ID: <20130205093307.GC24973@sigill.intra.peff.net> (raw)
In-Reply-To: <7vfw1c3ujo.fsf@alter.siamese.dyndns.org>
On Mon, Feb 04, 2013 at 08:36:43AM -0800, Junio C Hamano wrote:
> "git log/diff-files -U8" do not need "-p" to enable textual patches,
> for example. It is "I already told you that I want 8-line context.
> For what else, other than showing textual diff, do you think I told
> you that for?" and replacing "8-line context" with various other
> options that affect patch generation will give us a variety of end
> user complaints that would tell us that C) is more intuitive to
> them.
Yeah, I'd agree with this. My feeling is that when there are two
options, A and B, and A is a no-op if B is not also specified, that it
makes sense for A to imply B. We do it in several places already (and I
just added some for "git branch --list" recently).
Is "--cc" a no-op when "-p" is not specified? Certainly "-c" is not, but
I do not think you are proposing that. At first glance, "--cc" is
nonsensical without "-p", but what about other xdiff callers? For
example, in:
git log --cc --stat
the "--cc" is significant. So I don't think it is right for "--cc" to
always imply "-p". But if the rule kicked in only when no other format
had been specified, that might make sense.
-Peff
next prev parent reply other threads:[~2013-02-05 9:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-03 23:10 [RFC] Should "log --cc" imply "log --cc -p"? Junio C Hamano
2013-02-04 11:04 ` Michael J Gruber
2013-02-04 16:36 ` Junio C Hamano
2013-02-05 8:58 ` Michael J Gruber
2013-02-05 9:33 ` Jeff King [this message]
2013-02-05 15:46 ` Junio C Hamano
2013-02-05 10:16 ` Ævar Arnfjörð Bjarmason
2013-02-05 11:22 ` Jeff King
2013-02-05 14:27 ` Ævar Arnfjörð Bjarmason
2013-02-05 15:51 ` 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=20130205093307.GC24973@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@drmicha.warpmail.net \
--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).