Lines Matching refs:git
57 def git(command):
64 command = ["git"] + command
67 tmpfile = tempfile.TemporaryFile(prefix="git-nits")
87 """Return the root of the current git workspace"""
89 p = git('rev-parse --git-dir')
92 sys.stderr.write("Failed finding git workspace\n")
100 """Return the current git branch"""
102 p = git('branch')
105 sys.stderr.write("Failed finding git branch\n")
116 """Return the parent of the current git branch.
124 p = git("for-each-ref --format=%(refname:short) %(upstream:short) " +
128 sys.stderr.write("Failed finding git parent branch\n")
141 """Return a list of any checkin comments on this git branch"""
143 p = git('log --pretty=tformat:%%B:SEP: %s..' % parent)
146 sys.stderr.write("Failed getting git comments\n")
158 p = git("log --name-only --pretty=format: %s.. %s" %
162 sys.stderr.write("Failed building file-list from git\n")
178 [os.path.join(root, ".git", "%s.NOT" % cmd),
203 res = git("diff %s HEAD %s" % (parent, f))
206 # that git returned non-zero because the file doesn't exist, but it
207 # could also fail if git can't create a new file or it can't be
209 # invocations of git().
379 if cmd == 'git-pbchk':
391 sys.stderr.write("failed to run git:\n %s\n" % str(e))