def git_short_hash(): cmd = "git rev-parse --short HEAD" result = subprocess.run(cmd.split(" "), capture_output=True) if result.returncode == 0: hash = result.stdout.decode() if hash[-1] == "\n": hash = hash[:-1] return hash else: None
Categories: python
0 Comments