[controller] optimise GetLog
This commit is contained in:
parent
a07820aa34
commit
5757ceeab0
|
@ -219,18 +219,10 @@ namespace SparkleShare {
|
|||
string path = Path.Combine (SparklePaths.SparklePath, name);
|
||||
int log_size = 30;
|
||||
|
||||
List <SparkleCommit> list = new List <SparkleCommit> ();
|
||||
|
||||
foreach (SparkleRepo repo in Repositories) {
|
||||
|
||||
if (repo.LocalPath.Equals (path)) {
|
||||
|
||||
foreach (SparkleCommit commit in repo.GetCommits (log_size))
|
||||
list.Add (commit);
|
||||
|
||||
return list;
|
||||
|
||||
}
|
||||
if (repo.LocalPath.Equals (path))
|
||||
return repo.GetCommits (log_size);
|
||||
|
||||
}
|
||||
|
||||
|
@ -295,6 +287,9 @@ namespace SparkleShare {
|
|||
|
||||
string event_entry = "<dl>";
|
||||
|
||||
if (change_set.IsMerge)
|
||||
event_entry += "<dt>Merged a branch</dt>";
|
||||
|
||||
if (change_set.Edited.Count > 0) {
|
||||
|
||||
event_entry += "<dt>Edited</dt>";
|
||||
|
@ -318,9 +313,6 @@ namespace SparkleShare {
|
|||
|
||||
}
|
||||
|
||||
if (change_set.IsMerge)
|
||||
event_entry += "<dt>Merged a branch</dt>";
|
||||
|
||||
if (change_set.Added.Count > 0) {
|
||||
|
||||
event_entry += "<dt>Added</dt>";
|
||||
|
|
Loading…
Reference in a new issue