projects
/
gitlive
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
539fd0c
)
GitLogParser.js
author
Alan Knowles
<alan@roojs.com>
Mon, 3 Apr 2017 03:40:29 +0000
(11:40 +0800)
committer
Alan Knowles
<alan@roojs.com>
Mon, 3 Apr 2017 03:40:29 +0000
(11:40 +0800)
GitLogParser.js
patch
|
blob
|
history
diff --git
a/GitLogParser.js
b/GitLogParser.js
index
aa3fd8a
..
de19111
100644
(file)
--- a/
GitLogParser.js
+++ b/
GitLogParser.js
@@
-238,7
+238,7
@@
print("\nShort Idle : " +(totals.shortidle/60).toFixed(2) +"h" );
print("Worked: " + (totals.work/60).toFixed(2) +"h\n" );
print("Worked: " + (totals.work/60).toFixed(2) +"h\n" );
-
+var totals = {};
for (var h in GitLogParser.shours) {
var hsum = [];
for (var h in GitLogParser.shours) {
var hsum = [];
@@
-246,6
+246,7
@@
for (var h in GitLogParser.shours) {
for (var desc in GitLogParser.shours[h]) {
htot += (GitLogParser.shours[h][desc]/60000).toFixed(2)*1;
hsum.push({ desc : desc, tot : (GitLogParser.shours[h][desc]/60000).toFixed(2)*1 })
for (var desc in GitLogParser.shours[h]) {
htot += (GitLogParser.shours[h][desc]/60000).toFixed(2)*1;
hsum.push({ desc : desc, tot : (GitLogParser.shours[h][desc]/60000).toFixed(2)*1 })
+ totals[desc] = (typeof(totals[desc]) == 'undefined' ? 0 : totals[desc]) + ((GitLogParser.shours[h][desc]/60000).toFixed(2)*1);
}
hsum.sort(function(a,b) { if (a.tot == b.tot) { return 0; } return a.tot < b.tot ? 1 : -1 });
print("\n\n" + h+': Total (' + htot +')');
}
hsum.sort(function(a,b) { if (a.tot == b.tot) { return 0; } return a.tot < b.tot ? 1 : -1 });
print("\n\n" + h+': Total (' + htot +')');