コード例 #1
0
 /// <summary>
 /// Create a new command for
 /// <see cref="BaseReceivePack">BaseReceivePack</see>
 /// .
 /// </summary>
 /// <param name="oldId">
 /// the old object id; must not be null. Use
 /// <see cref="NGit.ObjectId.ZeroId()">NGit.ObjectId.ZeroId()</see>
 /// to indicate a ref creation.
 /// </param>
 /// <param name="newId">
 /// the new object id; must not be null. Use
 /// <see cref="NGit.ObjectId.ZeroId()">NGit.ObjectId.ZeroId()</see>
 /// to indicate a ref deletion.
 /// </param>
 /// <param name="name">name of the ref being affected.</param>
 /// <param name="type">type of the command.</param>
 /// <since>2.0</since>
 public ReceiveCommand(ObjectId oldId, ObjectId newId, string name, ReceiveCommand.Type
                       type)
 {
     this.oldId = oldId;
     this.newId = newId;
     this.name  = name;
     this.type  = type;
 }
コード例 #2
0
 /// <summary>
 /// Create a new command for
 /// <see cref="BaseReceivePack">BaseReceivePack</see>
 /// .
 /// </summary>
 /// <param name="oldId">
 /// the old object id; must not be null. Use
 /// <see cref="NGit.ObjectId.ZeroId()">NGit.ObjectId.ZeroId()</see>
 /// to indicate a ref creation.
 /// </param>
 /// <param name="newId">
 /// the new object id; must not be null. Use
 /// <see cref="NGit.ObjectId.ZeroId()">NGit.ObjectId.ZeroId()</see>
 /// to indicate a ref deletion.
 /// </param>
 /// <param name="name">name of the ref being affected.</param>
 public ReceiveCommand(ObjectId oldId, ObjectId newId, string name)
 {
     this.oldId = oldId;
     this.newId = newId;
     this.name  = name;
     type       = ReceiveCommand.Type.UPDATE;
     if (ObjectId.ZeroId.Equals(oldId))
     {
         type = ReceiveCommand.Type.CREATE;
     }
     if (ObjectId.ZeroId.Equals(newId))
     {
         type = ReceiveCommand.Type.DELETE;
     }
     status = ReceiveCommand.Result.NOT_ATTEMPTED;
 }
コード例 #3
0
ファイル: ReceiveCommand.cs プロジェクト: LunarLanding/ngit
		internal virtual void SetTypeFastForwardUpdate()
		{
			type = ReceiveCommand.Type.UPDATE;
			typeIsCorrect = true;
		}
コード例 #4
0
ファイル: ReceiveCommand.cs プロジェクト: LunarLanding/ngit
		internal virtual void SetType(ReceiveCommand.Type t)
		{
			type = t;
		}
コード例 #5
0
ファイル: ReceiveCommand.cs プロジェクト: LunarLanding/ngit
		/// <summary>
		/// Create a new command for
		/// <see cref="BaseReceivePack">BaseReceivePack</see>
		/// .
		/// </summary>
		/// <param name="oldId">
		/// the old object id; must not be null. Use
		/// <see cref="NGit.ObjectId.ZeroId()">NGit.ObjectId.ZeroId()</see>
		/// to indicate a ref creation.
		/// </param>
		/// <param name="newId">
		/// the new object id; must not be null. Use
		/// <see cref="NGit.ObjectId.ZeroId()">NGit.ObjectId.ZeroId()</see>
		/// to indicate a ref deletion.
		/// </param>
		/// <param name="name">name of the ref being affected.</param>
		/// <param name="type">type of the command.</param>
		/// <since>2.0</since>
		public ReceiveCommand(ObjectId oldId, ObjectId newId, string name, ReceiveCommand.Type
			 type)
		{
			this.oldId = oldId;
			this.newId = newId;
			this.name = name;
			this.type = type;
		}
コード例 #6
0
ファイル: ReceiveCommand.cs プロジェクト: LunarLanding/ngit
		/// <summary>
		/// Create a new command for
		/// <see cref="BaseReceivePack">BaseReceivePack</see>
		/// .
		/// </summary>
		/// <param name="oldId">
		/// the old object id; must not be null. Use
		/// <see cref="NGit.ObjectId.ZeroId()">NGit.ObjectId.ZeroId()</see>
		/// to indicate a ref creation.
		/// </param>
		/// <param name="newId">
		/// the new object id; must not be null. Use
		/// <see cref="NGit.ObjectId.ZeroId()">NGit.ObjectId.ZeroId()</see>
		/// to indicate a ref deletion.
		/// </param>
		/// <param name="name">name of the ref being affected.</param>
		public ReceiveCommand(ObjectId oldId, ObjectId newId, string name)
		{
			this.oldId = oldId;
			this.newId = newId;
			this.name = name;
			type = ReceiveCommand.Type.UPDATE;
			if (ObjectId.ZeroId.Equals(oldId))
			{
				type = ReceiveCommand.Type.CREATE;
			}
			if (ObjectId.ZeroId.Equals(newId))
			{
				type = ReceiveCommand.Type.DELETE;
			}
			status = ReceiveCommand.Result.NOT_ATTEMPTED;
		}
コード例 #7
0
 internal virtual void SetTypeFastForwardUpdate()
 {
     type          = ReceiveCommand.Type.UPDATE;
     typeIsCorrect = true;
 }
コード例 #8
0
 internal virtual void SetType(ReceiveCommand.Type t)
 {
     type = t;
 }