Skip to content

Commit e6b29ab

Browse files
committed
fix #2071 ObjectDatabase.Write<T>(Stream, long) does not respect T
1 parent 8950f49 commit e6b29ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

LibGit2Sharp/ObjectDatabase.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public virtual ObjectId Write<T>(Stream stream, long numberOfBytesToConsume) whe
202202
throw new ArgumentException("The stream cannot be read from.", "stream");
203203
}
204204

205-
using (var odbStream = Proxy.git_odb_open_wstream(handle, numberOfBytesToConsume, GitObjectType.Blob))
205+
using (var odbStream = Proxy.git_odb_open_wstream(handle, numberOfBytesToConsume, GitObject.TypeToKindMap[typeof(T)]))
206206
{
207207
var buffer = new byte[4 * 1024];
208208
long totalRead = 0;

0 commit comments

Comments
 (0)