From 14dbc0ad92a2edadd3efcc907c850cf9f982932a Mon Sep 17 00:00:00 2001 From: leo Date: Sun, 3 Mar 2024 09:16:19 +0800 Subject: [PATCH] fix: discard from staged should not affect same file in unstaged --- src/Views/TextDiffView.axaml.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Views/TextDiffView.axaml.cs b/src/Views/TextDiffView.axaml.cs index a3d4288b..77c32d88 100644 --- a/src/Views/TextDiffView.axaml.cs +++ b/src/Views/TextDiffView.axaml.cs @@ -811,8 +811,7 @@ namespace SourceGit.Views { TextDiff.GeneratePatchFromSelectionSingleSide(change, treeGuid, selection, true, isOldSide, tmpFile); } - new Commands.Apply(ctx.RepositoryPath, tmpFile, true, "nowarn", "--cache --index --reverse").Exec(); - new Commands.Apply(ctx.RepositoryPath, tmpFile, true, "nowarn", "--reverse").Exec(); + new Commands.Apply(ctx.RepositoryPath, tmpFile, true, "nowarn", "--index --reverse").Exec(); File.Delete(tmpFile); repo.RefreshWorkingCopyChanges();