public HandleConflictSelectSide ( string fileName, string side ) : bool | ||
fileName | string | |
side | string | |
return | bool |
public bool HandleConflictSelectSide(string fileName, string side)
{
Directory.SetCurrentDirectory(_workingDir);
fileName = fileName.ToPosixPath();
side = GetSide(side);
string result = RunGitCmd(String.Format("checkout-index -f --stage={0} -- \"{1}\"", side, fileName));
if (!result.IsNullOrEmpty())
{
return false;
}
result = RunGitCmd(String.Format("add -- \"{0}\"", fileName));
return result.IsNullOrEmpty();
}