• Home
  • Raw
  • Download

Lines Matching full:git

8 """Parse a DEPS file and git checkout all of the dependencies.
14 GIT_EXECUTABLE: path to "git" binary; if unset, will look for git in
22 Git Config:
25 git config sync-deps.disable true
29 git config --unset sync-deps.disable
40 """Find the git executable.
46 searchlist = ['git']
50 for git in searchlist:
52 subprocess.call([git, '--version'], stdout=devnull)
55 return git
76 def git_repository_sync_is_disabled(git, directory): argument
79 [git, 'config', 'sync-deps.disable'], cwd=directory)
85 def is_git_toplevel(git, directory): argument
86 """Return true iff the directory is the top level of a Git repository.
89 git (string) the git executable
96 [git, 'rev-parse', '--show-toplevel'], cwd=directory).strip()
111 def git_checkout_to_directory(git, repo, checkoutable, directory, verbose): argument
112 """Checkout (and clone if needed) a Git repository.
115 git (string) the git executable
118 for passing to `git clone`.
121 passing to `git checkout`
128 Raises an exception if any calls to git fail.
132 [git, 'clone', '--quiet', repo, directory])
134 if not is_git_toplevel(git, directory):
135 # if the directory exists, but isn't a git repo, you will modify
137 sys.stdout.write('%s\n IS NOT TOP-LEVEL GIT DIRECTORY.\n' % directory)
141 if git_repository_sync_is_disabled(git, directory):
148 if 0 == subprocess.call([git, 'checkout', '--quiet', checkoutable],
150 # if this succeeds, skip slow `git fetch`.
158 [git, 'remote', 'set-url', 'origin', repo], cwd=directory)
160 subprocess.check_call([git, 'fetch', '--quiet'], cwd=directory)
162 subprocess.check_call([git, 'checkout', '--quiet', checkoutable], cwd=directory)
184 Raises git Exceptions.
186 git = git_executable()
187 assert git
219 (git, repo, checkoutable, relative_directory, verbose))