repo git: fix getting stuck in conflict resolution loop when there are no conflicts
This commit is contained in:
parent
d403e80e04
commit
8948837a59
|
@ -49,14 +49,12 @@ namespace SparkleLib.Git {
|
|||
if (string.IsNullOrEmpty (this.cached_branch)) {
|
||||
string rebase_apply_path = new string [] { LocalPath, ".git", "rebase-apply" }.Combine ();
|
||||
|
||||
if (Directory.Exists (rebase_apply_path)) {
|
||||
while (HasLocalChanges) {
|
||||
try {
|
||||
ResolveConflict ();
|
||||
|
||||
} catch (IOException e) {
|
||||
SparkleLogger.LogInfo ("Git", Name + " | Failed to resolve conflict, trying again... (" + e.Message + ")");
|
||||
}
|
||||
while (Directory.Exists (rebase_apply_path) && HasLocalChanges) {
|
||||
try {
|
||||
ResolveConflict ();
|
||||
|
||||
} catch (IOException e) {
|
||||
SparkleLogger.LogInfo ("Git", Name + " | Failed to resolve conflict, trying again... (" + e.Message + ")");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -477,8 +475,9 @@ namespace SparkleLib.Git {
|
|||
}
|
||||
|
||||
SparkleLogger.LogInfo ("Git", Name + " | Conflict detected, trying to get out...");
|
||||
|
||||
while (HasLocalChanges) {
|
||||
string rebase_apply_path = new string [] { LocalPath, ".git", "rebase-apply" }.Combine ();
|
||||
|
||||
while (Directory.Exists (rebase_apply_path) && HasLocalChanges) {
|
||||
try {
|
||||
ResolveConflict ();
|
||||
|
||||
|
|
|
@ -199,7 +199,7 @@ namespace SparkleShare {
|
|||
|
||||
if (!string.IsNullOrEmpty (auth_agent_pid)) {
|
||||
SparkleLogger.LogInfo ("Controller", "Trying to use existing ssh-agent with PID=" + auth_agent_pid + "...");
|
||||
this.ssh_agent_pid = Convert.ToInt32(auth_agent_pid);
|
||||
this.ssh_agent_pid = Convert.ToInt32 (auth_agent_pid);
|
||||
|
||||
try {
|
||||
Process ssh_agent = Process.GetProcessById (this.ssh_agent_pid);
|
||||
|
@ -230,12 +230,10 @@ namespace SparkleShare {
|
|||
Environment.SetEnvironmentVariable ("SSH_AUTH_SOCK", auth_sock_match.Groups [1].Value);
|
||||
|
||||
if (ssh_pid_match.Success) {
|
||||
string ssh_pid = ssh_pid_match.Groups [1].Value;
|
||||
Int32.TryParse (ssh_pid_match.Groups [1].Value, out this.ssh_agent_pid);
|
||||
Environment.SetEnvironmentVariable ("SSH_AGENT_PID", this.ssh_agent_pid);
|
||||
|
||||
Int32.TryParse (ssh_pid, out this.ssh_agent_pid);
|
||||
Environment.SetEnvironmentVariable ("SSH_AGENT_PID", ssh_pid);
|
||||
|
||||
SparkleLogger.LogInfo ("Controller", "ssh-agent started, PID=" + ssh_pid);
|
||||
SparkleLogger.LogInfo ("Controller", "ssh-agent started, PID=" + this.ssh_agent_pid);
|
||||
|
||||
} else {
|
||||
SparkleLogger.LogInfo ("Controller", "ssh-agent started, PID=Unknown");
|
||||
|
|
Loading…
Reference in a new issue