projects
/
gitlive
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ca99eff
)
GitLogParser.js
author
Alan Knowles
<alan@roojs.com>
Mon, 3 Apr 2017 03:42:32 +0000
(11:42 +0800)
committer
Alan Knowles
<alan@roojs.com>
Mon, 3 Apr 2017 03:42:32 +0000
(11:42 +0800)
GitLogParser.js
patch
|
blob
|
history
diff --git
a/GitLogParser.js
b/GitLogParser.js
index
5ad4c92
..
e6302f5
100644
(file)
--- a/
GitLogParser.js
+++ b/
GitLogParser.js
@@
-254,10
+254,17
@@
for (var h in GitLogParser.shours) {
print (" " + r.tot + " : " + r.desc);
});
}
print (" " + r.tot + " : " + r.desc);
});
}
-
-for (var desc in totals) {
- print (" " + totals[desc] + " : " + desc);
+print("\n\n" + h+': Totals (' + htot +')');
+
+var hsum = [];
+for (var desc in totals) {
+ hsum.push({ desc : desc, tot : totals[desc] });
}
}
+hsum.sort(function(a,b) { if (a.tot == b.tot) { return 0; } return a.tot < b.tot ? 1 : -1 });
+print("\n\nDay Total (" + htot +')');
+hsum.forEach(function(r) {
+ print (" " + r.tot + " : " + r.desc);
+});
//print(JSON.stringify(GitLogParser.shours,null,4));
//print(JSON.stringify(GitLogParser.shours,null,4));