8000 Drop dead code · philhack/libgit2sharp@b5ad8a5 · GitHub
[go: up one dir, main page]

Skip to content

Commit b5ad8a5

Browse files
committed
Drop dead code
In `git_odb_write()`, libgit2 already calls `git_odb_exists()` before invoking the backend write() method.
1 parent cf7bcff commit b5ad8a5

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

LibGit2Sharp.Tests/OdbBackendFixture.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -254,11 +254,6 @@ public override int ReadPrefix(byte[] shortOid, int len, out byte[] oid, out Str
254254

255255
public override int Write(ObjectId oid, Stream dataStream, long length, ObjectType objectType)
256256
{
257-
if (m_objectIdToContent.ContainsKey(oid))
258-
{
259-
return GIT_EEXISTS;
260-
}
261-
262257
if (length > int.MaxValue)
263258
{
264259
return GIT_ERROR;
@@ -295,7 +290,6 @@ public override bool Exists(ObjectId oid)
295290
private const int GIT_OK = 0;
296291
private const int GIT_ERROR = -1;
297292
private const int GIT_ENOTFOUND = -3;
298-
private const int GIT_EEXISTS = -4;
299293
private const int GIT_EAMBIGUOUS = -5;
300294

301295
#region Unimplemented

0 commit comments

Comments
 (0)
0