Misc Changes

This commit is contained in:
Joe Tretter
2026-05-06 21:28:44 -05:00
parent 5727022baf
commit e1b2d7f7a1
64 changed files with 1662 additions and 300 deletions

View File

@@ -0,0 +1,21 @@
package solutions.tretter.githugandroid
/**
* Port of the upstream ruby-githug `merge` level.
*
* Setup documents the repository shape the learner explores. Evaluation is kept
* state-based whenever the exercise changes repository objects; answer-only
* levels intentionally validate the answer entered at the prompt.
*/
internal fun mergeLevel(): Level = level(
id = "merge",
title = "Merge",
description = "We have a file in the branch 'feature'. Let's merge it with the master branch.",
hints = listOf("You want to research the `git merge` command."),
commandSuggestions = listOf("git merge feature"),
setup = { RepoState(initialized = true, files = listOf(GitFile("file1", tracked = true)), branches = mapOf("master" to 1, "feature" to 2)) },
validator = repoPredicate { repo -> repo.files.any { it.name == "file2" && it.tracked } },
testCases = listOf(
levelTestCase("merge feature", "git merge feature"),
),
)