r - Get the SHA of the version used when run -


is possible sha of version of code being run in r?

i have following code, outputs sha master head:

readme<-file("info.txt") writelines(paste(c("document produced using version",                     paste(readchar("./.git/refs/heads/master", 10)),                    "of code")),             readme) close(readme) 

but if makes mistake , accidentally runs code different branch? possible r active branch that? possibly this, activebranch figured out other bit of r code?

readme<-file("code version info.txt") writelines(paste(c("document produced using version",                     paste(readchar(paste("./.git/refs/heads/", activebranch, collapse = ""),                                    10)),                    "of git instructions")),             readme) close(readme) 


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -