Hi Mitchell,
thanks for the patch -- some comments below.
Am 26/11/2015 um 17:27 schrieb Mitchell Joblin:
Signed-off-by: Mitchell Joblin <mitchell.joblin.ext@xxxxxxxxxxx>
---
codeface/R/query.r | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/codeface/R/query.r b/codeface/R/query.r
index 4b44445..68fe018 100644
--- a/codeface/R/query.r
+++ b/codeface/R/query.r
@@ -188,16 +188,19 @@ get.commits.by.ranges <- function(conf, subset=NULL,
FUN=NULL) {
}
get.commits.by.date.con <- function(con, pid, start.date, end.date,
- commit.date=TRUE, commit.count=FALSE) {
+ count.type="none", commit.date=TRUE) {
if (commit.date==TRUE) {
date.type <- "commitDate"
} else {
date.type <- "authorDate"
}
- if (commit.count==TRUE) {
+ if (count.type=="commit") {
query <- "SELECT author, COUNT(*) as freq"
group.by <- " GROUP BY author"
+ } else if (count.type=="loc") {
+ query <- "SELECT author, SUM(DiffSize) as freq"
+ group.by <- " GROUP BY author"
} else {
query <- "SELECT *"
group.by <- NULL