[repo] Replace gitsharp's AnyDifferences by own implementation
This commit is contained in:
parent
91f629b5d5
commit
17d07bb2eb
|
@ -486,7 +486,7 @@ namespace SparkleLib {
|
|||
_IsBuffering = false;
|
||||
HasChanged = false;
|
||||
|
||||
while (Status.AnyDifferences) {
|
||||
while (AnyDifferences) {
|
||||
|
||||
Watcher.EnableRaisingEvents = false;
|
||||
AddCommitAndPush ();
|
||||
|
@ -554,7 +554,7 @@ namespace SparkleLib {
|
|||
LocalTimer.Stop ();
|
||||
RemoteTimer.Stop ();
|
||||
|
||||
if (Status.AnyDifferences) {
|
||||
if (AnyDifferences) {
|
||||
|
||||
Add ();
|
||||
|
||||
|
@ -580,6 +580,26 @@ namespace SparkleLib {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public bool AnyDifferences {
|
||||
|
||||
get {
|
||||
|
||||
SparkleGit git = new SparkleGit (LocalPath, "status --porcelain");
|
||||
git.Start ();
|
||||
git.WaitForExit ();
|
||||
|
||||
string output = git.StandardOutput.ReadToEnd ().Trim ();
|
||||
|
||||
if (output.Length > 0)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Stages the made changes
|
||||
|
@ -624,7 +644,7 @@ namespace SparkleLib {
|
|||
new public void Commit (string message)
|
||||
{
|
||||
|
||||
if (!Status.AnyDifferences)
|
||||
if (!AnyDifferences)
|
||||
return;
|
||||
|
||||
base.Commit (message);
|
||||
|
@ -710,7 +730,7 @@ namespace SparkleLib {
|
|||
public void Rebase ()
|
||||
{
|
||||
|
||||
if (Status.AnyDifferences) {
|
||||
if (AnyDifferences) {
|
||||
|
||||
Add ();
|
||||
|
||||
|
|
|
@ -241,6 +241,9 @@ namespace SparkleShare {
|
|||
|
||||
List <SparkleCommit> commits = GetLog (name);
|
||||
List <ActivityDay> activity_days = new List <ActivityDay> ();
|
||||
|
||||
if (commits.Count == 0)
|
||||
return null;
|
||||
|
||||
foreach (SparkleCommit commit in commits) {
|
||||
|
||||
|
|
Loading…
Reference in a new issue