Skip to content

Commit 1238c81

Browse files
committed
fixup! Ensure filter streams expose properties that makes sense
1 parent 616ab06 commit 1238c81

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

LibGit2Sharp.Tests/FilterFixture.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,8 +358,11 @@ public void FilterStreamsAreCoherent()
358358
{
359359
Assert.False(input.CanWrite);
360360
Assert.True(input.CanRead);
361+
Assert.False(input.CanSeek);
362+
361363
Assert.False(output.CanRead);
362364
Assert.True(output.CanWrite);
365+
Assert.False(input.CanSeek);
363366

364367
return GitPassThrough;
365368
};

LibGit2Sharp/Core/GitBufReadStream.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,15 @@ private static long ConvertToLong(UIntPtr len)
3434

3535
return (long)len.ToUInt64();
3636
}
37+
38+
public override long Seek(long offset, SeekOrigin loc)
39+
{
40+
throw new NotSupportedException();
41+
}
42+
43+
public override bool CanSeek
44+
{
45+
get { return false; }
46+
}
3747
}
3848
}

0 commit comments

Comments
 (0)