Write V2 Index Files (with TREE and EOIE extensions)#473
Merged
Byron merged 13 commits intoGitoxideLabs:mainfrom Aug 12, 2022
Merged
Write V2 Index Files (with TREE and EOIE extensions)#473Byron merged 13 commits intoGitoxideLabs:mainfrom
Byron merged 13 commits intoGitoxideLabs:mainfrom
Conversation
added 8 commits
August 3, 2022 09:41
...to one single roundtrip test
- write_to now with proper signature - no more Writer struct
Member
Session Notes
diff --git a/git-index/tests/index/file/write.rs b/git-index/tests/index/file/write.rs
index aa4342816..49d2129a1 100644
--- a/git-index/tests/index/file/write.rs
+++ b/git-index/tests/index/file/write.rs
@@ -1,5 +1,17 @@
use git_index::write::Options;
+#[test]
+fn roundtrips() {
+ for version in [Version::V2] {
+ for fixture_path in ["all fixtures"] {
+ let mut buf = Vec::<u8>::new();
+ let actual = git_index::File::at(fixture_path)?;
+ actual.state.write_to(&mut buf, Options { version })?;
+ let foo = git_index::State::from_bytes(&buf)?;
+ }
+ }
+}
+
#[test]
fn v2_empty() {
let path = crate::fixture_index_path("V2_empty"); |
Member
Session Notes
|
Member
|
Thanks a lot! I took a couple of notes in the tracking issue and plan to look at it a little more thoroughly to generalize the end-of-index extension a little more. The main refactorings done here should help to…
What's currently in |
This was referenced Aug 13, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Write V2 Index Files
Features
Version Support
Extensions
Out of Scope