-
Notifications
You must be signed in to change notification settings - Fork 34
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
Support for pax global extended headers #119
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would fix #120. I will need to read up on this first
fab7533
to
810e173
Compare
810e173
to
bb56a58
Compare
Rebased on 2.4.0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I made a few comments.
I think this is nice. I am not sure what the ~level
argument should mean. Should we not handle pax extended headers when the level is V7
for example? This seems to not be the case in the existing code, but maybe it should be.
Co-authored-by: Reynir Björnsson <[email protected]>
Fix using globals discovered when looping in archives.
Thanks! |
>>= fun () -> | ||
really_write fd (Header.zero_padding pax) | ||
|
||
let write ?level ?global header fd = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After reading this again I'm not sure I like the ?global
argument. It's unclear if this is to keep track of the global extended header state (which it is not), and passing the same global
value would lead to writing the same global extended header multiple times. This interface also doesn't allow writing an "empty" tar archive with just a comment, for example.
I think I would prefer another function write_global
that takes a Tar.Header.Extended.t
and does the required serializations and writes it to output.
Unfinished work.PoC for supporting pax global extended headers. They introduce global state, which needs to be threaded to calls to
HR.read
, breaking the API.The change is somewhat important, so I haven't completed the work.Any thoughts? :-)