mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-25 11:24:02 +08: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>
13 lines
312 B
C#
13 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}\"";
|
|
}
|
|
}
|
|
}
|