Improve upstream parity for level fixtures

- Add native per-level fixtures for complex histories, tags, branch graphs, rebases, resets, restores, stashes, and local remotes.
- Strengthen repository inspection so branch commit counts, remote-tracking branches, and detached tag checkouts reflect real Git state.
- Align Fetch, Pull, Push Branch, Branch At, and Rebase validators/tests with upstream-style repository state.
- Keep the prompt callout and native filesystem tab-completion fixes from the previous batch.
This commit is contained in:
Joe Tretter
2026-05-07 09:21:04 -05:00
parent 8e88b5e7c5
commit 91e2df3ffe
11 changed files with 526 additions and 17 deletions

View File

@@ -13,7 +13,7 @@ internal fun pushBranchLevel(): Level = level(
description = "You've made some changes to a local branch and want to share it, but aren't yet ready to merge it with the 'master' branch. Push only 'test_branch' to the remote repository",
hints = listOf("Investigate the options in `git push` using `git push --help`"),
commandSuggestions = listOf("git push origin test_branch"),
setup = { RepoState(initialized = true, branches = mapOf("master" to 2, "other_branch" to 3, "test_branch" to 4), remotes = mapOf("origin" to "remote"), headBranch = "test_branch") },
setup = { RepoState(initialized = true, branches = mapOf("master" to 2, "other_branch" to 3, "test_branch" to 4), remotes = mapOf("origin" to "remote"), headBranch = "master") },
validator = repoPredicate { repo -> "origin/test_branch" in repo.pushedBranches && "origin/master" !in repo.pushedBranches && "origin/other_branch" !in repo.pushedBranches },
testCases = listOf(
levelTestCase("push named branch", "git push origin test_branch"),