Skip to content

xargs: Account for quoting on Windows for length limits#788

Open
lhecker wants to merge 1 commit into
uutils:mainfrom
lhecker:windows-quoting
Open

xargs: Account for quoting on Windows for length limits#788
lhecker wants to merge 1 commit into
uutils:mainfrom
lhecker:windows-quoting

Conversation

@lhecker

@lhecker lhecker commented Jul 21, 2026

Copy link
Copy Markdown

As reported at microsoft/coreutils#160.

Comment thread src/xargs/mod.rs
Comment on lines +158 to +170
match wch {
BACKSLASH => backslashes += 1,
QUOTE => {
// Account for n+1 additional backslashes before a quote.
len += backslashes + 1;
backslashes = 0;
}
SPACE | TAB => {
quote = true;
backslashes = 0;
}
_ => backslashes = 0,
}

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Apologies if this code is quite fugly. I'd also wish Windows had a sane argv system. 🙁

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.88%. Comparing base (187ed66) to head (ee56ad3).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #788   +/-   ##
=======================================
  Coverage   91.88%   91.88%           
=======================================
  Files          35       35           
  Lines        7159     7159           
  Branches      376      376           
=======================================
  Hits         6578     6578           
  Misses        437      437           
  Partials      144      144           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codspeed-hq

codspeed-hq Bot commented Jul 21, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 20 untouched benchmarks


Comparing lhecker:windows-quoting (ee56ad3) with main (187ed66)

Open in CodSpeed

@github-actions

Copy link
Copy Markdown

Commit ee56ad3 has test result changes:

bfs testsuite:

Test results comparison:
  Current:   TOTAL: 314 / PASSED: 267 / FAILED: 41 / SKIPPED: 6
  Reference: TOTAL: 313 / PASSED: 267 / FAILED: 40 / SKIPPED: 6

Changes from main branch:
  TOTAL: +1
  PASSED: +0
  FAILED: +1

New test failures (1):
  - gnu/okdir_path_empty

@lhecker

lhecker commented Jul 21, 2026

Copy link
Copy Markdown
Author

What does that failing test mean?

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.

1 participant