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
/// 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.
Copy file name to clipboardExpand all lines: LibGit2Sharp/LibGit2SharpException.cs
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
1
usingSystem;
2
+
usingSystem.Globalization;
2
3
usingSystem.Runtime.Serialization;
3
4
usingLibGit2Sharp.Core;
4
5
@@ -36,6 +37,17 @@ public LibGit2SharpException(string message, Exception innerException)
36
37
{
37
38
}
38
39
40
+
/// <summary>
41
+
/// Initializes a new instance of the <see cref="LibGit2SharpException"/> class with a specified error message and a reference to the inner exception that is the cause of this exception.
42
+
/// </summary>
43
+
/// <param name="cultureInfo">An object that supplies culture-specific formatting information.</param>
44
+
/// <param name="format">A composite format string for use in <see cref="String.Format(IFormatProvider, string, object[])"/>.</param>
45
+
/// <param name="args">An object array that contains zero or more objects to format.</param>
Copy file name to clipboardExpand all lines: LibGit2Sharp/RemoveFromIndexException.cs
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
1
usingSystem;
2
+
usingSystem.Globalization;
2
3
usingSystem.Runtime.Serialization;
3
4
4
5
namespaceLibGit2Sharp
@@ -25,6 +26,17 @@ public RemoveFromIndexException(string message)
25
26
{
26
27
}
27
28
29
+
/// <summary>
30
+
/// Initializes a new instance of the <see cref="LibGit2SharpException"/> class with a specified error message and a reference to the inner exception that is the cause of this exception.
31
+
/// </summary>
32
+
/// <param name="cultureInfo">An object that supplies culture-specific formatting information.</param>
33
+
/// <param name="format">A composite format string for use in <see cref="String.Format(IFormatProvider, string, object[])"/>.</param>
34
+
/// <param name="args">An object array that contains zero or more objects to format.</param>
/// Initializes a new instance of the <see cref="UnmatchedPathException"/> class with a specified error message and a reference to the inner exception that is the cause of this exception.
thrownewLibGit2SharpException(string.Format(CultureInfo.InvariantCulture,"Unable to move file '{0}'. Its current status is '{1}'.",sourcePath,sourceStatus));
"Unable to move file '{0}'. Its current status is '{1}'.",
1851
+
sourcePath,
1852
+
sourceStatus);
1852
1853
}
1853
1854
1854
1855
FileStatusdesStatus=keyValuePair.Value.Item2;
@@ -1857,7 +1858,10 @@ public void Move(IEnumerable<string> sourcePaths, IEnumerable<string> destinatio
1857
1858
continue;
1858
1859
}
1859
1860
1860
-
thrownewLibGit2SharpException(string.Format(CultureInfo.InvariantCulture,"Unable to overwrite file '{0}'. Its current status is '{1}'.",destPath,desStatus));
"Unable to overwrite file '{0}'. Its current status is '{1}'.",
1863
+
destPath,
1864
+
desStatus);
1861
1865
}
1862
1866
1863
1867
stringwd=Info.WorkingDirectory;
@@ -2090,29 +2094,34 @@ private IEnumerable<string> RemoveStagedItems(IEnumerable<string> paths, bool re
2090
2094
status.HasFlag(FileStatus.ModifiedInIndex)||
2091
2095
status.HasFlag(FileStatus.NewInIndex)))
2092
2096
{
2093
-
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.",
"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.",
thrownewRemoveFromIndexException(string.Format(CultureInfo.InvariantCulture,"Unable to remove file '{0}', as it has staged content different from both the working directory and the HEAD.",
"Unable to remove file '{0}', as it has staged content different from both the working directory and the HEAD.",
2109
+
treeEntryChanges.Path);
2104
2110
}
2105
2111
if(removeFromWorkingDirectory)
2106
2112
{
2107
-
thrownewRemoveFromIndexException(string.Format(CultureInfo.InvariantCulture,"Unable to remove file '{0}', as it has local modifications. You can call the Remove() method with removeFromWorkingDirectory=false if you want to remove it from the index only.",
"Unable to remove file '{0}', as it has local modifications. You can call the Remove() method with removeFromWorkingDirectory=false if you want to remove it from the index only.",
0 commit comments