fix<TextDiffView>: discard from staged should not affect same file in unstaged

This commit is contained in:
leo 2024-03-03 09:16:19 +08:00
parent 8ca74d3a9e
commit 14dbc0ad92

View file

@ -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();