Lines Matching refs:git_dir
81 def _resolve_sha(git_dir: str, sha: str) -> str:
86 ['git', '-C', git_dir, 'rev-parse', sha],
98 def _log_stream(git_dir: str, root_sha: str,
104 git_dir,
139 def _shas_between(git_dir: str, base_ref: str, head_ref: str) -> Iterable[str]:
143 git_dir,
151 def _rev_parse(git_dir: str, ref: str) -> str:
153 ['git', '-C', git_dir, 'rev-parse', ref],
164 def _find_common_parent_commit(git_dir: str, ref_a: str, ref_b: str) -> str:
167 ['git', '-C', git_dir, 'merge-base', ref_a, ref_b],
172 def find_reverts(git_dir: str, across_ref: str, root: str) -> List[Revert]:
177 across_sha = _rev_parse(git_dir, across_ref)
178 root_sha = _rev_parse(git_dir, root)
180 common_ancestor = _find_common_parent_commit(git_dir, across_sha, root_sha)
185 intermediate_commits = set(_shas_between(git_dir, across_sha, root_sha))
192 for sha, commit_message in _log_stream(git_dir, root_sha, across_sha):
197 resolved_reverts = sorted(set(_resolve_sha(git_dir, x) for x in reverts))
206 ['git', '-C', git_dir, 'cat-file', '-t', reverted_sha],
257 for revert in find_reverts(opts.git_dir, opts.base_ref, root):