Skip to content

Commit

Permalink
Sort by descending author date.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Feb 25, 2014
1 parent 2f54d3b commit 99cb0fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ exports.getSha = function(repository, revision, callback) {
};

exports.getBranchCommits = function(repository, callback) {
child.exec("git for-each-ref refs/heads/ --format='%(objectname)\t%(refname:short)\t%(authordate:iso8601)\t%(authoremail)'", {cwd: repository}, function(error, stdout) {
child.exec("git for-each-ref refs/heads/ --sort=-authordate --format='%(objectname)\t%(refname:short)\t%(authordate:iso8601)\t%(authoremail)'", {cwd: repository}, function(error, stdout) {
if (error) return callback(error);
callback(null, stdout.split("\n").map(function(line) {
var fields = line.split("\t"),
Expand Down

0 comments on commit 99cb0fb

Please sign in to comment.