Skip to content

Commit 03dcb22

Browse files
committed
Improve BranchCollection documentation
1 parent e2e3ff2 commit 03dcb22

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

LibGit2Sharp/BranchCollection.cs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,11 @@ IEnumerator IEnumerable.GetEnumerator()
139139
/// <param name = "name">The name of the branch.</param>
140140
/// <param name = "commitish">Revparse spec for the target commit.</param>
141141
/// <param name = "allowOverwrite">True to allow silent overwriting a potentially existing branch, false otherwise.</param>
142-
/// <returns></returns>
142+
/// <returns>A new <see cref="Branch"/>.</returns>
143143
public virtual Branch Add(string name, string commitish, bool allowOverwrite = false)
144144
{
145145
Ensure.ArgumentNotNullOrEmptyString(name, "name");
146+
Ensure.ArgumentNotNullOrEmptyString(commitish, "commitish");
146147

147148
ObjectId commitId = repo.LookupCommit(commitish).Id;
148149

@@ -187,17 +188,17 @@ public virtual void Delete(string name, bool isRemote = false)
187188
Remove(name, isRemote);
188189
}
189190

190-
///<summary>
191-
/// Rename an existing local branch with a new name.
192-
///</summary>
193-
///<param name = "currentName">The current branch name.</param>
194-
///<param name = "newName">The new name of the existing branch should bear.</param>
195-
///<param name = "allowOverwrite">True to allow silent overwriting a potentially existing branch, false otherwise.</param>
196-
///<returns></returns>
191+
/// <summary>
192+
/// Rename an existing local branch with a new name.
193+
/// </summary>
194+
/// <param name = "currentName">The current branch name.</param>
195+
/// <param name = "newName">The new name the existing branch should bear.</param>
196+
/// <param name = "allowOverwrite">True to allow silent overwriting a potentially existing branch, false otherwise.</param>
197+
/// <returns>A new <see cref="Branch"/>.</returns>
197198
public virtual Branch Move(string currentName, string newName, bool allowOverwrite = false)
198199
{
199200
Ensure.ArgumentNotNullOrEmptyString(currentName, "currentName");
200-
Ensure.ArgumentNotNullOrEmptyString(newName, "name");
201+
Ensure.ArgumentNotNullOrEmptyString(newName, "newName");
201202

202203
Proxy.git_branch_move(repo.Handle, currentName, newName, allowOverwrite);
203204

0 commit comments

Comments
 (0)