make the Commit restore more safe

This commit is contained in:
Christoph Brandau
2026-07-02 12:40:53 +02:00
parent e18f8f1040
commit 3a8c114d82
4 changed files with 36 additions and 7 deletions
+1 -1
View File
@@ -1051,7 +1051,7 @@
async function restoreCommit(target: GitCommit) {
if (!activeRepoPath) return;
const confirmed = window.confirm(`Reset current branch to ${target.short_hash}?\n\nThis moves the current branch and discards tracked local changes.`);
const confirmed = window.confirm(`Restore working tree to ${target.short_hash}?\n\nThis brings back the files from that commit as unstaged changes so you can review and commit them. No commit is removed and the branch stays where it is.`);
if (!confirmed) return;
await runOperation(`Restoring ${target.short_hash}`, async () => {
applyStatus(await restoreToCommit(activeRepoPath, target.hash));