Merge pull request #408 from tgstation/ci-skip

testmerge commits skip ci
This commit is contained in:
Jordan Brown
2017-11-22 16:09:19 -05:00
committed by GitHub
+24 -24
View File
@@ -420,8 +420,8 @@ namespace TGS.Server
}
return GetShaOrBranchNoLock(out error, branch, tracked);
}
}
}
/// <summary>
/// Gets the SHA or branch name of the <see cref="Repo"/>'s HEAD. Requires <see cref="RepoLock"/>
/// </summary>
@@ -429,27 +429,27 @@ namespace TGS.Server
/// <param name="branch">If <see langword="true"/>, returns the branch name instead of the SHA</param>
/// <param name="tracked">If <see langword="true"/>, returns the tracked branch SHA and ignores <paramref name="branch"/></param>
/// <returns>The SHA or branch name of the <see cref="Repo"/>'s HEAD</returns>
string GetShaOrBranchNoLock(out string error, bool branch, bool tracked)
{
var result = LoadRepo();
if (result != null)
{
error = result;
return null;
}
try
{
error = null;
if (tracked && Repo.Head.TrackedBranch != null)
return Repo.Head.TrackedBranch.Tip.Sha;
return branch ? Repo.Head.FriendlyName : Repo.Head.Tip.Sha;
}
catch (Exception e)
{
error = e.ToString();
return null;
}
string GetShaOrBranchNoLock(out string error, bool branch, bool tracked)
{
var result = LoadRepo();
if (result != null)
{
error = result;
return null;
}
try
{
error = null;
if (tracked && Repo.Head.TrackedBranch != null)
return Repo.Head.TrackedBranch.Tip.Sha;
return branch ? Repo.Head.FriendlyName : Repo.Head.Tip.Sha;
}
catch (Exception e)
{
error = e.ToString();
return null;
}
}
/// <inheritdoc />
@@ -953,7 +953,7 @@ namespace TGS.Server
}
//so we'll know if this fails
var Result = MergeBranch(atSHA ?? LocalBranchName, String.Format("Test merge commit for pull request #{0}{1}Server Instance: {2}", PRNumber, Environment.NewLine, Config.Name));
var Result = MergeBranch(atSHA ?? LocalBranchName, String.Format("[ci skip] Test merge commit for pull request #{0}{1}Server Instance: {2}", PRNumber, Environment.NewLine, Config.Name));
if (Result == null)
try