Skip to content

Commit fa4e329

Browse files
codexByron
authored andcommitted
fix(refs): keep missing references from resolving to lookalike tags
Fetching a valid tag named `refs/heads/unborn` stores it under `refs/tags/refs/heads/unborn`. When `HEAD` names the absent `refs/heads/unborn`, the CLI reference reader used `git rev-parse --verify` and guessed that tag instead. `head.is_valid()` became true and `IndexFile.commit()` gave the local initial commit a foreign parent. A tag named `REBASE_HEAD` also made `Repo.currently_rebasing_on()` report a rebase. Read direct references with `git show-ref --verify --hash` instead of revision parsing. Probe `REBASE_HEAD` with `git show-ref --exists` to distinguish absence from lookup errors, then use `SymbolicReference.dereference_recursive()` and `Repo.commit()` so the rebase reader shares exact lookup and symbolic-reference validation while retaining recursive annotated-tag peeling. Revision APIs intentionally retain Git's name guessing. Existing native Gix reference reads are unchanged; root-reference existence and reftable retain documented CLI fallbacks. Independently written regressions fetch the misleading tags into an unborn repository and cover SHA-1/SHA-256, files/reftable, forced CLI fallback, parentless initial commits, and absent/present/deleted `REBASE_HEAD`. Positive cases compare existing root refs, packed annotated tags, and detached `HEAD` against Git. All 16 original regressions failed on the CLI baseline; 14 failed under Gix, whose files-based initial commits were already protected. All 26 final reference regression cases pass on each backend. Post-commit review found that `SymbolicReference.commit` peels only one annotated tag; four new regressions failed with `TypeError` before switching to the existing recursive commit resolver. Broader validation exposed the existing GIX-17 grammar bug for this work branch: Gix reads `2313-supersede` as blob `23136a1d1dd1f02de7cde0f7b55f49d76ac77d55`, while Git reads the branch's commit. Extend the existing conservative CLI grammar guard to hexadecimal prefixes followed by a dash. A deterministic fixture verifies existing `<blob-prefix>-topic` and missing `<blob-prefix>-missing` names; its test fails before the guard and passes afterward. The GIX-17 ledger retains the upstream bug as open and records the evidence and adapter fallback. An additional exact-name check exposed GIX-33: when the root `REBASE_HEAD` is absent and `refs/tags/REBASE_HEAD` is symbolic, Gix's partial lookup returns that tag and native `symbolic_ref` dispatch follows its target. Git's equivalent `symbolic-ref --quiet --no-recurse` exits 1. Compare the returned native reference name with the requested bytes and retain CLI for a lookalike. Two new SHA-1/SHA-256 regressions fail before the guard and pass afterward, including forced CLI fallback. The ledger keeps this compatibility bug open until Gix exposes a verified exact-name mode. Final caller validation passes 98 CLI reference tests and 200 Gix reference/backend tests, with 24 passing subtests each. The preceding intermediate commit `9ddf778` also passed the full local suites: 1,969 CLI tests and 2,072 Gix tests, with 85 passing subtests each. Earlier targeted revision/installation checks passed 48 CLI tests and 50 Gix tests. Ruff check/format, mypy, basedpyright, ShellCheck, and `git diff --check` pass. Behavioral comparisons use `git version 2.54.0 (Apple Git-157)` and `GixPython 0.3.0`. The Git reference checkout at `6de20f6092dcf9bdb1c8efe03db4b70c82b423dd` documents exact lookup in `Documentation/git-show-ref.adoc`, name guessing in `Documentation/revisions.adoc`, and parentless root commits in `Documentation/git-commit-tree.adoc`. Source report and investigation: Keerthana-64's PR #2313. The replacement does not incorporate that PR's implementation or tests.
1 parent 4debc51 commit fa4e329

9 files changed

Lines changed: 179 additions & 11 deletions

File tree

‎doc/gix-backend.md‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,20 @@ and predate the current fallback; they do not establish native coverage.
392392
| `Repo.untracked_files` | Native directory walk | Extra status options and non-root command directories |
393393
| `Repo.ignored` | Native excludes with tracked-file suppression | Symlink/submodule traversal, unsupported path normalization, and unavailable path metadata |
394394

