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
+44-19Lines changed: 44 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -38,23 +38,48 @@ public sealed class Repository : IRepository
38
38
privatereadonlyLazy<PathCase>pathCase;
39
39
40
40
/// <summary>
41
-
/// Initializes a new instance of the <see cref="Repository"/> class, providing ooptional behavioral overrides through <paramref name="options"/> parameter.
42
-
/// <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>
41
+
/// Initializes a new instance of the <see cref="Repository"/> class.
42
+
/// <para>For a standard repository, <paramref name="path"/> may
43
+
/// either point to the ".git" folder or to the working directory.
44
+
/// For a bare repository, <paramref name="path"/> should directly
45
+
/// point to the repository folder.</para>
43
46
/// </summary>
44
47
/// <param name="path">
45
-
/// The path to the git repository to open, can be either the path to the git directory (for non-bare repositories this
46
-
/// would be the ".git" folder inside the working directory) or the path to the working directory.
48
+
/// The path to the git repository to open, can be either the
49
+
/// path to the git directory (for non-bare repositories this
50
+
/// would be the ".git" folder inside the working directory)
51
+
/// or the path to the working directory.
52
+
/// </param>
53
+
publicRepository(stringpath):
54
+
this(path,null)
55
+
{
56
+
}
57
+
58
+
/// <summary>
59
+
/// Initializes a new instance of the <see cref="Repository"/> class,
60
+
/// providing optional behavioral overrides through the
61
+
/// <paramref name="options"/> parameter.
62
+
/// <para>For a standard repository, <paramref name="path"/> may
63
+
/// either point to the ".git" folder or to the working directory.
64
+
/// For a bare repository, <paramref name="path"/> should directly
65
+
/// point to the repository folder.</para>
66
+
/// </summary>
67
+
/// <param name="path">
68
+
/// The path to the git repository to open, can be either the
69
+
/// path to the git directory (for non-bare repositories this
70
+
/// would be the ".git" folder inside the working directory)
@@ -1857,7 +1882,7 @@ private IEnumerable<string> RemoveStagedItems(IEnumerable<string> paths, bool re
1857
1882
caseChangeKind.Unmodified:
1858
1883
if(removeFromWorkingDirectory&&(
1859
1884
status.HasFlag(FileStatus.Staged)||
1860
-
status.HasFlag(FileStatus.Added)))
1885
+
status.HasFlag(FileStatus.Added)))
1861
1886
{
1862
1887
thrownewRemoveFromIndexException(string.Format(CultureInfo.InvariantCulture,"Unable to remove file '{0}', as it has changes staged in the index. You can call the Remove() method with removeFromWorkingDirectory=false if you want to remove it from the index only.",
0 commit comments