git fetcher: Always pass storage type when completing

This commit is contained in:
Hylke Bons 2016-06-30 11:35:55 +01:00
parent ac7e4cc7aa
commit 70704adade
2 changed files with 29 additions and 35 deletions

View file

@ -610,7 +610,7 @@ namespace SparkleShare {
return;
}
FinishFetcher ();
FinishFetcher (storage_type);
}
@ -643,12 +643,6 @@ namespace SparkleShare {
}
public void FinishFetcher ()
{
FinishFetcher (StorageType.Plain);
}
public void FinishFetcher (StorageType selected_storage_type, string password)
{
this.fetcher.EnableFetchedRepoCrypto (password);

View file

@ -228,34 +228,6 @@ namespace Sparkles.Git {
}
void InstallConfiguration ()
{
string [] settings = {
"core.autocrlf input",
"core.quotepath false", // Don't quote "unusual" characters in path names
"core.ignorecase false", // Be case sensitive explicitly to work on Mac
"core.filemode false", // Ignore permission changes
"core.precomposeunicode true", // Use the same Unicode form on all filesystems
"core.safecrlf false",
"core.excludesfile \"\"",
"core.packedGitLimit 128m", // Some memory limiting options
"core.packedGitWindowSize 128m",
"pack.deltaCacheSize 128m",
"pack.packSizeLimit 128m",
"pack.windowMemory 128m",
"push.default matching"
};
if (InstallationInfo.OperatingSystem == OS.Windows)
settings [0] = "core.autocrlf true";
foreach (string setting in settings) {
var git_config = new GitCommand (TargetFolder, "config " + setting);
git_config.StartAndWaitForExit ();
}
}
public override void EnableFetchedRepoCrypto (string password)
{
string password_file = ".git/info/encryption_password";
@ -352,6 +324,34 @@ namespace Sparkles.Git {
}
void InstallConfiguration ()
{
string [] settings = {
"core.autocrlf input",
"core.quotepath false", // Don't quote "unusual" characters in path names
"core.ignorecase false", // Be case sensitive explicitly to work on Mac
"core.filemode false", // Ignore permission changes
"core.precomposeunicode true", // Use the same Unicode form on all filesystems
"core.safecrlf false",
"core.excludesfile \"\"",
"core.packedGitLimit 128m", // Some memory limiting options
"core.packedGitWindowSize 128m",
"pack.deltaCacheSize 128m",
"pack.packSizeLimit 128m",
"pack.windowMemory 128m",
"push.default matching"
};
if (InstallationInfo.OperatingSystem == OS.Windows)
settings [0] = "core.autocrlf true";
foreach (string setting in settings) {
var git_config = new GitCommand (TargetFolder, "config " + setting);
git_config.StartAndWaitForExit ();
}
}
void InstallExcludeRules ()
{
string git_info_path = Path.Combine (TargetFolder, ".git", "info");