Skip to content

extract: print only the member names with -v - #420

Open
jayhemnani9910 wants to merge 2 commits into
uutils:mainfrom
jayhemnani9910:extract-verbose-no-header
Open

jayhemnani9910 wants to merge 2 commits into
uutils:mainfrom
jayhemnani9910:extract-verbose-no-header

Conversation

@jayhemnani9910

Copy link
Copy Markdown
Contributor

tar -xvf archive.tar prints an Extracting archive: archive.tar line before the member names. GNU tar prints only the names:

$ tar -xvf a.tar            # GNU tar 1.35
file1.txt
dir/file2.txt
$ tarapp -xvf a.tar         # main
Extracting archive: a.tar
file1.txt
dir/file2.txt

Scripts that read the extracted names from -xv (or count them) get an extra line that isn't a file. The line came with the first extract implementation; -cv and -tv never had one.

The line is removed, and with it the archive_path parameter of extract_archive, which was only used for it.

New test test_extract_verbose_lists_only_members checks the exact output (fails on main). cargo test --workspace: all pass (test_tar 69, 68 on main), cargo clippy --workspace --all-targets clean (the bench caller is updated too).

-xv printed an 'Extracting archive: NAME' line before the members.
GNU tar prints only the member names.
Copilot AI balanced review requested due to automatic review settings October 26, 2026 03:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@codspeed

codspeed Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

1 warning

⚠️ 5 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 7 untouched benchmarks


Comparing jayhemnani9910:extract-verbose-no-header (f3fa931) with main (bf97f79)

Open in CodSpeed

@codecov

codecov Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.25%. Comparing base (791ae26) to head (f3fa931).
⚠️ Report is 108 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #420      +/-   ##
==========================================
+ Coverage   96.84%   98.25%   +1.40%     
==========================================
  Files          11       15       +4     
  Lines        1492     2006     +514     
  Branches       29       39      +10     
==========================================
+ Hits         1445     1971     +526     
+ Misses         46       34      -12     
  Partials        1        1              
Flag Coverage Δ
macos_latest 98.25% <100.00%> (+1.40%) ⬆️
ubuntu_latest 98.25% <100.00%> (+1.40%) ⬆️
windows_latest 0.00% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

Comment thread tests/by-util/test_tar.rs Outdated
}

#[test]
fn test_extract_verbose_lists_only_members() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

almost the same as test_extract_verbose just below
could you please switch that one to stdout_only instead of adding a new test?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in f3fa931: removed the new test and switched test_extract_verbose to stdout_only.

Copilot AI balanced review requested due to automatic review settings October 27, 2026 06:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

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.

3 participants