8000 Downgrade libgit2 binaries to cd2cc2d · joncham/libgit2sharp@bcb1feb · GitHub
[go: up one dir, main page]

Skip to content

Commit bcb1feb

Browse files
committed
Downgrade libgit2 binaries to cd2cc2d
This should solve (not explain) an issue with the CI server complaining about AccessViolationException. The problem can be reproduced with libgit2 binaries 5711ca9. The root cause has yet to be analyzed.
1 parent 12dbc0d commit bcb1feb

File tree

4 files changed

+34
-34
lines changed

4 files changed

+34
-34
lines changed

Lib/git2.dll

-39 KB
Binary file not shown.

LibGit2Sharp/Core/Ensure.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ public static void Success(int result)
4646
{
4747
return;
4848
}
49-
50-
string errorMessage = NativeMethods.git_lasterror().MarshallAsString();
49+
50+
string errorMessage = "An error occured"; // NativeMethods.git_lasterror().MarshallAsString();
5151

5252
throw new ApplicationException(
5353
String.Format(CultureInfo.InvariantCulture, "An error was raised by libgit2. Error code = {0} ({1}).{2}{3}", Enum.GetName(typeof(GitErrorCode), result), result, Environment.NewLine, errorMessage));

LibGit2Sharp/Core/GitErrorCode.cs

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -18,136 +18,136 @@ internal enum GitErrorCode
1818
/// <summary>
1919
/// Input was not a properly formatted Git object id.
2020
/// </summary>
21-
GIT_ENOTOID = -2,
21+
GIT_ENOTOID = (GIT_ERROR - 1),
2222

2323
/// <summary>
2424
/// Input does not exist in the scope searched.
2525
/// </summary>
26-
GIT_ENOTFOUND = -3,
26+
GIT_ENOTFOUND = (GIT_ERROR - 2),
2727

2828
/// <summary>
2929
/// Not enough space available.
3030
/// </summary>
31-
GIT_ENOMEM = -4,
31+
GIT_ENOMEM = (GIT_ERROR - 3),
3232

3333
/// <summary>
3434
/// Consult the OS error information.
3535
/// </summary>
36-
GIT_EOSERR = -5,
36+
GIT_EOSERR = (GIT_ERROR - 4),
3737

3838
/// <summary>
3939
/// The specified object is of invalid type
4040
/// </summary>
41-
GIT_EOBJTYPE = -6,
41+
GIT_EOBJTYPE = (GIT_ERROR - 5),
42+
43+
/// <summary>
44+
/// The specified object has its data corrupted
45+
/// </summary>
46+
GIT_EOBJCORRUPTED = (GIT_ERROR - 6),
4247

4348
/// <summary>
4449
/// The specified repository is invalid
4550
/// </summary>
46-
GIT_ENOTAREPO = -7,
51+
GIT_ENOTAREPO = (GIT_ERROR - 7),
4752

4853
/// <summary>
4954
/// The object type is invalid or doesn't match
5055
/// </summary>
51-
GIT_EINVALIDTYPE = -8,
56+
GIT_EINVALIDTYPE = (GIT_ERROR - 8),
5257

5358
/// <summary>
5459
/// The object cannot be written that because it's missing internal data
5560
/// </summary>
56-
GIT_EMISSINGOBJDATA = -9,
61+
GIT_EMISSINGOBJDATA = (GIT_ERROR - 9),
5762

5863
/// <summary>
5964
/// The packfile for the ODB is corrupted
6065
/// </summary>
61-
GIT_EPACKCORRUPTED = -10,
66+
GIT_EPACKCORRUPTED = (GIT_ERROR - 10),
6267

6368
/// <summary>
6469
/// Failed to adquire or release a file lock
6570
/// </summary>
66-
GIT_EFLOCKFAIL = -11,
71+
GIT_EFLOCKFAIL = (GIT_ERROR - 11),
6772

