From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff King Subject: Re: git log fails to show all changes for a file Date: Wed, 15 Jul 2015 11:57:18 -0700 Message-ID: <20150715185717.GA11146@peff.net> References: <20150714073035.GA22707@aepfle.de> <20150714074508.GE1451@serenity.lan> <20150714075955.GA24577@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: Linus Torvalds , Olaf Hering , John Keeping , Git Mailing List To: Junio C Hamano X-From: git-owner@vger.kernel.org Wed Jul 15 20:57:28 2015 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZFRrz-0003Ie-4U for gcvg-git-2@plane.gmane.org; Wed, 15 Jul 2015 20:57:27 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753380AbbGOS5X (ORCPT ); Wed, 15 Jul 2015 14:57:23 -0400 Received: from cloud.peff.net ([50.56.180.127]:59860 "HELO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753285AbbGOS5W (ORCPT ); Wed, 15 Jul 2015 14:57:22 -0400 Received: (qmail 10066 invoked by uid 102); 15 Jul 2015 18:57:21 -0000 Received: from Unknown (HELO peff.net) (10.0.1.1) by cloud.peff.net (qpsmtpd/0.84) with SMTP; Wed, 15 Jul 2015 13:57:21 -0500 Received: (qmail 18032 invoked by uid 107); 15 Jul 2015 18:57:22 -0000 Received: from Unknown (HELO sigill.intra.peff.net) (10.0.1.2) by peff.net (qpsmtpd/0.84) with SMTP; Wed, 15 Jul 2015 14:57:22 -0400 Received: by sigill.intra.peff.net (sSMTP sendmail emulation); Wed, 15 Jul 2015 11:57:18 -0700 Content-Disposition: inline In-Reply-To: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Wed, Jul 15, 2015 at 11:17:50AM -0700, Junio C Hamano wrote: > > So this is a suggested change to "-p -m" behavior? > > Not really. This is a suggested behaviour for "git log -p"; I > wasn't very enthused by the idea to turn --cc when user said -p > without telling them what we are doing. In other words, if the > users want combined, they should say --cc (and they will get a > single-parent patch for non-merges with --cc) so there is no reason > not to do this, as long as we fix --cc so that "git log --cc" > implies "git log --cc -p". Like you, I frequently use "--first-parent -m". If I understand your proposal, a regular "git log" would have the first-parent-diff behavior of those options, but still traverse other parents. One oddity of that proposal is that the user ends up seeing any given change on a side-branch _twice_. Once in the original commit that introduced it, and once in the merge of the branch. And commit-selection tools like "git log -Ssome_code" will select both, too, and they'll see the merge commit along with the original. I can't decide if that's a good thing or not. -Peff