Lines Matching +full:- +full:- +full:git_args
3 # Use of this source code is governed by a BSD-style license that can be
20 def IsFullGitSHA(s: str) -> bool:
25 def CreateBranch(repo: Union[Path, str], branch: str) -> None:
39 subprocess.check_output(["git", "-C", repo, "reset", "HEAD", "--hard"])
44 def DeleteBranch(repo: Union[Path, str], branch: str) -> None:
59 subprocess.run(["git", "-C", repo] + cmd, check=True)
61 run_checked(["checkout", "-q", "m/main"])
62 run_checked(["reset", "-q", "HEAD", "--hard"])
63 run_checked(["branch", "-q", "-D", branch])
68 ) -> None:
79 with tempfile.NamedTemporaryFile(mode="w+t", encoding="utf-8") as f:
83 subprocess.check_output(["git", "commit", "-F", f.name], cwd=repo)
92 ) -> CommitContents:
101 wip: Whether to upload the change as a work-in-progress.
115 git_args = [
118 "--yes",
119 f'--reviewers={",".join(reviewers)}' if reviewers else "--ne",
120 "--no-verify",
121 f"--br={branch}",
125 git_args.append(f'--cc={",".join(cc)}')
127 git_args.append("--wip")
130 git_args,
133 encoding="utf-8",
139 r"https?://[\w-]*-review.googlesource.com/c/.*/([0-9]+)",