git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[BUG] difference of info from diff and blame

From
SKSemyon Kirnosenko <semyon.kirnosenko@gmail.com>
Date
Jan 11, 2011, 10:38 UTC
Message-ID
<4D2C333A.3010401@gmail.com>
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.
Next: Thomas Rast
Message 1 of 4 in “[BUG] difference of info from diff and blame”
  1. Semyon KirnosenkoJan 11, 2011
  2. Thomas RastJan 11, 2011
  3. Semyon KirnosenkoJan 12, 2011
  4. diff -U0 occasionally misses a chance to make empty lines context [was: Re: [BUG] difference of info from diff and blame]Thomas Rast, Jan 12, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.