Skip to content

Commit 23791d3

Browse files
jugglinmikeajpiano
authored andcommitted
Improve article attribution heuristic. Fixes jquery#380.
Make the attribution algorithm trace through the history across file rename operations, but do not consider such operations as an indication of contribution.
1 parent d1ebfef commit 23791d3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

grunt.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,13 @@ grunt.registerHelper( "contributor-attribution", function( post, fileName, fn )
9393
// Read contributors from git file information
9494
grunt.utils.spawn({
9595
cmd: "git",
96-
args: [ "log", "--format=%aN <%aE>", fileName ]
96+
args: [
97+
"log",
98+
"--follow", // Trace history through file rename operations
99+
"--diff-filter=AM", // Only consider "Add" and "Modify" operations
100+
"--format=%aN <%aE>",
101+
fileName
102+
]
97103
}, function( err, result ) {
98104
if ( err ) {
99105
grunt.verbose.error();

0 commit comments

Comments
 (0)