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

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -