lib: style cleanups

This commit is contained in:
Hylke Bons 2012-07-03 09:58:35 +02:00
parent e1b1075f2d
commit 22fcca2fac

View file

@ -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 ("\"", "\\\"");
}