mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-23 05:05:00 +00:00

* use `--output=<file>` instead of `-o <dir>` to avoid failure because the directory cannot be created * make generated patches in order when format multiple commits Signed-off-by: leo <longshuang@msn.cn>
12 lines
312 B
C#
12 lines
312 B
C#
namespace SourceGit.Commands
|
|
{
|
|
public class FormatPatch : Command
|
|
{
|
|
public FormatPatch(string repo, string commit, string saveTo)
|
|
{
|
|
WorkingDirectory = repo;
|
|
Context = repo;
|
|
Args = $"format-patch {commit} -1 --output=\"{saveTo}\"";
|
|
}
|
|
}
|
|
}
|