Skip to content
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

fix(gitworktree): decode bytes before itemization #741

Merged
merged 1 commit into from
Jul 11, 2024
Merged

Conversation

mih
Copy link
Member

@mih mih commented Jul 11, 2024

decode_bytes() can yield multiple output chunks for one input chunk (in the case of decoding errors). This implies that it cannot be meaningfully used after itemize() without threatening the semantics of the items (i.e., with split-by-line items are no longer unique lines).

For this reason, this commit changes the order of these helpers in the gitworktree() implementation.

Refs: datalad/datasalad#35

`decode_bytes()` can yield multiple output chunks for one input chunk
(in the case of decoding errors). This implies that it cannot be
meaningfully used after `itemize()` without threatening the semantics
of the items (i.e., with split-by-line items are no longer unique
lines).

For this reason, this commit changes the order of these helpers in
the `gitworktree()` implementation.

Refs: https://github.com/datalad/datalad-next/issues/740
Copy link

codecov bot commented Jul 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.51%. Comparing base (f00cfdb) to head (5fe82ea).
Report is 64 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #741      +/-   ##
==========================================
+ Coverage   92.47%   92.51%   +0.04%     
==========================================
  Files         195      195              
  Lines       14301    14301              
  Branches     2162     2162              
==========================================
+ Hits        13225    13231       +6     
+ Misses        812      804       -8     
- Partials      264      266       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@christian-monch christian-monch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx @mih, LGTM

@mih mih merged commit 249c5cc into datalad:main Jul 11, 2024
9 checks passed
@mih mih deleted the decodeorder branch July 11, 2024 07:14
mih added a commit that referenced this pull request Jul 13, 2024
Follow-up to #741, fixing the rest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants