Skip to content

Commit

Permalink
fix #2071 ObjectDatabase.Write<T>(Stream, long) does not respect T
Browse files Browse the repository at this point in the history
  • Loading branch information
tyrielv committed Jan 4, 2024
1 parent 8950f49 commit 93ceaf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion LibGit2Sharp/ObjectDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public virtual ObjectId Write<T>(Stream stream, long numberOfBytesToConsume) whe
throw new ArgumentException("The stream cannot be read from.", "stream");
}

using (var odbStream = Proxy.git_odb_open_wstream(handle, numberOfBytesToConsume, GitObjectType.Blob))
using (var odbStream = Proxy.git_odb_open_wstream(handle, numberOfBytesToConsume, GitObject.TypeToGitKindMap[typeof(T)]))
{
var buffer = new byte[4 * 1024];
long totalRead = 0;
Expand Down

0 comments on commit 93ceaf5

Please sign in to comment.