From 9ef9fd4243b0392433f81b3549ae7dc17c91df89 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Fri, 29 Jul 2011 23:03:45 +0100 Subject: [PATCH] fetcher: add configuration option to show special characters in the git log. Fixes 288 --- SparkleLib/Git/SparkleFetcherGit.cs | 10 +++++++--- SparkleLib/Git/SparkleRepoGit.cs | 4 +++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/SparkleLib/Git/SparkleFetcherGit.cs b/SparkleLib/Git/SparkleFetcherGit.cs index 101d0bf1..1c1f8a70 100644 --- a/SparkleLib/Git/SparkleFetcherGit.cs +++ b/SparkleLib/Git/SparkleFetcherGit.cs @@ -103,14 +103,18 @@ namespace SparkleLib { string repo_config_file_path = SparkleHelpers.CombineMore (base.target_folder, ".git", "config"); string config = String.Join (Environment.NewLine, File.ReadAllLines (repo_config_file_path)); + string n = Environment.NewLine; + + // Show special characters in the logs + config = config.Replace ("[core]" + n, + "[core]" + n + "quotepath = false" + n); + // Be case sensitive explicitly to work on Mac config = config.Replace ("ignorecase = true", "ignorecase = false"); // Ignore permission changes config = config.Replace ("filemode = true", "filemode = false"); - config = config.Replace ("fetch = +refs/heads/*:refs/remotes/origin/*", - "fetch = +refs/heads/*:refs/remotes/origin/*" + Environment.NewLine + - "\tfetch = +refs/notes/*:refs/notes/*"); + // Add user info string n = Environment.NewLine; diff --git a/SparkleLib/Git/SparkleRepoGit.cs b/SparkleLib/Git/SparkleRepoGit.cs index 407cd740..de220e48 100644 --- a/SparkleLib/Git/SparkleRepoGit.cs +++ b/SparkleLib/Git/SparkleRepoGit.cs @@ -378,8 +378,10 @@ namespace SparkleLib { List change_sets = new List (); - SparkleGit git_log = new SparkleGit (LocalPath, "log -" + count + " --raw -M --date=iso"); + // Console.InputEncoding = System.Text.Encoding.Unicode; Console.OutputEncoding = System.Text.Encoding.Unicode; + + SparkleGit git_log = new SparkleGit (LocalPath, "log -" + count + " --raw -M --date=iso"); git_log.Start (); // Reading the standard output HAS to go before