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

@@ -14,7 +14,11 @@ internal fun pullLevel(): Level = level(
hints = listOf("Check out the remote repositories and research `git pull`."),
commandSuggestions = listOf("git pull origin master"),
setup = { RepoState(initialized = true, remotes = mapOf("origin" to "remote"), branches = mapOf("master" to 1)) },
validator = repoPredicate { repo -> "origin/master" in repo.fetchedBranches },
validator = repoPredicate { repo ->
"origin/master" in repo.fetchedBranches &&
repo.files.any { it.name == "remote_file" && it.tracked } &&
repo.commits.size >= 2
},
testCases = listOf(
levelTestCase("pull explicit remote branch", "git pull origin master"),
levelTestCase("pull default origin", "git pull"),