Skip to content

Instantly share code, notes, and snippets.

@OrenBochman
Created October 7, 2013 17:17
Show Gist options
  • Save OrenBochman/6871512 to your computer and use it in GitHub Desktop.
Save OrenBochman/6871512 to your computer and use it in GitHub Desktop.
logging mediawiki core
https://www.kernel.org/pub/software/scm/git/docs/git-log.html
git log --pretty=format:'%h|%at|%d|%an|%ce|%s' --date=short > log.txt
%h: abbreviated commit hash
%at: author date, UNIX timestamp
%d: ref names, like the --decorate option of git-log(1)
%an: author name
%ce: committer email
%s: subject
Git log analysis
========================================================
Loading a git log file:
```{r load git log file}
setwd("~/R/LogAnalysis/git logs")
rm(list=ls(all=TRUE))
#log<-scan(file="log.txt",sep=",",nmax=10,encoding ="UTF-8",what=list("integer","integer","character","character","character","character"))
as.POSIXct1<-function(x){as.POSIXct(x,origin="1970-01-01",digits=10)}
logg<-read.delim(file="log.txt",sep=",",header = FALSE,
fill=FALSE, quote = "\"",comment.char = "",dec = ".",
as.is=c(TRUE,TRUE,FALSE,FALSE,TRUE),
flush = TRUE,nrows=51042,fileEncoding = "UTF-8",row.names = NULL,
colClasses<-c("as.hexmode","as.POSIXct1","character","character","character"),
#colClasses="character",
col.names <-list("hash","author date","author name","committer email","subject"))
logg[1:2,1:4]
summary(logg)
#print("ễ")
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment