fetcher: add configuration option to show special characters in the git log. Fixes 288

This commit is contained in:
Hylke Bons 2011-07-29 23:03:45 +01:00
parent 6fde5de6d9
commit bf015d32f0
2 changed files with 10 additions and 4 deletions

View file

@ -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;

View file

@ -378,8 +378,10 @@ namespace SparkleLib {
List <SparkleChangeSet> change_sets = new List <SparkleChangeSet> ();
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