Skip to content

Commit

Permalink
Merge pull request #2072 from tyrielv/user/tyvella/objectdatabase-wri…
Browse files Browse the repository at this point in the history
…te-stream

fix #2071 ObjectDatabase.Write<T>(Stream, long) does not respect T
  • Loading branch information
bording authored Nov 26, 2024
2 parents b8f974f + d89638c commit af85e63
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.", nameof(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 af85e63

Please sign in to comment.