You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: LibGit2Sharp/Repository.cs
+57-9Lines changed: 57 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,25 @@ public sealed class Repository : IRepository
37
37
privatereadonlySubmoduleCollectionsubmodules;
38
38
privatereadonlyLazy<PathCase>pathCase;
39
39
40
+
privateenumRepositoryRequiredParameter
41
+
{
42
+
None=0,
43
+
Path=1,
44
+
Options=2,
45
+
}
46
+
47
+
/// <summary>
48
+
/// Initializes a new instance of the <see cref="Repository"/> class
49
+
/// that does not point to an on-disk Git repository. This is
50
+
/// suitable only for custom, in-memory Git repositories that are
51
+
/// configured with custom object database, reference database and/or
52
+
/// configuration backends.
53
+
/// </summary>
54
+
publicRepository()
55
+
:this(null,null,RepositoryRequiredParameter.None)
56
+
{
57
+
}
58
+
40
59
/// <summary>
41
60
/// Initializes a new instance of the <see cref="Repository"/> class.
42
61
/// <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>
@@ -45,31 +64,60 @@ public sealed class Repository : IRepository
45
64
/// The path to the git repository to open, can be either the path to the git directory (for non-bare repositories this
46
65
/// would be the ".git" folder inside the working directory) or the path to the working directory.
47
66
/// </param>
48
-
publicRepository(stringpath):this(path,null)
67
+
publicRepository(stringpath)
68
+
:this(path,null,RepositoryRequiredParameter.Path)
49
69
{}
50
70
51
71
/// <summary>
52
-
/// Initializes a new instance of the <see cref="Repository"/> class, providing optional behavioral overrides through <paramref name="options"/> parameter.
53
-
/// <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>
72
+
/// Initializes a new instance of the <see cref="Repository"/> class,
73
+
/// providing optional behavioral overrides through the
74
+
/// <paramref name="options"/> parameter.
75
+
/// <para>For a standard repository, <paramref name="path"/> may
76
+
/// either point to the ".git" folder or to the working directory.
77
+
/// For a bare repository, <paramref name="path"/> should directly
78
+
/// point to the repository folder.</para>
54
79
/// </summary>
55
80
/// <param name="path">
56
-
/// The path to the git repository to open, can be either the path to the git directory (for non-bare repositories this
57
-
/// would be the ".git" folder inside the working directory) or the path to the working directory.
81
+
/// The path to the git repository to open, can be either the
82
+
/// path to the git directory (for non-bare repositories this
83
+
/// would be the ".git" folder inside the working directory)
0 commit comments