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
+43-4Lines changed: 43 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,18 @@ public sealed class Repository : IRepository
37
37
privatereadonlyLazy<PathCase>pathCase;
38
38
39
39
/// <summary>
40
-
/// Initializes a new instance of the <see cref="Repository"/> class, providing ooptional behavioral overrides through <paramref name="options"/> parameter.
40
+
/// Initializes a new instance of the <see cref="Repository"/> class.
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
+
publicRepository(stringpath):this(path,null)
48
+
{}
49
+
50
+
/// <summary>
51
+
/// Initializes a new instance of the <see cref="Repository"/> class, providing optional behavioral overrides through <paramref name="options"/> parameter.
41
52
/// <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
53
/// </summary>
43
54
/// <param name="path">
@@ -47,7 +58,7 @@ public sealed class Repository : IRepository
/// Initialize a repository at the specified <paramref name="path"/>.
381
+
/// </summary>
382
+
/// <param name="path">The path to the working folder when initializing a standard ".git" repository. Otherwise, when initializing a bare repository, the path to the expected location of this later.</param>
383
+
/// <returns>The path to the created repository.</returns>
384
+
publicstaticstringInit(stringpath)
385
+
{
386
+
returnInit(path,false);
387
+
}
388
+
368
389
/// <summary>
369
390
/// Initialize a repository at the specified <paramref name="path"/>.
370
391
/// </summary>
371
392
/// <param name="path">The path to the working folder when initializing a standard ".git" repository. Otherwise, when initializing a bare repository, the path to the expected location of this later.</param>
372
393
/// <param name="isBare">true to initialize a bare repository. False otherwise, to initialize a standard ".git" repository.</param>
373
394
/// <returns>The path to the created repository.</returns>
0 commit comments