From 7918c83f990362887e3a16e12ef53d333ede4697 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Sun, 10 Oct 2010 16:43:54 +0100 Subject: [PATCH] [repo] port ls-remote (but not yet implemented) --- SparkleLib/SparkleRepo.cs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/SparkleLib/SparkleRepo.cs b/SparkleLib/SparkleRepo.cs index 13d90e69..e0079bcf 100644 --- a/SparkleLib/SparkleRepo.cs +++ b/SparkleLib/SparkleRepo.cs @@ -453,6 +453,31 @@ namespace SparkleLib { }; +/* FIXME: LsRemoteCommand is not yet implemented by GitSharp + + LsRemoteCommand ls_remote = new LsRemoteCommand () { + Repository = this + }; + + ls_remote.Execute (); + + using (StreamReader reader = new StreamReader (ls_remote.OutputStream.BaseStream)) + { + + string remote_hash = reader.ReadLine ()); + + if (!remote_hash.StartsWith (_CurrentHash)) { + + SparkleHelpers.DebugInfo ("Git", "[" + Name + "] Remote changes found."); + + Fetch (); + Rebase (); + + } + + } +*/ + } @@ -570,6 +595,8 @@ namespace SparkleLib { SparkleHelpers.DebugInfo ("Git", "[" + Name + "] Staging changes..."); + // FIXME: this GitSharp method seems to block... + // Index.AddAll (); Process.StartInfo.Arguments = "add --all"; Process.Start (); Process.WaitForExit ();