repo git: reuse git objects
This commit is contained in:
parent
1e184fe666
commit
9538781dd3
|
@ -390,23 +390,25 @@ namespace SparkleLib.Git {
|
||||||
// Commits the made changes
|
// Commits the made changes
|
||||||
private void Commit (string message)
|
private void Commit (string message)
|
||||||
{
|
{
|
||||||
|
SparkleGit git;
|
||||||
|
|
||||||
if (!this.author_set) {
|
if (!this.author_set) {
|
||||||
SparkleGit git_set_author = new SparkleGit (LocalPath,
|
git = new SparkleGit (LocalPath,
|
||||||
"config user.name \"" + SparkleConfig.DefaultConfig.User.Name + "\"");
|
"config user.name \"" + SparkleConfig.DefaultConfig.User.Name + "\"");
|
||||||
|
|
||||||
git_set_author.Start ();
|
git.Start ();
|
||||||
git_set_author.WaitForExit ();
|
git.WaitForExit ();
|
||||||
|
|
||||||
git_set_author = new SparkleGit (LocalPath,
|
git = new SparkleGit (LocalPath,
|
||||||
"config user.email \"" + SparkleConfig.DefaultConfig.User.Email + "\"");
|
"config user.email \"" + SparkleConfig.DefaultConfig.User.Email + "\"");
|
||||||
|
|
||||||
git_set_author.Start ();
|
git.Start ();
|
||||||
git_set_author.WaitForExit ();
|
git.WaitForExit ();
|
||||||
|
|
||||||
this.author_set = true;
|
this.author_set = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
SparkleGit git = new SparkleGit (LocalPath,
|
git = new SparkleGit (LocalPath,
|
||||||
"commit -m \"" + message + "\" " +
|
"commit -m \"" + message + "\" " +
|
||||||
"--author=\"" + SparkleConfig.DefaultConfig.User.Name +
|
"--author=\"" + SparkleConfig.DefaultConfig.User.Name +
|
||||||
" <" + SparkleConfig.DefaultConfig.User.Email + ">\"");
|
" <" + SparkleConfig.DefaultConfig.User.Email + ">\"");
|
||||||
|
@ -414,8 +416,6 @@ namespace SparkleLib.Git {
|
||||||
git.Start ();
|
git.Start ();
|
||||||
git.StandardOutput.ReadToEnd ();
|
git.StandardOutput.ReadToEnd ();
|
||||||
git.WaitForExit ();
|
git.WaitForExit ();
|
||||||
|
|
||||||
SparkleHelpers.DebugInfo ("Commit", Name + " | " + message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue