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:
authorMetalrom <romain.magny@gmail.com>2013-01-08 15:12:35 +0400
committerMetalrom <romain.magny@gmail.com>2013-01-10 17:20:02 +0400
commit191bd74c933427a377a5eb2ffeb4a0f39a26ceb0 (patch)
tree1ff46ea3c6545a52c0ea4d03c887ce1d5d73a597
parentd71f7561dd8ac5e7e6636f380a25d3fd1b4e5087 (diff)
Rename AmbiguousException as AmbiguousSpecificationException
-rw-r--r--LibGit2Sharp.Tests/RepositoryFixture.cs2
-rw-r--r--LibGit2Sharp.Tests/StatusFixture.cs4
-rw-r--r--LibGit2Sharp/AmbiguousSpecificationException.cs (renamed from LibGit2Sharp/AmbiguousException.cs)21
-rw-r--r--LibGit2Sharp/Core/Proxy.cs4
-rw-r--r--LibGit2Sharp/LibGit2Sharp.csproj2
5 files changed, 16 insertions, 17 deletions
diff --git a/LibGit2Sharp.Tests/RepositoryFixture.cs b/LibGit2Sharp.Tests/RepositoryFixture.cs
index 829fee49..55f1ef03 100644
--- a/LibGit2Sharp.Tests/RepositoryFixture.cs
+++ b/LibGit2Sharp.Tests/RepositoryFixture.cs
@@ -396,7 +396,7 @@ namespace LibGit2Sharp.Tests
{
using (var repo = new Repository(BareTestRepoPath))
{
- Assert.Throws<AmbiguousException>(() => repo.Lookup("e90"));
+ Assert.Throws<AmbiguousSpecificationException>(() => repo.Lookup("e90"));
}
}
diff --git a/LibGit2Sharp.Tests/StatusFixture.cs b/LibGit2Sharp.Tests/StatusFixture.cs
index f05cd503..e4240ae8 100644
--- a/LibGit2Sharp.Tests/StatusFixture.cs
+++ b/LibGit2Sharp.Tests/StatusFixture.cs
@@ -23,7 +23,7 @@ namespace LibGit2Sharp.Tests
{
using (var repo = new Repository(StandardTestRepoPath))
{
- Assert.Throws<AmbiguousException>(() => { FileStatus status = repo.Index.RetrieveStatus("1"); });
+ Assert.Throws<AmbiguousSpecificationException>(() => { FileStatus status = repo.Index.RetrieveStatus("1"); });
}
}
@@ -256,7 +256,7 @@ namespace LibGit2Sharp.Tests
fullFilePath = Path.Combine(repo.Info.WorkingDirectory, relativePath);
File.WriteAllText(fullFilePath, "Brackets all the way.");
- Assert.Throws<AmbiguousException>(() => repo.Index.RetrieveStatus(relativePath));
+ Assert.Throws<AmbiguousSpecificationException>(() => repo.Index.RetrieveStatus(relativePath));
}
}
}
diff --git a/LibGit2Sharp/AmbiguousException.cs b/LibGit2Sharp/AmbiguousSpecificationException.cs
index e8dc1760..499d327d 100644
--- a/LibGit2Sharp/AmbiguousException.cs
+++ b/LibGit2Sharp/AmbiguousSpecificationException.cs
@@ -4,44 +4,43 @@ using System.Runtime.Serialization;
namespace LibGit2Sharp
{
/// <summary>
- /// The exception that is thrown when provided filtering criteria lead to more
- /// than one result.
+ /// The exception that is thrown when the provided specification cannot uniquely identify a reference, an object or a path.
/// </summary>
[Serializable]
- public class AmbiguousException : LibGit2SharpException
+ public class AmbiguousSpecificationException : LibGit2SharpException
{
/// <summary>
- /// Initializes a new instance of the <see cref = "AmbiguousException" /> class.
+ /// Initializes a new instance of the <see cref = "AmbiguousSpecificationException" /> class.
/// </summary>
- public AmbiguousException()
+ public AmbiguousSpecificationException()
{
}
/// <summary>
- /// Initializes a new instance of the <see cref = "AmbiguousException" /> class with a specified error message.
+ /// Initializes a new instance of the <see cref = "AmbiguousSpecificationException" /> class with a specified error message.
/// </summary>
/// <param name = "message">A message that describes the error. </param>
- public AmbiguousException(string message)
+ public AmbiguousSpecificationException(string message)
: base(message)
{
}
/// <summary>
- /// Initializes a new instance of the <see cref = "AmbiguousException" /> class with a specified error message and a reference to the inner exception that is the cause of this exception.
+ /// Initializes a new instance of the <see cref = "AmbiguousSpecificationException" /> class with a specified error message and a reference to the inner exception that is the cause of this exception.
/// </summary>
/// <param name = "message">The error message that explains the reason for the exception. </param>
/// <param name = "innerException">The exception that is the cause of the current exception. If the <paramref name = "innerException" /> parameter is not a null reference, the current exception is raised in a catch block that handles the inner exception.</param>
- public AmbiguousException(string message, Exception innerException)
+ public AmbiguousSpecificationException(string message, Exception innerException)
: base(message, innerException)
{
}
/// <summary>
- /// Initializes a new instance of the <see cref = "AmbiguousException" /> class with a serialized data.
+ /// Initializes a new instance of the <see cref = "AmbiguousSpecificationException" /> class with a serialized data.
/// </summary>
/// <param name = "info">The <see cref="SerializationInfo "/> that holds the serialized object data about the exception being thrown.</param>
/// <param name = "context">The <see cref="StreamingContext"/> that contains contextual information about the source or destination.</param>
- protected AmbiguousException(SerializationInfo info, StreamingContext context)
+ protected AmbiguousSpecificationException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
diff --git a/LibGit2Sharp/Core/Proxy.cs b/LibGit2Sharp/Core/Proxy.cs
index e85a8304..c75c4369 100644
--- a/LibGit2Sharp/Core/Proxy.cs
+++ b/LibGit2Sharp/Core/Proxy.cs
@@ -1423,7 +1423,7 @@ namespace LibGit2Sharp.Core
return null;
case (int)GitErrorCode.Ambiguous:
- throw new AmbiguousException(string.Format(CultureInfo.InvariantCulture, "Provided abbreviated ObjectId '{0}' is too short.", objectish));
+ throw new AmbiguousSpecificationException(string.Format(CultureInfo.InvariantCulture, "Provided abbreviated ObjectId '{0}' is too short.", objectish));
default:
Ensure.Success(res);
@@ -1542,7 +1542,7 @@ namespace LibGit2Sharp.Core
return FileStatus.Nonexistent;
case (int)GitErrorCode.Ambiguous:
- throw new AmbiguousException(string.Format(CultureInfo.InvariantCulture, "More than one file matches the pathspec '{0}'. You can either force a literal path evaluation (GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH), or use git_status_foreach().", path));
+ throw new AmbiguousSpecificationException(string.Format(CultureInfo.InvariantCulture, "More than one file matches the pathspec '{0}'. You can either force a literal path evaluation (GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH), or use git_status_foreach().", path));
default:
Ensure.Success(res);
diff --git a/LibGit2Sharp/LibGit2Sharp.csproj b/LibGit2Sharp/LibGit2Sharp.csproj
index 83edb8d3..f44174c9 100644
--- a/LibGit2Sharp/LibGit2Sharp.csproj
+++ b/LibGit2Sharp/LibGit2Sharp.csproj
@@ -55,7 +55,7 @@
<Reference Include="System.Core" />
</ItemGroup>
<ItemGroup>
- <Compile Include="AmbiguousException.cs" />
+ <Compile Include="AmbiguousSpecificationException.cs" />
<Compile Include="BareRepositoryException.cs" />
<Compile Include="Blob.cs" />
<Compile Include="BlobExtensions.cs" />