/note
Created
March 26, 2015 16:01
Revisions
-
scottrogowski created this gist
Mar 26, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ #!/usr/bin/env python # Set a note on the current git branch using command line arguments # Usage: note this branch is broken import sys import subprocess import json if __name__ == '__main__': branch = subprocess.check_output("git rev-parse --abbrev-ref HEAD".split()).strip() note = ' '.join(sys.argv[1:]) cmd = "git config branch.%s.note" % (branch) subprocess.check_output(cmd.split() + [note])