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

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

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

javascript - Restarting Supervisor and effect on FlaskSocketIO -