Repository navigation
list: show numeric owners and pad the size column like GNU tar in -tv - #421
jayhemnani9910 wants to merge 1 commit into
Conversation
An entry without user and group names listed as '/', and the size was padded to 8 columns. GNU tar falls back to the ids and keeps the 'owner/group size' column 19 wide, widening it for longer entries.
There was a problem hiding this comment.
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.
Merging this PR will not alter performance1 warning
Comparing |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #421 +/- ##
==========================================
+ Coverage 96.84% 98.28% +1.43%
==========================================
Files 11 15 +4
Lines 1492 2046 +554
Branches 29 41 +12
==========================================
+ Hits 1445 2011 +566
+ Misses 46 34 -12
Partials 1 1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Two differences in
tar -tvffrom GNU tar 1.35:/instead of the numeric ids. Archives created by this tar carry no names, so listing them showsowner/group size19 columns wide and, after an entry that needs more, keeps the wider column for the rest of the listing:format_verbose_entrynow falls back to the uid and gid when a name is empty, andlist_archivekeeps the column width across entries (starting at 19, growing to fit), with the size right-aligned in what is left afterowner/group.New test
test_list_verbose_owner_and_size_columnsuses GNU tar's output for the same archive (fails on main).cargo test --workspace: test_tar 69 pass (68 on main),cargo clippy --workspace --all-targetsclean. Listed six archives (made by GNU tar, by this tar, with a 200 KB file, with a long owner name, and with names and ids mixed) with GNU tar and with this branch: identical output.Independent of the open
-vextract change (different file).