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:
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user