• Home
  • Raw
  • Download

Lines Matching full:git

30 """Parse a DEPS file and git checkout all of the dependencies.
35 GIT_EXECUTABLE: path to "git" binary; if unset, will look for one of
36 ['git', 'git.exe', 'git.bat'] in your default path.
43 Git Config:
46 git config sync-deps.disable true
50 git config --unset sync-deps.disable
63 """Find the git executable.
72 searchlist = ['git', 'git.exe', 'git.bat']
76 for git in searchlist:
80 version_info = subprocess.check_output([git, '--version']).decode('utf-8')
81 match = re.search("^git version (\d+)\.(\d+)",version_info)
90 return (git,major,minor)
108 def git_repository_sync_is_disabled(git, directory): argument
111 [git, 'config', 'sync-deps.disable'], cwd=directory)
117 def is_git_toplevel(git, directory): argument
118 """Return true iff the directory is the top level of a Git repository.
121 git (string) the git executable
128 [git, 'rev-parse', '--show-toplevel'], cwd=directory).strip()
143 def git_checkout_to_directory(git, repo, checkoutable, directory, verbose, treeless): argument
144 """Checkout (and clone if needed) a Git repository.
147 git (string) the git executable
150 for passing to `git clone`.
153 passing to `git checkout`
162 Raises an exception if any calls to git fail.
173 [git, 'clone', '--quiet', '--single-branch'] + filter + branch + [repo, directory])
175 if not is_git_toplevel(git, directory):
176 # if the directory exists, but isn't a git repo, you will modify
178 sys.stdout.write('%s\n IS NOT TOP-LEVEL GIT DIRECTORY.\n' % directory)
182 if git_repository_sync_is_disabled(git, directory):
189 if 0 == subprocess.call([git, 'checkout', '--quiet', checkoutable],
191 # if this succeeds, skip slow `git fetch`.
199 [git, 'remote', 'set-url', 'origin', repo], cwd=directory)
201 subprocess.check_call([git, 'fetch', '--quiet'], cwd=directory)
203 subprocess.check_call([git, 'checkout', '--quiet', checkoutable], cwd=directory)
234 Raises git Exceptions.
236 (git,git_major,git_minor) = git_executable()
237 assert git
239 # --filter=tree:0 is available in git 2.20 and later
241 print("disabling --treeless: git is older than v2.20")
270 (git, repo, checkoutable, relative_directory, verbose, treeless))
294 prog = "git-sync-deps",
295 description = "Checkout git-based dependencies as specified by the DEPS file",
319 Only takes effect if using git 2.20 or later.