Lines Matching +full:- +full:- +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.
42 GIT_SYNC_DEPS_QUIET: if set to non-empty string, suppress messages.
44 Git Config:
47 git config sync-deps.disable true
49 To re-enable sync:
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()
128 return s if len(s) <= length else s[:(length - 3)] + '...'
132 sys.stdout.write('%-*s @ %s\n' % (dlen, directory, checkoutable))
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`.
180 # If origin already points to repo, this is a quick no-op.
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
227 # Add OS-specific dependencies
244 (git, repo, checkoutable, relative_directory, verbose))
270 if '--help' in argv or '-h' in argv:
277 # os.path.join(os.path.dirname(deps_file_path), 'bin', 'fetch-gn')])