Permalink
Browse files

Improve article attribution heuristic. Fixes #380.

Make the attribution algorithm trace through the history
across file rename operations, but do not consider such operations as an
indication of contribution.
  • Loading branch information...
jugglinmike authored and ajpiano committed Jun 6, 2013
1 parent d1ebfef commit 23791d343c0ec44d9bf07164ff3aa7ae9feea89a
Showing with 7 additions and 1 deletion.
  1. +7 −1 grunt.js
View
@@ -93,7 +93,13 @@ grunt.registerHelper( "contributor-attribution", function( post, fileName, fn )
// Read contributors from git file information
grunt.utils.spawn({
cmd: "git",
- args: [ "log", "--format=%aN <%aE>", fileName ]
+ args: [
+ "log",
+ "--follow", // Trace history through file rename operations
+ "--diff-filter=AM", // Only consider "Add" and "Modify" operations
+ "--format=%aN <%aE>",
+ fileName
+ ]
}, function( err, result ) {
if ( err ) {
grunt.verbose.error();

0 comments on commit 23791d3

Please sign in to comment.