All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ryan Anderson <ryan@michonline.com>
To: Junio C Hamano <junkio@cox.net>
Cc: Ryan Anderson <ryan@michonline.com>, git@vger.kernel.org
Subject: Re: [PATCH 2/2] annotate: Fix bug when parsing merges with differing real and logical parents.
Date: Mon, 7 Aug 2006 12:45:40 -0700	[thread overview]
Message-ID: <20060807194539.GD15477@h4x0r5.com> (raw)
In-Reply-To: <7virl42w6s.fsf@assigned-by-dhcp.cox.net>

On Mon, Aug 07, 2006 at 12:16:27PM -0700, Junio C Hamano wrote:
> This does stop it from dying on Jeff King's bug report
> (<20060803203848.GA15121@coredump.intra.peff.net>) to annotate
> builtin-read-tree.c.  However,...
> 
> Comparing output between "annotate" and "blame -c" on the same
> file shows a rather interesting differences.

Yes, annotate is still mis-attributing things to merges that it should
not.  I was kind of hoping this fix would have a side-effect of fixing
it, but I had no logical reason to think it would.   I'm going to try
again at fixing it later this week, maybe the weekend, but I'm starting
to think that maybe blame has won. :)

> 
> (1) "annotate" blames the first line "/*" to d147e501 made on
>     2006-05-23, while "blame" annotates it with 8bc9a0c7 made on
>     2005-04-07.  As far as I remember this line has never been
>     touched by anybody during the life of the file, so the
>     latter sounds more plausible.
> 
> (2) The 13th line to #include "cache-tree.h" is blamed on
>     3f69d405 by "annotate", while annotation by "blame" reads
>     that it came from bad68ec9.
> 
>     3f69d405 is a merge to incorporate the line into "master"
>     branch.  "git show -M 3f69d405 -- builtin-read-tree.c read-tree.c"
>     starts with:
> 
>         diff --cc builtin-read-tree.c
>         index ec40d01,99e7c75..716f792
>         --- a/builtin-read-tree.c
>         +++ b/builtin-read-tree.c
>         @@@ -9,9 -9,9 +9,10 @@@
> 
>           #include "object.h"
>           #include "tree.h"
>         + #include "cache-tree.h"
> 	  #include <sys/time.h>
> 
>     Which means the line is new from the point of view of the
>     "master" branch, but existed in the branch that this commit
>     merges from (namely, jc/cache-tree) already.
> 
>     "git show -M bad68ec9 -- read-tree.c" shows that it is the
>     one that added the #include line to the history.
> 
> (3) The 14th line to #include <sys/time.h> is blamed on d147e501
>     by "annotate" but "blame" says it came from 744633cb.  It is
>     obvious the latter is correct, if you look at "git show" on
>     these commits.  The eye-candy was what made <sys/time.h>
>     necessary (it needed to do the progress-signal stuff).
> 
> In fact, "annotate" attributes too many lines to d147e501 (839
> lines).
> 
> Given that "git show -M d147e501 -- read-tree.c builtin-read-tree.c"
> shows only 2 insertions and 1 deletion, it does not sound
> right.  The commit adds #include "builtin.h" and changes the
> function name "main" to "cmd_read_tree".
> 
> On the other hand, "blame" attributes only 1 line to this
> commit; the line to #include "builtin.h".  The other change this
> commit introduces (main -> cmd_read_tree) is not counted because
> the third parameter to the function changes after this commit by
> a91af794 (which, by the way, both "annotate" and "blame" get
> right), and the line this commit introduces did not survive.
> 
> 
> 

-- 

Ryan Anderson
  sometimes Pug Majere

  reply	other threads:[~2006-08-07 19:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-03 20:38 git-annotate bug report Jeff King
2006-08-03 21:10 ` Ryan Anderson
2006-08-07 11:50 ` Ryan Anderson
2006-08-07 12:11   ` [PATCH 1/2] log-tree: show_log() should respect the setting of diffopt->line_termination Ryan Anderson
2006-08-07 12:11     ` [PATCH 2/2] annotate: Fix bug when parsing merges with differing real and logical parents Ryan Anderson
2006-08-07 19:16       ` Junio C Hamano
2006-08-07 19:45         ` Ryan Anderson [this message]
2006-08-07 20:00         ` Annotate another problem report Junio C Hamano
2006-08-07 20:19           ` Ryan Anderson
2006-08-07 19:38     ` [PATCH 1/2] log-tree: show_log() should respect the setting of diffopt->line_termination Junio C Hamano
2006-08-08  8:49   ` git-annotate bug report 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=20060807194539.GD15477@h4x0r5.com \
    --to=ryan@michonline.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.