git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Semyon Kirnosenko <semyon.kirnosenko@gmail.com>
To: git@vger.kernel.org
Subject: [BUG] difference of info from diff and blame
Date: Tue, 11 Jan 2011 13:38:50 +0300	[thread overview]
Message-ID: <4D2C333A.3010401@gmail.com> (raw)

Hi.

I'm working on automatic processing of info from git. And I have some 
problems. Let me show it on an axample.

I have jquery repo (https://github.com/jquery/jquery.git)
Let's get blame for some file in some revision:
git blame -l -s 2ad223aedd1f93c783d98d60adc9fda3bdfbb4b6 -- 
src/event/event.js
According to blame, line 127 was added in revision 
2ad223aedd1f93c783d98d60adc9fda3bdfbb4b6.
Let's get diff for that revision:
git diff-tree -p 2ad223aedd1f93c783d98d60adc9fda3bdfbb4b6 -- 
src/event/event.js
We can see this:
@@ -105,19 +120,16 @@ jQuery.event = {

  		// Handle triggering a single element
  		else {
-			var handler = element["on" + type ], val,
-				fn = jQuery.isFunction( element[ type
+			var val, ret, fn = jQuery.isFunction( element
+			
+			// Pass along a fake event
+			data.unshift( this.fix({ type: type, target:

-			if ( handler ) {

As you can see line 127 is not marked with '+' char, which means it was 
not added in this revision. But blame sad otherwise.

I had the same problem on a wide range of repos.
I think it's a bug.

             reply	other threads:[~2011-01-11 10:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-11 10:38 Semyon Kirnosenko [this message]
2011-01-11 13:40 ` [BUG] difference of info from diff and blame Thomas Rast
2011-01-12  7:53   ` Semyon Kirnosenko
2011-01-12 10:20     ` diff -U0 occasionally misses a chance to make empty lines context [was: Re: [BUG] difference of info from diff and blame] Thomas Rast

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=4D2C333A.3010401@gmail.com \
    --to=semyon.kirnosenko@gmail.com \
    --cc=git@vger.kernel.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).