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

Skip to content

Commit 43d7bed

Browse files
Drop dead code
`FinalizeWrite()` is only invoked if the object pointed at by the oid isn't found in any backend.
1 parent b5ad8a5 commit 43d7bed

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

LibGit2Sharp.Tests/OdbBackendFixture.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -371,10 +371,8 @@ public override int FinalizeWrite(ObjectId oid)
371371

372372
var backend = (MockOdbBackend)Backend;
373373

374-
if (!backend.m_objectIdToContent.ContainsKey(oid))
375-
{
376-
backend.m_objectIdToContent.Add(oid, new MockGitObject(oid, m_type, m_length, m_chunks));
377-
}
374+
backend.m_objectIdToContent.Add(oid,
375+
new MockGitObject(oid, m_type, m_length, m_chunks));
378376

379377
return GIT_OK;
380378
}

0 commit comments

Comments
 (0)
0