Lines Matching full:git_dir
91 def _resolve_sha(git_dir: str, sha: str) -> str:
96 ["git", "-C", git_dir, "rev-parse", sha],
112 git_dir: str, root_sha: str, end_at_sha: str
118 git_dir,
153 def _shas_between(git_dir: str, base_ref: str, head_ref: str) -> Iterable[str]:
157 git_dir,
165 def _rev_parse(git_dir: str, ref: str) -> str:
167 ["git", "-C", git_dir, "rev-parse", ref],
181 def _find_common_parent_commit(git_dir: str, ref_a: str, ref_b: str) -> str:
184 ["git", "-C", git_dir, "merge-base", ref_a, ref_b],
189 def find_reverts(git_dir: str, across_ref: str, root: str) -> List[Revert]:
190 """Finds reverts across `across_ref` in `git_dir`, starting from `root`.
194 across_sha = _rev_parse(git_dir, across_ref)
195 root_sha = _rev_parse(git_dir, root)
197 common_ancestor = _find_common_parent_commit(git_dir, across_sha, root_sha)
204 intermediate_commits = set(_shas_between(git_dir, across_sha, root_sha))
215 for sha, commit_message in _log_stream(git_dir, root_sha, across_sha):
221 set(_resolve_sha(git_dir, x) for x in reverts)
235 ["git", "-C", git_dir, "cat-file", "-t", reverted_sha],
275 "-C", "--git_dir", default=".", help="Git directory to use."
301 for revert in find_reverts(opts.git_dir, opts.base_ref, root):