feat(commit): add amend and undo last commit support

This change introduces new Tauri commands to amend the last commit with
an optional message, fetch the last commit message, and undo the most
recent commit safely. The UI now offers an amend toggle and an undo
button only when the last commit hasn’t been pushed upstream, reducing
the risk of rewriting shared history.

- Add amend/undo/last-message git commands in Rust
- Wire new operations into the Svelte commit panel UI
- Add styling and state handling for amend mode
This commit is contained in:
Christoph Brandau
2026-07-06 17:34:05 +02:00
parent 0bad722c7a
commit ce0cbc0786
6 changed files with 226 additions and 18 deletions
+23
View File
@@ -1807,6 +1807,29 @@
resize: none;
overflow: auto;
}
.commit-amend-row {
display: flex;
align-items: center;
justify-content: space-between;
flex: 0 0 auto;
gap: 8px;
min-width: 0;
}
.commit-amend-toggle {
display: flex;
align-items: center;
gap: 6px;
color: var(--color-ink-dim);
font-size: 12px;
white-space: nowrap;
}
.commit-undo-button {
flex: 0 0 auto;
min-height: 26px;
padding: 0 8px;
font-size: 11px;
}
.commit-actions-row {
display: flex;
flex: 0 0 auto;