Lines Matching refs:git
16 """Class to manage git branches.
21 Assumes current working directory is a git repository.
43 OSError: the git executable disappeared.
44 subprocess.CalledProcessError: git returned unexpected status.
46 isn't clean on exit, or git can't be found.
69 raise Exception('Git can\'t be found.')
84 git, vsp = self._git, self._vsp
95 vsp.check_call([git, 'stash', 'save'])
98 [git, 'checkout', '-q', '-b',
102 git, vsp = self._git, self._vsp
105 status = vsp.check_output([git, 'status', '-s'])
106 raise Exception('git checkout not clean:\n%s' % status)
107 vsp.check_call([git, 'checkout', '-q', self._original_branch])
109 vsp.check_call([git, 'stash', 'pop'])
112 vsp.check_call([git, 'branch', '-D', self._branch_name])
122 A string suitable for passing to `git checkout` later.
124 git = git_executable()
127 full_branch = vsp.strip_output([git, 'symbolic-ref', 'HEAD'])
131 return vsp.strip_output([git, 'rev-parse', 'HEAD'])
134 def test_git_executable(git):
135 """Test the git executable.
138 git: git executable path.
144 subprocess.call([git, '--version'], stdout=devnull)
151 """Find the git executable.
164 for git in ('git', 'git.exe', 'git.bat'):
165 if test_git_executable(git):
166 return git