From 63ac8e5d712c2182cb5da6f258a57c9b7e23d892 Mon Sep 17 00:00:00 2001 From: Kristi Date: Tue, 1 Feb 2011 01:20:30 -0800 Subject: [PATCH] Fix bug when syncing a empty repository with no commits --- SparkleLib/SparkleRepo.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/SparkleLib/SparkleRepo.cs b/SparkleLib/SparkleRepo.cs index 443bfa9d..7160b5f8 100644 --- a/SparkleLib/SparkleRepo.cs +++ b/SparkleLib/SparkleRepo.cs @@ -270,7 +270,12 @@ namespace SparkleLib { UserName = Config ["user.name"]; UserEmail = Config ["user.email"]; - _CurrentHash = Head.CurrentCommit.Hash; + + if (Head.CurrentCommit == null) + _CurrentHash = null; + else + _CurrentHash = Head.CurrentCommit.Hash; + _IsSyncing = false; _IsBuffering = false; _IsPolling = true;