diff --git a/SparkleLib/Git/SparkleRepoGit.cs b/SparkleLib/Git/SparkleRepoGit.cs index 503e51c8..f859c24c 100644 --- a/SparkleLib/Git/SparkleRepoGit.cs +++ b/SparkleLib/Git/SparkleRepoGit.cs @@ -230,10 +230,10 @@ namespace SparkleLib.Git { public override bool SyncUp () { - if (HasLocalChanges) { - Add (); + string message = FormatCommitMessage (); - string message = FormatCommitMessage (); + if (message != null) { + Add (); Commit (message); } @@ -456,11 +456,11 @@ namespace SparkleLib.Git { // Merges the fetched changes private bool Rebase () { - if (HasLocalChanges) { + string message = FormatCommitMessage (); + + if (message != null) { Add (); - - string commit_message = FormatCommitMessage (); - Commit (commit_message); + Commit (message); } SparkleGit git; @@ -1046,7 +1046,10 @@ namespace SparkleLib.Git { git_status.StandardOutput.ReadToEnd (); git_status.WaitForExit (); - return message; + if (string.IsNullOrWhiteSpace (message)) + return null; + else + return message; } diff --git a/SparkleLib/SparkleRepoBase.cs b/SparkleLib/SparkleRepoBase.cs index 9026a1e2..ca62bc1d 100755 --- a/SparkleLib/SparkleRepoBase.cs +++ b/SparkleLib/SparkleRepoBase.cs @@ -245,12 +245,12 @@ namespace SparkleLib { SparkleLogger.LogInfo ("Local", Name + " | Activity detected, waiting for it to settle..."); List size_buffer = new List (); + DirectoryInfo info = new DirectoryInfo (LocalPath); do { if (size_buffer.Count >= 4) size_buffer.RemoveAt (0); - DirectoryInfo info = new DirectoryInfo (LocalPath); size_buffer.Add (CalculateSize (info)); if (size_buffer.Count >= 4 &&