public bool CheckoutConflictedFile(string filename, FileConflictSources source) { lock (this) { string sourceName = source == FileConflictSources.Ours ? "--ours" : "--theirs"; return(SimpleGitInvoke(string.Format("checkout {1} \"{0}\"", filename, sourceName))); } }
public bool SaveConflictedFile(string filename, FileConflictSources source, Stream stream) { lock (this) { string sourceName = source == FileConflictSources.Ours ? "ORIG_HEAD" : "MERGE_HEAD"; var result = RunExe("git", string.Format("show {1}:\"{0}\"", filename, sourceName), stdOutToStream: stream); lastResult = result.output; lastError = result.errors; return(string.IsNullOrEmpty(lastError)); } }