mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-23 13:14:59 +00:00
feature: add context menu Save As Patch...
for selected stash (#1018)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
4868ea1a0b
commit
1d037c7c57
5 changed files with 53 additions and 0 deletions
|
@ -37,6 +37,19 @@ namespace SourceGit.Commands
|
|||
return true;
|
||||
}
|
||||
|
||||
public static bool ProcessStashChanges(string repo, List<Models.DiffOption> opts, string saveTo)
|
||||
{
|
||||
using (var sw = File.Create(saveTo))
|
||||
{
|
||||
foreach (var opt in opts)
|
||||
{
|
||||
if (!ProcessSingleChange(repo, opt, sw))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private static bool ProcessSingleChange(string repo, Models.DiffOption opt, FileStream writer)
|
||||
{
|
||||
var starter = new ProcessStartInfo();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue