Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2sharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Straub <bstraub@github.com>2012-08-03 02:54:17 +0400
committernulltoken <emeric.fermas@gmail.com>2012-08-15 01:04:10 +0400
commitd21cf2e1ca671c6234618352b851e6e768908ca9 (patch)
tree89e18d9d8a9ea854af9d6f3b2ec62ccea3046672 /LibGit2Sharp/BranchCollection.cs
parente7b3e10a7bcf3913ff29190679bb2d45dfcf4f35 (diff)
Revparse support in Repository.Lookup
Now running lookups through git_revparse_single.
Diffstat (limited to 'LibGit2Sharp/BranchCollection.cs')
-rw-r--r--LibGit2Sharp/BranchCollection.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/LibGit2Sharp/BranchCollection.cs b/LibGit2Sharp/BranchCollection.cs
index 4146c023..d37c8567 100644
--- a/LibGit2Sharp/BranchCollection.cs
+++ b/LibGit2Sharp/BranchCollection.cs
@@ -137,14 +137,14 @@ namespace LibGit2Sharp
/// Create a new local branch with the specified name
/// </summary>
/// <param name = "name">The name of the branch.</param>
- /// <param name = "shaOrReferenceName">The target which can be sha or a canonical reference name.</param>
+ /// <param name = "commitish">Revparse spec for the target commit.</param>
/// <param name = "allowOverwrite">True to allow silent overwriting a potentially existing branch, false otherwise.</param>
/// <returns></returns>
- public virtual Branch Add(string name, string shaOrReferenceName, bool allowOverwrite = false)
+ public virtual Branch Add(string name, string commitish, bool allowOverwrite = false)
{
Ensure.ArgumentNotNullOrEmptyString(name, "name");
- ObjectId commitId = repo.LookupCommit(shaOrReferenceName).Id;
+ ObjectId commitId = repo.LookupCommit(commitish).Id;
using (var osw = new ObjectSafeWrapper(commitId, repo))
{
@@ -159,13 +159,13 @@ namespace LibGit2Sharp
/// Create a new local branch with the specified name
/// </summary>
/// <param name = "name">The name of the branch.</param>
- /// <param name = "shaOrReferenceName">The target which can be sha or a canonical reference name.</param>
+ /// <param name = "commitish">Revparse spec for the target commit.</param>
/// <param name = "allowOverwrite">True to allow silent overwriting a potentially existing branch, false otherwise.</param>
/// <returns></returns>
[Obsolete("This method will be removed in the next release. Please use Add() instead.")]
- public virtual Branch Create(string name, string shaOrReferenceName, bool allowOverwrite = false)
+ public virtual Branch Create(string name, string commitish, bool allowOverwrite = false)
{
- return Add(name, shaOrReferenceName, allowOverwrite);
+ return Add(name, commitish, allowOverwrite);
}
/// <summary>