Skip to content

Commit bcc9bbb

Browse files
committed
deprecated optional parameter in Repository ctor
1 parent 974a31c commit bcc9bbb

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

LibGit2Sharp/Repository.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,17 @@ public sealed class Repository : IRepository
3636
private readonly SubmoduleCollection submodules;
3737
private readonly Lazy<PathCase> pathCase;
3838

39+
/// <summary>
40+
/// Initializes a new instance of the <see cref="Repository"/> class, providing ooptional behavioral overrides through <paramref name="options"/> parameter.
41+
/// <para>For a standard repository, <paramref name="path"/> should either point to the ".git" folder or to the working directory. For a bare repository, <paramref name="path"/> should directly point to the repository folder.</para>
42+
/// </summary>
43+
/// <param name="path">
44+
/// The path to the git repository to open, can be either the path to the git directory (for non-bare repositories this
45+
/// would be the ".git" folder inside the working directory) or the path to the working directory.
46+
/// </param>
47+
public Repository(string path) : this(path, null)
48+
{ }
49+
3950
/// <summary>
4051
/// Initializes a new instance of the <see cref="Repository"/> class, providing ooptional behavioral overrides through <paramref name="options"/> parameter.
4152
/// <para>For a standard repository, <paramref name="path"/> should either point to the ".git" folder or to the working directory. For a bare repository, <paramref name="path"/> should directly point to the repository folder.</para>
@@ -47,7 +58,7 @@ public sealed class Repository : IRepository
4758
/// <param name="options">
4859
/// Overrides to the way a repository is opened.
4960
/// </param>
50-
public Repository(string path, RepositoryOptions options = null)
61+
public Repository(string path, RepositoryOptions options)
5162
{
5263
Ensure.ArgumentNotNullOrEmptyString(path, "path");
5364

0 commit comments

Comments
 (0)