6873
/// <summary>
6974
/// The Z library failed to inflate/deflate an object's data
7075
/// </summary>
71-
GIT_EZLIB = -12,
76+
GIT_EZLIB = (GIT_ERROR - 12),
7277

7378
/// <summary>
7479
/// The queried object is currently busy
7580
/// </summary>
76-
GIT_EBUSY = -13,
81+
GIT_EBUSY = (GIT_ERROR - 13),
7782

7883
/// <summary>
7984
/// The index file is not backed up by an existing repository
8085
/// </summary>
81-
GIT_EBAREINDEX = -14,
86+
GIT_EBAREINDEX = (GIT_ERROR - 14),
8287

8388
/// <summary>
8489
/// The name of the reference is not valid
8590
/// </summary>
86-
GIT_EINVALIDREFNAME = -15,
91+
GIT_EINVALIDREFNAME = (GIT_ERROR - 15),
8792

8893
/// <summary>
8994
/// The specified reference has its data corrupted
9095
/// </summary>
91-
GIT_EREFCORRUPTED = -16,
96+
GIT_EREFCORRUPTED = (GIT_ERROR - 16),
9297

9398
/// <summary>
9499
/// The specified symbolic reference is too deeply nested
95100
/// </summary>
96-
GIT_ETOONESTEDSYMREF = -17,
101+
GIT_ETOONESTEDSYMREF = (GIT_ERROR - 17),
97102

98103
/// <summary>
99104
/// The pack-refs file is either corrupted of its format is not currently supported
100105
/// </summary>
101-
GIT_EPACKEDREFSCORRUPTED = -18,
106+
GIT_EPACKEDREFSCORRUPTED = (GIT_ERROR - 18),
102107

103108
/// <summary>
104109
/// The path is invalid
105110
/// </summary>
106-
GIT_EINVALIDPATH = -19,
111+
GIT_EINVALIDPATH = (GIT_ERROR - 19),
107112

108113
/// <summary>
109114
/// The revision walker is empty; there are no more commits left to iterate
110115
/// </summary>
111-
GIT_EREVWALKOVER = -20,
116+
GIT_EREVWALKOVER = (GIT_ERROR - 20),
112117

113118
/// <summary>
114119
/// The state of the reference is not valid
115120
/// </summary>
116-
GIT_EINVALIDREFSTATE = -21,
121+
GIT_EINVALIDREFSTATE = (GIT_ERROR - 21),
117122

118123
/// <summary>
119124
/// This feature has not been implemented yet
120125
/// </summary>
121-
GIT_ENOTIMPLEMENTED = -22,
126+
GIT_ENOTIMPLEMENTED = (GIT_ERROR - 22),
122127

123128
/// <summary>
124129
/// A reference with this name already exists
125130
/// </summary>
126-
GIT_EEXISTS = -23,
131+
GIT_EEXISTS = (GIT_ERROR - 23),
127132

128133
/// <summary>
129134
/// The given integer literal is too large to be parsed
130135
/// </summary>
131-
GIT_EOVERFLOW = -24,
136+
GIT_EOVERFLOW = (GIT_ERROR - 24),
132137

133138
/// <summary>
134139
/// The given literal is not a valid number
135140
/// </summary>
136-
GIT_ENOTNUM = -25,
141+
GIT_ENOTNUM = (GIT_ERROR - 25),
137142

138143
/// <summary>
139144
/// Streaming error
140145
/// </summary>
141-
GIT_ESTREAM = -26,
146+
GIT_ESTREAM = (GIT_ERROR - 26),
142147

143148
/// <summary>
144149
/// invalid arguments to function
145150
/// </summary>
146-
GIT_EINVALIDARGS = -27,
147-
148-
/// <summary>
149-
/// The specified object has its data corrupted
150-
/// </summary>
151-
GIT_EOBJCORRUPTED = -28,
151+
GIT_EINVALIDARGS = (GIT_ERROR - 27),
152152
}
153153
}

0 commit comments

Comments
 (0)
0