git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Thomas Rast <trast@inf.ethz.ch>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: <git@vger.kernel.org>, <kernel@pengutronix.de>
Subject: Re: git log anomalities
Date: Mon, 22 Jul 2013 12:40:01 +0200	[thread overview]
Message-ID: <87bo5u28l6.fsf@linux-k42r.v.cablecom.net> (raw)
In-Reply-To: <20130722090854.GA22222@pengutronix.de>

Uwe Kleine-König <u.kleine-koenig@pengutronix.de> writes:

> Hello,
>
> today I looked at the changes to drivers/net/ethernet/freescale/fec.c in
> the kernel since v3.8 using
>
> 	git log --stat v3.8.. --full-diff -- drivers/net/ethernet/freescale/fec.c
>
> which looks as expected. But when I added --graph the diffstats change.
> E.g. for 793fc0964be1921f15a44be58b066f22b925d90b it changes from:
>
>  drivers/net/ethernet/freescale/Makefile   |    3 +-
>  drivers/net/ethernet/freescale/fec.c      | 1966 -----------------------------
>  drivers/net/ethernet/freescale/fec_main.c | 1966 +++++++++++++++++++++++++++++
>  drivers/net/ethernet/freescale/fec_ptp.c  |    3 -
>  4 files changed, 1968 insertions(+), 1970 deletions(-)
>
> to
>
> |  Documentation/devicetree/bindings/net/dsa/dsa.txt |   91 +
> |  .../bindings/net/marvell-orion-mdio.txt           |    3 +
> |  Documentation/networking/ip-sysctl.txt            |   35 +-
[...]
> |  404 files changed, 15373 insertions(+), 8563 deletions(-)
>
> Is that a bug, or a feature I don't understand?

Nice catch.  It's a bad interaction between --full-diff, --stat and
--parents (which --graph implies in an internal-workings kind of way).

The parent rewriting gets to mess with the history *before* we generate
the diffs.  Normally this wouldn't matter, because the pathspec filter
would then again exclude all but the "real" change from the diff.  But
with --full-diff, you see all the changes between 793fc096 and the next
commit that touches the given pathspec (47a5247f), which is -- at this
stage, after rewriting -- the "parent".

I suspect to fix this we'll need to separate the "real" from the
"rewritten" parents, which might take a bit of work.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

  reply	other threads:[~2013-07-22 10:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-22  9:08 git log anomalities Uwe Kleine-König
2013-07-22 10:40 ` Thomas Rast [this message]
2013-07-22 21:22 ` [PATCH] log: use true parents for diff even when rewriting Thomas Rast
2013-07-22 21:48   ` Junio C Hamano
2013-07-23  7:27     ` Thomas Rast
2013-07-23  7:49       ` Uwe Kleine-König
2013-07-23 19:55   ` Junio C Hamano
2013-07-31 20:13   ` [PATCH v2] " Thomas Rast
2013-07-31 22:55     ` Jeff King

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bo5u28l6.fsf@linux-k42r.v.cablecom.net \
    --to=trast@inf.ethz.ch \
    --cc=git@vger.kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=u.kleine-koenig@pengutronix.de \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).