From: John Szakmeister <john@szakmeister.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jonathan Nieder <jrnieder@gmail.com>,
John Tapsell <johnflux@gmail.com>,
Simon Ruderich <simon@ruderich.org>,
Git List <git@vger.kernel.org>, Tay Ray Chuan <rctay89@gmail.com>
Subject: Re: git log -p unexpected behaviour - security risk?
Date: Tue, 30 Apr 2013 06:09:17 -0400 [thread overview]
Message-ID: <CAEBDL5VspccUmkkYBf17soGTyT3sinjnnNzRB_kytnOr3OBVQw@mail.gmail.com> (raw)
In-Reply-To: <7vli8bu3ne.fsf@alter.siamese.dyndns.org>
On Sun, Apr 21, 2013 at 2:42 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:
>
>> The thing is, I'm not convinced this is a bad default. "Shows no diff
>> at all for merges" is easy for a person to understand. It is much
>> easier to understand its limitations than -c and --cc.
>
> Making "log -p -m" a default before -c/--cc was introduced would
> have been the stupidest thing to do, as it would make the command
> mostly useless. Nobody would want to see repetitious output from a
> merge that he would eventually get when the traversal drills down to
> individual commits on the merged side branch.
>
> When I added -c/--cc, I contemplated making -p imply --cc, but
> decided against it primarily because it is a change in traditional
> behaviour, and it is easy for users to say --cc instead of -p from
> the command line.
FWIW, security aside, I would've like to have seen that. I find it
confusing that merge commits that introduce code don't have a diff
shown when using -p. And I find it hard to remember --cc. BTW,
what's the mnemonic for it? -p => patch, --cc => ?
> On the other hand, "show" was a newer command and it was easy to
> turn its default to --cc without having to worry too much about
> existing users.
>
>> For that
>> reason, it is a much *better* default for security than --cc or -c
>> (even though I believe one of the latter would be a better default for
>> convenience).
>
> Yes. I do not fundamentally oppose to the idea of "log -p" to imply
> "log --cc" when "-m" is not given ("log -p -m" is specifically
> declining the combined diff simplification). It may be a usability
> improvement.
Would you consider such a patch?
-John
next prev parent reply other threads:[~2013-04-30 10:09 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-11 10:36 git log -p unexpected behaviour - security risk? John Tapsell
2013-04-11 15:19 ` Tay Ray Chuan
2013-04-20 14:00 ` Simon Ruderich
2013-04-21 7:26 ` Junio C Hamano
2013-04-21 8:56 ` John Tapsell
2013-04-21 10:21 ` Jonathan Nieder
2013-04-21 13:46 ` John Tapsell
2013-04-21 15:56 ` Thomas Rast
2013-04-21 16:09 ` Jonathan Nieder
2013-04-21 18:42 ` Junio C Hamano
2013-04-30 10:09 ` John Szakmeister [this message]
2013-04-30 16:37 ` Junio C Hamano
2013-04-30 16:47 ` John Szakmeister
2013-04-30 17:05 ` Matthieu Moy
2013-04-30 17:58 ` John Szakmeister
2013-04-30 19:31 ` John Tapsell
2013-04-30 19:44 ` git log -p unexpected behaviour Junio C Hamano
2013-04-30 20:12 ` John Tapsell
2013-04-30 20:38 ` Junio C Hamano
2013-05-01 7:23 ` John Tapsell
2013-04-30 11:48 ` git log -p unexpected behaviour - security risk? shawn wilson
2013-04-21 18:25 ` 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=CAEBDL5VspccUmkkYBf17soGTyT3sinjnnNzRB_kytnOr3OBVQw@mail.gmail.com \
--to=john@szakmeister.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=johnflux@gmail.com \
--cc=jrnieder@gmail.com \
--cc=rctay89@gmail.com \
--cc=simon@ruderich.org \
/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).