395+
Reference reads require an exact name, unlike revision APIs that intentionally
396+
apply Git's name guessing. `reference_info()` uses
397+
`Repository.try_find_reference()` and verifies the returned name for `HEAD` and
398+
fully qualified refs. Other root names, including `REBASE_HEAD`, retain the CLI
399+
fallback: GixPython's lookup accepts partial names, including symbolic lookalike
400+
tags for missing root names (GIX-33). Native `symbolic_ref` dispatch verifies the
401+
returned name and falls back for a lookalike. A native root-reference conversion
402+
needs verified existence and error behavior, including Git's distinction between
403+
an absent and an invalid reference. `Repo.currently_rebasing_on()` probes
404+
`git show-ref --exists` and then uses the shared exact reference reader; the
405+
existence probe remains CLI on both backends. `exact-refs.sh` tests missing names beside fetched tags with both object
406+
and reference formats. Reftable still uses GIX-1; this change claims no new native
407+
coverage. The symbolic lookalike mismatch remains open upstream as GIX-33.
408+
395409
Reference names and revisions are encoded with `surrogateescape` before calling
396410
GixPython's byte-capable `Target.Symbolic`, `Repository.try_find_reference`,
397411
`Repository.rev_parse_single`, `Repository.rev_parse` and `RefEdit` APIs.
@@ -935,7 +949,7 @@ identify the historical fixture where needed.
935949
| GIX-14 | Bug; missing API | For a linked worktree of a bare main repository, `is_bare()` returns true while `git rev-parse --is-bare-repository` returns false; `workdir()` does expose the worktree. Initial gitfile opening can retain a noncanonical target and use an arbitrary gitfile's location as the worktree, unlike Git. Discovery accepts undecodable HEADs until explicit `head()` decoding and ignores dangling `commondir` symlinks that Git rejects. Bindings flatten failure kinds into `gix.Error`. Windows also exposes adapter path-formatting differences and a worker panic on an undecodable `commondir`; see the Windows reproduction below. | Provide Git-compatible classification, canonical gitfile locations and layout validation, plus typed errors instead of panics. Format native locations compatibly with Git's command output. The adapter combines Gix metadata, reopens through Gix and forces HEAD decoding, retaining CLI for remaining validation/diagnostic gaps. Those workarounds do not close these compatibility bugs. A Git-strict mode must cover these cases; strict config and trust settings alone do not. |
936950
| GIX-15 | Bug | Native blame disagrees with Git even with Myers and rewrite tracking selected. In the fixture's `README.md`, lines 150 and 158 are attributed to the opposite commits. Incremental order also differs. | Attribution and incremental-output parity before replacing `Repo.blame` / `blame_incremental`. |
937951
| GIX-16 | Bug; missing API | Native archive streaming takes a tree rather than a commit. Its TAR omits Git's global PAX commit comment, leaves `export-subst` placeholders literal, and writes ordinary modes as `0644` where Git uses `0664`. | Commit-aware export substitution, metadata and permission parity. Both engines respected `export-ignore` in the probe. |
938-
| GIX-17 | Bug | Revision parsing accepts abbreviated IDs with `-dirty`, prefers the OID suffix over an exact describe-shaped tag, and treats escaped braces in message searches differently. | Git-compatible revision grammar and regex semantics. Existing `test_rev_parse.py` cases reproduce all three. |
952+
| GIX-17 | Bug (open) | Revision parsing accepts abbreviated IDs with `-dirty`, prefers the OID suffix over an exact describe-shaped tag, and treats escaped braces in message searches differently. With GixPython 0.3.0 and Git 2.54.0, `2313-supersede` resolves to blob `23136a1d1dd1f02de7cde0f7b55f49d76ac77d55` through Gix while Git resolves the existing branch's commit. The deterministic `rev-parse.sh hex-prefix-collision` fixture creates a branch named `<blob-prefix>-topic`: Gix returns the blob and also accepts `<blob-prefix>-missing`, which Git rejects. | Provide Git-compatible revision grammar and regex semantics. `_check_revision_grammar()` retains CLI for hexadecimal prefixes followed by a dash, as well as the existing guarded forms; this adapter workaround does not close the upstream bug. `test_rev_parse.py` reproduces these differences, including `test_rev_parse_hex_prefix_with_arbitrary_suffix`. |
939953
| GIX-18 | Bug; missing API | The tree-diff resource cache reads attributes from the index; Git also consults worktree attributes. Native binary classification with textconv configured can also differ even in `to_git` mode. | Independent attribute-source control and `--no-textconv` parity. Statistics currently fall back for any effective `diff` attribute. |
940954
| GIX-19 | Unverified | GixPython opens repositories with `extensions.compatObjectFormat`, but translation and object-write compatibility have not been validated. The installed Git reports `compatibility hash algorithm support requires Rust` when asked to translate an ID. This is an unvalidated capability guard, not evidence of missing native object mappings. | Verify compatibility-format reads, writes and OID translation against a Git build that supports them. All operations use CLI in the meantime. |
941955
| GIX-20 | Bug; missing API | `Target.Symbolic(name)` validates full names but rejects standalone names accepted by `git check-ref-format --allow-onelevel`. Four of 430 audited calls differed: `refs` twice, `hellothere`, and `valid_one_level_refname`. Further probes include digits, punctuation and Unicode (`1`, `A1`, `HEAD_1`, `A-B`, `A.B`, `Ä`). | Expose Git-compatible partial/one-level name validation, or correct the native restriction where appropriate. This is a binding/behavior shortcoming to revisit upstream; standalone names rejected natively retain CLI validation. |
@@ -951,6 +965,7 @@ identify the historical fixture where needed.
951965
| GIX-30 | Bug (open) | GixPython 0.2.0 `Commit.decode()` reports `encoding=None` when `encoding ISO-8859-1` follows `x-extra value`; Git 2.54.0 selects `ISO-8859-1` and renders Latin-1 identity/message bytes correctly. Gix retains `(b"encoding", b"ISO-8859-1")` in `extra_headers`, but its encoding field disagrees with Git. The `late-latin1` read-only `commit.sh` fixture in `test_deserialization_declared_encoding` reproduces this and asserts the fallback. | Recognize encoding headers in Git-compatible order. `object_metadata()` conservatively retains CLI when an encoding appears in `extra_headers`; it does not select the header in Python. Keep this bug open until an upstream fix or compatible mode is verified. |
952966
| GIX-31 | Bug (open) | GixPython 0.2.0 `Commit.decode()` rejects commit headers containing a CR-only or tab-only line with `object parsing failed, at gix-object/src/commit/decode.rs:20`. Git 2.54.0 accepts both objects with `fsck --strict`, continues through their header block and renders the later Latin-1 declaration and message correctly. A space-only continuation line decodes natively but retains the late encoding declaration in `extra_headers` (GIX-30). `test_deserialization_headers_end_at_empty_line` reproduces all three using the `commit.sh whitespace-headers` fixtures and checks Git's projection. | Accept Git-compatible header lines and end headers only at an empty line. The existing `object_metadata()` native decoder diagnostics fallback retains Git for CR/tab inputs; the existing GIX-30 fallback covers the space input. Neither fallback closes these bugs. |
953967
| GIX-32 | Missing capability (open); no demonstrated Git compatibility mismatch | Windows CI on GixPython 0.3.0, Git 2.56.0.windows.2 and CPython 3.12.10 enumerates the non-UTF-8 packed names in `legacy-refs.sh`, but exact byte-name lookup selects `Reference.read: CLI: native read diagnostics`; the no-CLI guard fails for SHA-1 and SHA-256. POSIX lookup succeeds. Git's Windows CLI likewise cannot address those original bytes through UTF-16 arguments, so there is no demonstrated equivalent Windows CLI operand. Git enumeration does preserve both names. | Provide native Windows packed-reference lookup for byte names without first converting the name to a loose-reference filesystem path. Keep `reference_info()`'s existing diagnostic fallback; `test_non_utf8_tag_names_preserve_bytes` checks it on Windows. Resolution coverage and native claims remain POSIX-only. The upstream lookup source attempts loose-path conversion before consulting packed refs; CI demonstrates the fallback, but does not capture the underlying Gix error text. |
968+
| GIX-33 | Bug (open); missing exact-name mode | With Git 2.54.0 and GixPython 0.3.0, `exact-refs.sh sha1 files symbolic` makes `refs/tags/REBASE_HEAD` a symbolic ref to another tag while the root `REBASE_HEAD` is absent. `Repository.try_find_reference("REBASE_HEAD")` returns that tag; native `_symbolic_ref` formerly returned its target, whereas `git symbolic-ref --quiet --no-recurse -- REBASE_HEAD` exits 1. GitPython's root-reference object read consequently returned a commit through Gix and raised `ValueError` through CLI. SHA-256 reproduces the same mismatch. | Expose an exact-name lookup mode, including root references, whose absence and error behavior matches Git. `_symbolic_ref()` compares the native reference's name with the requested bytes and selects CLI for a lookalike. `test_missing_root_reference_does_not_follow_symbolic_lookalike_tag` verifies parity and forced CLI fallback. This adapter guard does not close the upstream compatibility bug. |
954969

