moduleDistribution.VcsRevision.Git(getRevision)whereimportSystem.ProcessimportSystem.Exit-- | Nothing if we're not in a git repo, Just (hash,modified) if we're in a repo.getRevision::IO(Maybe(String,Bool))getRevision=do(exit,commit,_)<-readProcessWithExitCode"git"["log","--format=%h","-n","1"]""caseexitofExitSuccess->do(exit',_,_)<-readProcessWithExitCode"git"["diff","--quiet"]""return$Just(initcommit,exit'/=ExitSuccess)_->returnNothing