Align level parity docs and fetch/status validation
- Add LevelsCompare.md with setup and validation comparisons against Gazler/githug. - Document that LevelsCompare.md must be updated when level behavior changes. - Track FETCH_HEAD count in RepoState so the Fetch level can match upstream validation. - Mirror upstream Status setup with staged files plus untracked database.yml. - Keep Fetch from being solved by pull despite native Git FETCH_HEAD behavior. - Bump app version and build debug APK.
This commit is contained in:
@@ -15,7 +15,15 @@ internal fun fetchLevel(): Level = level(
|
||||
description = "Looks like a new branch was pushed into our remote repository. Get the changes without merging them with the local repository",
|
||||
hints = listOf("Look up the 'git fetch' command"),
|
||||
commandSuggestions = listOf("git fetch origin"),
|
||||
setup = { RepoState(initialized = true, branches = mapOf("master" to 1), remotes = mapOf("origin" to "remote")) },
|
||||
setup = {
|
||||
RepoState(
|
||||
initialized = true,
|
||||
branches = mapOf("master" to 1),
|
||||
remotes = mapOf("origin" to "remote"),
|
||||
fetchedBranches = setOf("origin/master"),
|
||||
fetchHeadCount = 1,
|
||||
)
|
||||
},
|
||||
nativeSetup = {
|
||||
resetFiles()
|
||||
write("master_file")
|
||||
@@ -33,9 +41,9 @@ internal fun fetchLevel(): Level = level(
|
||||
true
|
||||
},
|
||||
validator = repoPredicate { repo ->
|
||||
"fetch" in repo.maintenanceActions &&
|
||||
"origin/new_branch" in repo.fetchedBranches &&
|
||||
repo.headBranch == "master"
|
||||
repo.branches.size == 1 &&
|
||||
repo.fetchHeadCount == 2 &&
|
||||
"pull" !in repo.maintenanceActions
|
||||
},
|
||||
testCases = listOf(
|
||||
levelTestCase("fetch origin", "git fetch origin"),
|
||||
|
||||
Reference in New Issue
Block a user