955970
The PR #2306 regression exposed an adapter ownership-check bypass in both
956971
backends: `Repo`'s automatic `GIT_DIR` made Git 2.54.0 treat hook execution as

‎doc/source/changes.rst‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ Git executable and safety
5454
API changes
5555
-----------
5656

57+
* Reference reads require the exact name. A missing branch no longer resolves to
58+
a similarly named tag, so an unborn branch's initial commit has no parent.
59+
A tag named ``REBASE_HEAD`` no longer reports a rebase in progress. Revision
60+
APIs such as ``Repo.commit(rev)`` retain Git's name guessing.
5761
* Packed tag names containing non-UTF-8 bytes are represented losslessly as
5862
surrogate-escaped strings. ``safe_encode()`` recovers their original bytes,
5963
and Gix reference validation and resolution receive those bytes directly.

‎git/_backend.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def _canonical_repository(repo: Any) -> Any:
166166

167167

168168
def _check_revision_grammar(ref: str) -> None:
169-
if ref.startswith(":/") or "^{/" in ref or "-dirty" in ref or re.search(r"-\d+-g[0-9a-fA-F]+", ref):
169+
if ref.startswith(":/") or "^{/" in ref or "-dirty" in ref or re.search(r"-\d+-g[0-9a-fA-F]+|^[0-9a-fA-F]+-", ref):
170170
raise _Unsupported("revision grammar differences (GIX-17)")
171171

