[repo] Replace gitsharp's AnyDifferences by own implementation
This commit is contained in:
parent
0911117e31
commit
0005a76388
|
@ -486,7 +486,7 @@ namespace SparkleLib {
|
||||||
_IsBuffering = false;
|
_IsBuffering = false;
|
||||||
HasChanged = false;
|
HasChanged = false;
|
||||||
|
|
||||||
while (Status.AnyDifferences) {
|
while (AnyDifferences) {
|
||||||
|
|
||||||
Watcher.EnableRaisingEvents = false;
|
Watcher.EnableRaisingEvents = false;
|
||||||
AddCommitAndPush ();
|
AddCommitAndPush ();
|
||||||
|
@ -554,7 +554,7 @@ namespace SparkleLib {
|
||||||
LocalTimer.Stop ();
|
LocalTimer.Stop ();
|
||||||
RemoteTimer.Stop ();
|
RemoteTimer.Stop ();
|
||||||
|
|
||||||
if (Status.AnyDifferences) {
|
if (AnyDifferences) {
|
||||||
|
|
||||||
Add ();
|
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
|
// Stages the made changes
|
||||||
|
@ -624,7 +644,7 @@ namespace SparkleLib {
|
||||||
new public void Commit (string message)
|
new public void Commit (string message)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!Status.AnyDifferences)
|
if (!AnyDifferences)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
base.Commit (message);
|
base.Commit (message);
|
||||||
|
@ -710,7 +730,7 @@ namespace SparkleLib {
|
||||||
public void Rebase ()
|
public void Rebase ()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (Status.AnyDifferences) {
|
if (AnyDifferences) {
|
||||||
|
|
||||||
Add ();
|
Add ();
|
||||||
|
|
||||||
|
|
|
@ -241,6 +241,9 @@ namespace SparkleShare {
|
||||||
|
|
||||||
List <SparkleCommit> commits = GetLog (name);
|
List <SparkleCommit> commits = GetLog (name);
|
||||||
List <ActivityDay> activity_days = new List <ActivityDay> ();
|
List <ActivityDay> activity_days = new List <ActivityDay> ();
|
||||||
|
|
||||||
|
if (commits.Count == 0)
|
||||||
|
return null;
|
||||||
|
|
||||||
foreach (SparkleCommit commit in commits) {
|
foreach (SparkleCommit commit in commits) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue