• Home
  • Raw
  • Download

Lines Matching full:git

30 """Parse a DEPS file and git checkout all of the dependencies.
36 GIT_EXECUTABLE: path to "git" binary; if unset, will look for one of
37 ['git', 'git.exe', 'git.bat'] in your default path.
44 Git Config:
47 git config sync-deps.disable true
51 git config --unset sync-deps.disable
64 """Find the git executable.
70 searchlist = ['git', 'git.exe', 'git.bat']
74 for git in searchlist:
76 subprocess.call([git, '--version'], stdout=devnull)
79 return git
100 def git_repository_sync_is_disabled(git, directory): argument
103 [git, 'config', 'sync-deps.disable'], cwd=directory)
109 def is_git_toplevel(git, directory): argument
110 """Return true iff the directory is the top level of a Git repository.
113 git (string) the git executable
120 [git, 'rev-parse', '--show-toplevel'], cwd=directory).strip()
135 def git_checkout_to_directory(git, repo, checkoutable, directory, verbose): argument
136 """Checkout (and clone if needed) a Git repository.
139 git (string) the git executable
142 for passing to `git clone`.
145 passing to `git checkout`
152 Raises an exception if any calls to git fail.
156 [git, 'clone', '--quiet', repo, directory])
158 if not is_git_toplevel(git, directory):
159 # if the directory exists, but isn't a git repo, you will modify
161 sys.stdout.write('%s\n IS NOT TOP-LEVEL GIT DIRECTORY.\n' % directory)
165 if git_repository_sync_is_disabled(git, directory):
172 if 0 == subprocess.call([git, 'checkout', '--quiet', checkoutable],
174 # if this succeeds, skip slow `git fetch`.
182 [git, 'remote', 'set-url', 'origin', repo], cwd=directory)
184 subprocess.check_call([git, 'fetch', '--quiet'], cwd=directory)
186 subprocess.check_call([git, 'checkout', '--quiet', checkoutable], cwd=directory)
213 Raises git Exceptions.
215 git = git_executable()
216 assert git
244 (git, repo, checkoutable, relative_directory, verbose))