public static void UpdateRemoteBranch(RemoteBranch remoteBranch, RemoteBranchData branchData) { Verify.Argument.IsNotNull(remoteBranch, "remoteBranch"); Verify.Argument.IsNotNull(branchData, "branchData"); if (remoteBranch.Revision.Hash != branchData.SHA1) { remoteBranch.Pointer = remoteBranch.Repository.Revisions.GetOrCreateRevision(branchData.SHA1); } }
public static void UpdateRemoteBranch(RemoteBranch remoteBranch, BranchData branchData) { Verify.Argument.IsNotNull(remoteBranch, "remoteBranch"); Verify.Argument.IsNotNull(branchData, "branchData"); Verify.Argument.IsTrue(branchData.IsRemote, "branchData", "Cannot update local branch."); if (remoteBranch.Revision.Hash != branchData.SHA1) { var revisionCache = remoteBranch.Repository.Revisions; lock (revisionCache.SyncRoot) { remoteBranch.Pointer = revisionCache.GetOrCreateRevision(branchData.SHA1); } } }
public static void UpdateRemoteBranch(RemoteBranch remoteBranch, RemoteBranchData branchData) { Verify.Argument.IsNotNull(remoteBranch, "remoteBranch"); Verify.Argument.IsNotNull(branchData, "branchData"); if(remoteBranch.Revision.Hash != branchData.SHA1) { remoteBranch.Pointer = remoteBranch.Repository.Revisions.GetOrCreateRevision(branchData.SHA1); } }
public static void UpdateRemoteBranch(RemoteBranch remoteBranch, BranchData branchData) { Verify.Argument.IsNotNull(remoteBranch, "remoteBranch"); Verify.Argument.IsNotNull(branchData, "branchData"); Verify.Argument.IsTrue(branchData.IsRemote, "branchData", "Cannot update local branch."); if(remoteBranch.Revision.Hash != branchData.SHA1) { var revisionCache = remoteBranch.Repository.Revisions; lock(revisionCache.SyncRoot) { remoteBranch.Pointer = revisionCache.GetOrCreateRevision(branchData.SHA1); } } }