Fix Git editor reword workflow and UI coverage
- show Git editor file paths instead of the submitted git command - surface follow-up commit message editors during interactive rebase reword - add rename-commit UI tests for editor and amend-message solution paths - add broader embedded level solution scenarios for alternate Git workflows
This commit is contained in:
@@ -513,14 +513,20 @@ fun GitHugApp() {
|
||||
|
||||
fun saveGitMessageEditor() {
|
||||
val state = gitMessageEditorState ?: return
|
||||
val (newRepo, lines) = runtime.executeGitEditorCommand(
|
||||
val result = runtime.executeGitEditorCommandWithResult(
|
||||
level = currentLevel,
|
||||
currentRepo = repo,
|
||||
invocation = state.invocation,
|
||||
message = state.content,
|
||||
)
|
||||
gitMessageEditorState = null
|
||||
applyCommandResult(state.invocation.command, newRepo, lines, echoCommand = false)
|
||||
applyCommandResult(state.invocation.command, result.repo, result.outputLines, echoCommand = false)
|
||||
result.nextEditor?.let { nextEditor ->
|
||||
gitMessageEditorState = GitMessageEditorState(
|
||||
invocation = nextEditor.invocation,
|
||||
content = nextEditor.content,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
fun runCommand() {
|
||||
|
||||
Reference in New Issue
Block a user