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:
@@ -631,6 +631,11 @@ class GitRepositoryRuntime private constructor(
|
||||
val exactTagResult = runGit(nativeGit, sandbox, listOf("describe", "--tags", "--exact-match"))
|
||||
val userNameResult = runGit(nativeGit, sandbox, listOf("config", "--get", "user.name"))
|
||||
val userEmailResult = runGit(nativeGit, sandbox, listOf("config", "--get", "user.email"))
|
||||
val fetchHeadCount = File(sandbox, ".git/FETCH_HEAD")
|
||||
.takeIf { it.isFile }
|
||||
?.readLines()
|
||||
?.count { it.isNotBlank() }
|
||||
?: 0
|
||||
val config = buildMap {
|
||||
userNameResult.outputLines.firstOrNull()
|
||||
?.takeIf { userNameResult.exitCode == 0 && it.isNotBlank() }
|
||||
@@ -704,6 +709,7 @@ class GitRepositoryRuntime private constructor(
|
||||
.map { it.removePrefix("*").trim() }
|
||||
.filter { it.isNotBlank() && " -> " !in it }
|
||||
.toSet(),
|
||||
fetchHeadCount = fetchHeadCount,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -738,9 +744,8 @@ class GitRepositoryRuntime private constructor(
|
||||
stashes = mergeDistinct(previousRepo.stashes, inspectedRepo.stashes + "stash@{${previousRepo.stashes.size}}"),
|
||||
)
|
||||
"fetch" -> {
|
||||
val remote = tokens.getOrNull(2)?.takeIf { !it.startsWith("-") } ?: "origin"
|
||||
inspectedRepo.copy(
|
||||
fetchedBranches = inspectedRepo.fetchedBranches + previousRepo.fetchedBranches + "$remote/master" + "$remote/feature_branch" + "$remote/new_branch",
|
||||
fetchedBranches = inspectedRepo.fetchedBranches + previousRepo.fetchedBranches,
|
||||
maintenanceActions = inspectedRepo.maintenanceActions + previousRepo.maintenanceActions + "fetch",
|
||||
)
|
||||
}
|
||||
@@ -749,6 +754,8 @@ class GitRepositoryRuntime private constructor(
|
||||
val branch = tokens.drop(2).lastOrNull()?.takeIf { !it.startsWith("-") && it != remote } ?: inspectedRepo.headBranch
|
||||
inspectedRepo.copy(
|
||||
fetchedBranches = inspectedRepo.fetchedBranches + previousRepo.fetchedBranches + "$remote/$branch",
|
||||
fetchHeadCount = inspectedRepo.fetchHeadCount,
|
||||
maintenanceActions = inspectedRepo.maintenanceActions + previousRepo.maintenanceActions + "pull",
|
||||
)
|
||||
}
|
||||
"push" -> {
|
||||
@@ -795,6 +802,7 @@ class GitRepositoryRuntime private constructor(
|
||||
else -> inspectedRepo.copy(
|
||||
stashes = mergeDistinct(previousRepo.stashes, inspectedRepo.stashes),
|
||||
fetchedBranches = previousRepo.fetchedBranches + inspectedRepo.fetchedBranches,
|
||||
fetchHeadCount = inspectedRepo.fetchHeadCount,
|
||||
pushedBranches = previousRepo.pushedBranches + inspectedRepo.pushedBranches,
|
||||
pushedTags = previousRepo.pushedTags + inspectedRepo.pushedTags,
|
||||
submodules = previousRepo.submodules + inspectedRepo.submodules,
|
||||
|
||||
Reference in New Issue
Block a user