threads / bug / 26005

blame formatting bug

Subject: blame formatting bug

## tl;dr

2 messages between Dec 9, 2010 and Dec 9, 2010.

replies: 1people: 2as markdown or json

Vitali· Dec 9, 2010, 08:11 UTC · lore
Hi.
On the jquery repo the following command:

git blame df9c37ec852f8c873e226cd0ae190f969e0edc17 -- jquery/jquery.js > blame

gives me the file with this:
c3c706d3 jquery/jquery.js (John Resig 2006-06-22 05:23:38 +0000  576) 	},
6ae392a4 jquery/jquery.js (John Resig 2006-06-22 20:14:41 +0000  577) 	
df9c37ec jquery/jquery.js (John Resig 2006-07-09 20:49:40 +0000  578) 
extend: function(obj,prop) {
		if ( !prop ) {
			prop = obj;
			obj = this;
		}
	
		for ( var i in prop )
			obj[i] = prop[i];
	
		return obj;
	}
c3c706d3 jquery/jquery.js (John Resig 2006-06-22 05:23:38 +0000  579) };
^8a4a1ed core/core.js     (John Resig 2006-03-22 03:33:07 +0000  580)
df9c37ec jquery/jquery.js (John Resig 2006-07-09 20:49:40 +0000  581) 
jQuery.extend = jQuery.fn.extend;
Looks like bug.
Thomas Rast· Dec 9, 2010, 13:55 UTC · re: Vitali · lore

Re: blame formatting bug

Vitali wrote:
Show 14 quoted lines
> df9c37ec jquery/jquery.js (John Resig 2006-07-09 20:49:40 +0000  578) 
> extend: function(obj,prop) {
> 		if ( !prop ) {
> 			prop = obj;
> 			obj = this;
> 		}
> 	
> 		for ( var i in prop )
> 			obj[i] = prop[i];
> 	
> 		return obj;
> 	}
> 
> Looks like bug.

My 'less' shows that these lines are "terminated" with CRs. Git's diff engine does not treat CRs as line endings, so neither does blame.

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

← back to recent threads