172172

@@ -363,7 +363,7 @@ def _symbolic_ref(repo: Any, args: List[str], kwargs: Dict[str, Any]) -> bytes:
363363
if len(args) != 4 or args[:3] != ["--quiet", "--no-recurse", "--"]:
364364
raise _Unsupported("reference mutation or options")
365365
reference = repo.try_find_reference(safe_encode(args[-1]))
366-
if reference is None:
366+
if reference is None or reference.name() != safe_encode(args[-1]):
367367
raise _Unsupported("missing reference diagnostics")
368368
target = reference.target().try_name()
369369
if target is None:

‎git/refs/symbolic.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,8 @@ def _get_ref_info_helper(
198198
if exc.status != 1:
199199
raise ValueError("Invalid symbolic reference %r" % path) from exc
200200
try:
201-
oid = repo.git._call_process_safe("rev_parse", "--verify", "--end-of-options", path)
201+
# Revision parsing can guess a tag when the exact reference is absent.
202+
oid = repo.git._call_process_safe("show_ref", "--verify", "--hash", "--", path)
202203
except GitCommandError as exc:
203204
raise ValueError("Reference at %r does not exist or is invalid" % path) from exc
204205
if not repo.re_hexsha_only.fullmatch(oid):

‎git/repo/base.py‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
)
3636
from git.index import IndexFile
3737
from git.objects import Submodule, RootModule, Commit
38-
from git.refs import HEAD, Head, Reference, TagReference
38+
from git.refs import HEAD, Head, Reference, SymbolicReference, TagReference
3939
from git.remote import Remote, _T_RemoteName, add_progress, to_progress_instance
4040
from git.util import (
4141
Actor,
@@ -88,7 +88,6 @@
8888
if TYPE_CHECKING:
8989
from git.objects import Tree
9090
from git.objects.submodule.base import UpdateProgress
91-
from git.refs.symbolic import SymbolicReference
9291
from git.remote import RemoteProgress
9392
from git.util import IterableList
9493

@@ -1964,11 +1963,11 @@ def currently_rebasing_on(self) -> Commit | None:
19641963
"""
19651964
if not self.git_dir:
19661965
return None
1967-
status, oid, stderr = self.git._call_process_safe(
1968-
"rev_parse", "--verify", "--quiet", "REBASE_HEAD", with_extended_output=True, with_exceptions=False
1966+
status, stdout, stderr = self.git._call_process_safe(
1967+
"show_ref", "--exists", "--", "REBASE_HEAD", with_extended_output=True, with_exceptions=False
19691968
)
1970-
if status == 1:
1969+
if status == 2:
19711970
return None
19721971
if status:
1973-
raise GitCommandError("git rev-parse", status, stderr, oid)
1974-
return self.commit(oid)
1972+
raise GitCommandError("git show-ref", status, stderr, stdout)
1973+
return self.commit(SymbolicReference.dereference_recursive(self, "REBASE_HEAD"))

‎test/test_refs.py‎

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,113 @@ def test_head_rename_retains_literal_prefixed_branch_name(object_format):
163163
assert repo.heads.topic.commit == original_topic
164164

165165

166+
@pytest.mark.parametrize("object_format", ["sha1", "sha256"])
167+
@pytest.mark.parametrize("ref_format", ["files", "reftable"])
168+
@pytest.mark.parametrize("force_cli", [False, True])
169+
def test_reference_lookup_does_not_guess_missing_names(object_format, ref_format, force_cli):
170+
with fixture_repo("exact-refs.sh", object_format, ref_format) as repo:
171+
status, _, _ = repo.git.rev_parse(
172+
"--verify", "--quiet", "HEAD", with_extended_output=True, with_exceptions=False
173+
)
174+
assert status == 1
175+
with patch.object(_backend, "gix", None) if force_cli else contextlib.nullcontext():
176+
for path in (
177+
"refs/heads/unborn",
178+
"REBASE_HEAD",
179+
"ORIG_HEAD",
180+
"refs/tags/missing",
181+
"refs/remotes/origin/missing",
182+
):
183+
tag = TagReference(repo, "refs/tags/" + path)
184+
assert tag.commit == repo.commit(tag.path)
185+
status, _, _ = repo.git.show_ref(
186+
"--exists", "--", path, with_extended_output=True, with_exceptions=False
187+
)
188+
assert status == 2
189+
with pytest.raises(ValueError, match="does not exist or is invalid"):
190+
SymbolicReference(repo, path).object
191+
assert not repo.head.is_valid()
192+
with pytest.raises(ValueError):
193+
repo.head.commit
194+
# Revision APIs deliberately retain Git's name guessing.
195+
assert repo.commit("REBASE_HEAD") == repo.tags.REBASE_HEAD.commit
196+
assert repo.tags["nested/release"].object.type == "tag"
197+
198+
199+
@pytest.mark.parametrize("object_format", ["sha1", "sha256"])
200+
def test_missing_root_reference_does_not_follow_symbolic_lookalike_tag(object_format):
201+
with fixture_repo("exact-refs.sh", object_format, "files", "symbolic") as repo:
202+
assert repo.tags.REBASE_HEAD.commit == repo.tags["refs/heads/unborn"].commit
203+
status, _, _ = repo.git.symbolic_ref(
204+
"--quiet", "--no-recurse", "--", "REBASE_HEAD", with_extended_output=True, with_exceptions=False
205+
)
206+
assert status == 1
207+
for force_cli in (False, True):
208+
with patch.object(_backend, "gix", None) if force_cli else contextlib.nullcontext():
209+
with pytest.raises(ValueError, match="does not exist or is invalid"):
210+
SymbolicReference(repo, "REBASE_HEAD").object
211+
212+
213+
@pytest.mark.parametrize("object_format", ["sha1", "sha256"])
214+
@pytest.mark.parametrize("ref_format", ["files", "reftable"])
215+
def test_initial_commit_does_not_inherit_lookalike_tag_history(object_format, ref_format):
216+
with fixture_repo("exact-refs.sh", object_format, ref_format, write=True) as repo:
217+
foreign = repo.tags["refs/heads/unborn"].commit
218+
initial = repo.index.commit("Local initial commit")
219+
assert initial.parents == []
220+
assert repo.head.commit == initial
221+
assert repo.tags["refs/heads/unborn"].commit == foreign
222+
assert repo.git.rev_list("--count", "HEAD") == "1"
223+
224+
225+
@pytest.mark.parametrize("object_format", ["sha1", "sha256"])
226+
@pytest.mark.parametrize("ref_format", ["files", "reftable"])
227+
def test_rebase_detection_ignores_tag_named_rebase_head(object_format, ref_format):
228+
with fixture_repo("exact-refs.sh", object_format, ref_format, write=True) as repo:
229+
assert repo.currently_rebasing_on() is None
230+
replayed = repo.tags.REBASE_HEAD.commit
231+
repo.git.update_ref("REBASE_HEAD", replayed.hexsha)
232+
assert repo.currently_rebasing_on() == replayed
233+
repo.git.update_ref("-d", "REBASE_HEAD")
234+
assert repo.currently_rebasing_on() is None
235+
236+
237+
@pytest.mark.parametrize("object_format", ["sha1", "sha256"])
238+
@pytest.mark.parametrize("ref_format", ["files", "reftable"])
239+
def test_rebase_detection_peels_nested_annotated_tags(object_format, ref_format):
240+
with fixture_repo("exact-refs.sh", object_format, ref_format, "nested", write=True) as repo:
241+
tag = repo.tags["nested/outer"].object
242+
assert tag.object.type == "tag"
243+
repo.git.update_ref("REBASE_HEAD", tag.hexsha)
244+
expected = repo.tags.REBASE_HEAD.commit
245+
assert repo.git.rev_parse("REBASE_HEAD^{commit}") == expected.hexsha
246+
assert repo.currently_rebasing_on() == expected
247+
248+
249+
@pytest.mark.parametrize("object_format", ["sha1", "sha256"])
250+
@pytest.mark.parametrize("ref_format", ["files", "reftable"])
251+
def test_exact_reference_reads_preserve_existing_targets(object_format, ref_format):
252+
with fixture_repo("exact-refs.sh", object_format, ref_format, "existing", write=True) as repo:
253+
commit = repo.tags.REBASE_HEAD.commit
254+
paths = [
255+
"HEAD",
256+
"refs/heads/unborn",
257+
"FETCH_HEAD",
258+
"refs/tags/nested/release",
259+
"refs/stash",
260+
"ORIG_HEAD",
261+
"MERGE_HEAD",
262+
"REBASE_HEAD",
263+
]
264+
repo.git.pack_refs("--all")
265+
for path in paths:
266+
expected = repo.git.rev_parse("--verify", path)
267+
assert SymbolicReference(repo, path).object.hexsha == expected
268+
repo.git.update_ref("--no-deref", "HEAD", commit.hexsha)
269+
assert repo.head.is_detached
270+
assert repo.head.commit == commit
271+
272+
166273
class TestRefs(TestBase):
167274
def test_from_path(self):
168275
# Should be able to create any reference directly.

‎test/test_rev_parse.py‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,18 @@ def test_rev_parse_names_hex_and_describe_forms(rev_parse_repo):
8080
assert collision.rev_parse(describe_name).hexsha == release.hexsha
8181

8282

83+
def test_rev_parse_hex_prefix_with_arbitrary_suffix():
84+
with fixture_repo("rev-parse.sh", "hex-prefix-collision") as repo:
85+
prefix = (Path(repo.working_tree_dir).parent / "hex-prefix").read_text().strip()
86+
name = prefix + "-topic"
87+
assert repo.rev_parse(name).hexsha == repo.git.rev_parse("--verify", name)
88+
missing = prefix + "-missing"
89+
with pytest.raises(GitCommandError):
90+
repo.git.rev_parse("--verify", missing)
91+
with pytest.raises(BadName):
92+
repo.rev_parse(missing)
93+
94+
8395
def test_rev_parse_navigation_and_peeling(rev_parse_repo):
8496
repo = rev_parse_repo["repo"]
8597
root = rev_parse_repo["root"]

0 commit comments

Comments
 (0)