Lines Matching +full:- +full:- +full:disable +full:- +full:verbose
41 GIT_SYNC_DEPS_QUIET: if set to non-empty string, suppress messages.
44 To disable syncing of a single repository:
46 git config sync-deps.disable true
48 To re-enable sync:
50 git config --unset sync-deps.disable
80 version_info = subprocess.check_output([git, '--version']).decode('utf-8')
106 return re.match('^[a-f0-9]{40}$', commit) is not None
110 disable = subprocess.check_output(
111 [git, 'config', 'sync-deps.disable'], cwd=directory)
112 return disable.lower().strip() in ['true', '1', 'yes', 'on']
128 [git, 'rev-parse', '--show-toplevel'], cwd=directory).strip()
136 return s if len(s) <= length else '...' + s[-(length - 3):]
140 sys.stdout.write('%-*s @ %s\n' % (dlen, directory, checkoutable))
143 def git_checkout_to_directory(git, repo, checkoutable, directory, verbose, treeless): argument
158 verbose (boolean): emit status info to stdout
167 # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
168 filter = ['--filter=tree:0'] if treeless else ['--filter=blob:none']
171 branch = [] if looks_like_raw_commit(checkoutable) else ['--branch={}'.format(checkoutable)]
173 [git, 'clone', '--quiet', '--single-branch'] + filter + branch + [repo, directory])
178 sys.stdout.write('%s\n IS NOT TOP-LEVEL GIT DIRECTORY.\n' % directory)
189 if 0 == subprocess.call([git, 'checkout', '--quiet', checkoutable],
192 if verbose:
197 # If origin already points to repo, this is a quick no-op.
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)
205 if verbose:
220 def git_sync_deps(deps_file_path, command_line_os_requests, verbose, treeless): argument
230 verbose (boolean): emit status info to stdout
239 # --filter=tree:0 is available in git 2.20 and later
241 print("disabling --treeless: git is older than v2.20")
253 # Add OS-specific dependencies
270 (git, repo, checkoutable, relative_directory, verbose, treeless))
276 git_sync_deps(recursive_path, command_line_os_requests, verbose)
294 prog = "git-sync-deps",
295 description = "Checkout git-based dependencies as specified by the DEPS file",
296 add_help=False # Because we want to print deps_os with -h option
298 argparser.add_argument("--help", "-h",
301 argparser.add_argument("--deps",
304 argparser.add_argument("--verbose",
307 help="be verbose: print status messages")
308 argparser.add_argument("--treeless",
312 Clone repos without trees (--filter=tree:0).
321 See https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
333 git_sync_deps(args.deps, args.os_requests, args.verbose, args.treeless)