diff options
author | yorah <yoram.harmelin@gmail.com> | 2013-04-18 20:35:37 +0400 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2013-05-04 20:59:37 +0400 |
commit | 88cf0d95103dbfe3a85ce47c7bb3e29e7e3a979b (patch) | |
tree | 8b7ebb937401c82904df4722b5cc7a5dc9e0ad99 /LibGit2Sharp/StashCollection.cs | |
parent | 02638bbb35484e7d13da860783bff9cdc514f436 (diff) |
Remove obsolete methods
Diffstat (limited to 'LibGit2Sharp/StashCollection.cs')
-rw-r--r-- | LibGit2Sharp/StashCollection.cs | 39 |
1 files changed, 1 insertions, 38 deletions
diff --git a/LibGit2Sharp/StashCollection.cs b/LibGit2Sharp/StashCollection.cs index 33cbf294..0dc50340 100644 --- a/LibGit2Sharp/StashCollection.cs +++ b/LibGit2Sharp/StashCollection.cs @@ -69,7 +69,7 @@ namespace LibGit2Sharp throw new ArgumentOutOfRangeException("index", "The passed index must be a positive integer."); } - GitObject stashCommit = repo.Lookup(string.Format("stash@{{{0}}}", index), Core.GitObjectType.Commit, LookUpOptions.None); + GitObject stashCommit = repo.Lookup(string.Format("stash@{{{0}}}", index), GitObjectType.Commit, LookUpOptions.None); return stashCommit == null ? null : new Stash(repo, stashCommit.Id, index); } @@ -113,43 +113,6 @@ namespace LibGit2Sharp Proxy.git_stash_drop(repo.Handle, index); } - /// <summary> - /// Remove a single stashed state from the stash list. - /// </summary> - /// <param name = "stashRefLog">The log reference of the stash to delete. Pattern is "stash@{i}" where i is the index of the stash to remove</param> - [Obsolete("This method will be removed in the next release. Please use Repository.Stashes.Remove(int) instead.")] - public virtual void Remove(string stashRefLog) - { - Ensure.ArgumentNotNullOrEmptyString(stashRefLog, "stashRefLog"); - - int index; - if (!TryExtractStashIndexFromRefLog(stashRefLog, out index) || index < 0) - { - throw new ArgumentException("must be a valid stash log reference. Pattern is 'stash@{i}' where 'i' is an integer", "stashRefLog"); - } - - Remove(index); - } - - private static bool TryExtractStashIndexFromRefLog(string stashRefLog, out int index) - { - index = -1; - - if (!stashRefLog.StartsWith("stash@{")) - { - return false; - } - - if (!stashRefLog.EndsWith("}")) - { - return false; - } - - var indexAsString = stashRefLog.Substring(7, stashRefLog.Length - 8); - - return int.TryParse(indexAsString, out index); - } - private string DebuggerDisplay { get |