Ensure Blob.ContentStream() has Length#543
Conversation
|
GitHub is so damn clever... embedded link to comment was correctly parsed as a reference in the corresponding issue. |
|
@dahlbyk Thanks for this! Thinking a bit about it, it's actually strange that given a For instance, shouldn't git_blob_filtered_content_stream return a larger |
|
Indeed, I would expect it to equal |
|
@dahlbyk Could you please add explicit tests setting the local config with |
|
Eh? |
|
TRAAAAAVIIIIISSS, you're not helping! |
LibGit2Sharp.Tests/BlobFixture.cs
Outdated
There was a problem hiding this comment.
Maybe should we clone the repo as we're modifying the config.
|
While you're working on this topic, could you please add a commit enhancing the xml doc of |
|
I'll be rather surprised if cloning the repo is sufficient to fix Travis, so... any ideas why |
|
@dahlbyk I remember something about the index capabilities being determined when the index handle is retrieved the first time. As a quick workaround, setting the new config value, disposing the Repository instance, then opening it once again should work. Update: I found what I was referring to. We should think about a way to work around this, this is outside the scope of this PR. |
|
@dahlbyk After having read the code more carefully, it looks like the index caps doesn't rely on However, I'd be curious to see if changing |
Another approach would be to consider that trying to "checkout" with We could add a protected |
Unrealistic, but if it's not explicitly unsupported then I would expect it to work... Trying the |
|
The documentation for Not much, if anything, is explicitly not supported in Git. It's simply assumed you won't be doing silly things like setting |
|
Pushed tests for |
No luck. I'm inclined to skip the Is |
|
libgit2/libgit2#1909 reproduces this issue. It passes on Windows (Yeah!) but fails on Linux (Less yeah-ish...) With a bit of luck and a large portion of @arrbee's help, hopefully this will get fixed. |
|
Rebased on master - maybe merge as-is and we can kill the OS-specific skips once libgit2/libgit2#1909 is resolved? |
Sir, it's done, Sir! ✨✨✨✨✨✨✨✨✨✨✨✨ |
Q: Does RawContentStream report the correct Length?
A: Yes!