feature: git command logs

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-04-17 12:30:20 +08:00
parent 928a0ad3c5
commit 8b39df32cc
No known key found for this signature in database
101 changed files with 1040 additions and 573 deletions

View file

@ -302,17 +302,20 @@ namespace SourceGit.ViewModels
var picker = await storageProvider.OpenFolderPickerAsync(options);
if (picker.Count == 1)
{
var log = _repo.CreateLog("Save as Patch");
var succ = false;
for (var i = 0; i < selected.Count; i++)
{
var saveTo = GetPatchFileName(picker[0].Path.LocalPath, selected[i], i);
succ = await Task.Run(() => new Commands.FormatPatch(_repo.FullPath, selected[i].SHA, saveTo).Exec());
succ = await Task.Run(() => new Commands.FormatPatch(_repo.FullPath, selected[i].SHA, saveTo).Use(log).Exec());
if (!succ)
break;
}
if (succ)
App.SendNotification(_repo.FullPath, App.Text("SaveAsPatchSuccess"));
log.Complete();
}
}
catch (Exception exception)