Lines Matching refs:git_dir
65 def _resolve_sha(git_dir: str, sha: str) -> str:
70 ['git', '-C', git_dir, 'rev-parse', sha],
82 def _log_stream(git_dir: str, root_sha: str,
88 git_dir,
125 def _shas_between(git_dir: str, base_ref: str,
130 git_dir,
138 def _rev_parse(git_dir: str, ref: str) -> str:
140 ['git', '-C', git_dir, 'rev-parse', ref],
152 def find_common_parent_commit(git_dir: str, ref_a: str, ref_b: str) -> str:
154 ['git', '-C', git_dir, 'merge-base', ref_a, ref_b],
159 def find_reverts(git_dir: str, across_ref: str, root: str) -> t.List[Revert]:
161 across_sha = _rev_parse(git_dir, across_ref)
162 root_sha = _rev_parse(git_dir, root)
164 common_ancestor = find_common_parent_commit(git_dir, across_sha, root_sha)
169 intermediate_commits = set(_shas_between(git_dir, across_sha, root_sha))
176 for sha, commit_message in _log_stream(git_dir, root_sha, across_sha):
181 resolved_reverts = sorted(set(_resolve_sha(git_dir, x) for x in reverts))
190 ['git', '-C', git_dir, 'cat-file', '-t', reverted_sha],
233 for revert in find_reverts(opts.git_dir, opts.base_ref, root):