diff --git a/SparkleLib/Git/SparkleRepoGit.cs b/SparkleLib/Git/SparkleRepoGit.cs index cd24ea50..39650c76 100644 --- a/SparkleLib/Git/SparkleRepoGit.cs +++ b/SparkleLib/Git/SparkleRepoGit.cs @@ -20,6 +20,7 @@ using System.Collections.Generic; using System.IO; using System.Text; using System.Text.RegularExpressions; + using SparkleLib; namespace SparkleLib.Git { @@ -81,11 +82,8 @@ namespace SparkleLib.Git { private void UpdateSizes () { - double size = CalculateSizes ( - new DirectoryInfo (LocalPath)); - - double history_size = CalculateSizes ( - new DirectoryInfo (Path.Combine (LocalPath, ".git"))); + double size = CalculateSizes (new DirectoryInfo (LocalPath)); + double history_size = CalculateSizes (new DirectoryInfo (Path.Combine (LocalPath, ".git"))); string size_file_path = new string [] {LocalPath, ".git", "repo_size"}.Combine (); string history_size_file_path = new string [] {LocalPath, ".git", "repo_history_size"}.Combine (); @@ -169,8 +167,9 @@ namespace SparkleLib.Git { if (git.ExitCode != 0) return false; - string remote_revision = git.StandardOutput.ReadToEnd ().Substring (0, 40); - + string output = git.StandardOutput.ReadToEnd (); + string remote_revision = output.Substring (0, 40); + if (!remote_revision.StartsWith (current_revision)) { SparkleHelpers.DebugInfo ("Git", Name + " | Remote changes detected (local: " + @@ -928,9 +927,7 @@ namespace SparkleLib.Git { } git_status.WaitForExit (); - message = message.Replace ("\"", "\\\""); - - return message.TrimEnd (); + return message.Replace ("\"", "\\\""); }