From 71f2b1682be31570cdc478d89d367d15c3e5551c Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Thu, 5 Aug 2010 09:27:05 +0100 Subject: [PATCH] [intro] Don't give target folder name a (1) suffix when the name is unique --- SparkleLib/SparkleRepo.cs | 6 +++--- SparkleShare/SparkleIntro.cs | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/SparkleLib/SparkleRepo.cs b/SparkleLib/SparkleRepo.cs index 8e45db27..d3dc900f 100644 --- a/SparkleLib/SparkleRepo.cs +++ b/SparkleLib/SparkleRepo.cs @@ -125,7 +125,7 @@ namespace SparkleLib { // Add everything that changed - // since SparkleShare was stopped + // since SparkleShare was stopped TODO: Push if there are changes AddCommitAndPush (); SparkleHelpers.DebugInfo ("Git", "[" + Name + "] Idling..."); @@ -269,7 +269,7 @@ namespace SparkleLib { SparkleHelpers.DebugInfo ("Git", "[" + Name + "] Fetching changes..."); - Process.StartInfo.Arguments = "fetch -v"; + Process.StartInfo.Arguments = "fetch"; Process.WaitForExit (); Process.Start (); @@ -300,7 +300,7 @@ namespace SparkleLib { SparkleHelpers.DebugInfo ("Git", "[" + Name + "] Rebasing changes..."); - Process.StartInfo.Arguments = "rebase -v master"; + Process.StartInfo.Arguments = "rebase -v origin/master"; Process.WaitForExit (); Process.Start (); diff --git a/SparkleShare/SparkleIntro.cs b/SparkleShare/SparkleIntro.cs index a956c302..c8af1f45 100644 --- a/SparkleShare/SparkleIntro.cs +++ b/SparkleShare/SparkleIntro.cs @@ -374,7 +374,10 @@ namespace SparkleShare { } - string target_folder_name = canonical_name + " (" + i + ")"; + string target_folder_name = canonical_name; + + if (i > 1) + target_folder_name += " (" + i + ")"; Directory.Move (tmp_folder, SparkleHelpers.CombineMore (SparklePaths.SparklePath, target_folder_name));