[smuxi/experiments/sqlite: 8/27] [Engine] Fixed GitMessageBuffer.Count
- From: Mirco M. M. Bauer <mmmbauer src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [smuxi/experiments/sqlite: 8/27] [Engine] Fixed GitMessageBuffer.Count
- Date: Sun, 23 Feb 2014 17:07:03 +0000 (UTC)
commit 24f0182ecaee503be7f366816d791eae34ea2f62
Author: Mirco Bauer <meebey meebey net>
Date: Sun Feb 26 11:54:23 2012 +0100
[Engine] Fixed GitMessageBuffer.Count
src/Engine/MessageBuffers/GitMessageBuffer.cs | 13 +------------
1 files changed, 1 insertions(+), 12 deletions(-)
---
diff --git a/src/Engine/MessageBuffers/GitMessageBuffer.cs b/src/Engine/MessageBuffers/GitMessageBuffer.cs
index d72364c..82c0cef 100644
--- a/src/Engine/MessageBuffers/GitMessageBuffer.cs
+++ b/src/Engine/MessageBuffers/GitMessageBuffer.cs
@@ -128,18 +128,7 @@ namespace Smuxi.Engine
#region implemented abstract members of Smuxi.Engine.MessageBufferBase
public override int Count {
get {
- var repo = Repository;
- var count = repo.Index.Count;
- var reference = repo.Refs["refs/heads/master"] as DirectReference;
- if (reference == null) {
- return count;
- }
- var commit = reference.Target as Commit;
- if (commit == null) {
- return count;
- }
- count += commit.Tree.Count;
- return count;
+ return Repository.Index.Count;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]