git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Ruderich <simon@ruderich.org>
To: John Tapsell <johnflux@gmail.com>
Cc: Git List <git@vger.kernel.org>, Tay Ray Chuan <rctay89@gmail.com>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: git log -p unexpected behaviour - security risk?
Date: Sat, 20 Apr 2013 16:00:52 +0200	[thread overview]
Message-ID: <20130420140051.GB29454@ruderich.org> (raw)
In-Reply-To: <CAHQ6N+qdA5Lck1_ByOYPOG4ngsztz3HQSw8c_U_K8OnDapj4bQ@mail.gmail.com>

On Thu, Apr 11, 2013 at 11:36:26AM +0100, John Tapsell wrote:
> Is there a way to make --cc default?

If you use aliases, something like this is easy:

    git config --global --add alias.lp 'log --patch --cc'

I use aliases heavily, so that's my fix for now.


But I think the current behaviour is unexpected for most (new?)
users (including me). I thought -p would display all changes in
all commits, including merges.

I guess changing -p's default behaviour to imply --cc is
problematic, so I think we should document that -p doesn't
generate patches for merges. Maybe something like this:

-- 8< --
Subject: [PATCH] Documentation/diff-options.txt: -p doesn't display merge changes

Signed-off-by: Simon Ruderich <simon@ruderich.org>
---
 Documentation/diff-options.txt | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 104579d..cd35ec7 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -24,6 +24,10 @@ ifndef::git-format-patch[]
 --patch::
 	Generate patch (see section on generating patches).
 	{git-diff? This is the default.}
+ifdef::git-log[]
+	Changes introduced in merge commits are not displayed. Use `-c`,
+	`--cc` or `-m` to include them.
+endif::git-log[]
 endif::git-format-patch[]
 
 -U<n>::
-- 
1.8.2.1.513.gdedbb69.dirty

-- 8< --

Regards
Simon
-- 
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9

  parent reply	other threads:[~2013-04-20 14:01 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 [this message]
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
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=20130420140051.GB29454@ruderich.org \
    --to=simon@ruderich.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johnflux@gmail.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).