-
-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Write V2 Index Files (with TREE and EOIE extensions) #473
Merged
Conversation
This file contains 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
...to one single roundtrip test
- write_to now with proper signature - no more Writer struct
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"); |
Session Notes
|
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
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