1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-02 05:57:46 +00:00
Commit graph

15884 commits

Author SHA1 Message Date
Nicolas Boichat
54b2c12844 seq: fast_inc: split carry operation to a separate function
This has no impact on performance, and will be useful for the
`cat` usecase when we move this to uucore.
2025-04-21 11:25:54 +02:00
Nicolas Boichat
03b2cab650 seq: Update doc for fast_inc 2025-04-21 11:25:54 +02:00
Nicolas Boichat
c311e208ae seq: Add constant width support in fast path
It is actually quite easy to implement, we just start with
a padded number and increment as usual.
2025-04-21 11:25:54 +02:00
Nicolas Boichat
560d1eb1b7 seq: Add a print_seq fast path function for integer and positive increments
A lot of custom logic, we basically do arithmetic on character
arrays, but this comes at with huge performance gains.

Unlike coreutils `seq`, we do this for all positive increments
(because why not), and we do not fall back to slow path if
the last parameter is in scientific notation.

Also, add some tests for empty separator, as that may catch
some corner cases.
2025-04-21 11:25:54 +02:00
Nicolas Boichat
a3e837ea99 test_ls: Improve test_ls_perm_io_errors
Do more extensive test of the output to check long output for
metadata failure, without relying on GnuTests
2025-04-21 11:12:26 +02:00
Ben Wiederhake
d7d0f9da7a
shred: correctly print zero-byte pass in verbose mode (#7800)
Fixes #7798.

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2025-04-21 11:06:06 +02:00
Sylvestre Ledru
b5e0e2342b
Merge pull request #7801 from drinkcat/ls-opt-1
ls: Print optimizations
2025-04-21 10:17:55 +02:00
Terts Diepraam
993644c74b
Merge pull request #7803 from jplatte/chroot
Fix chroot trying to change into non-existent directory
2025-04-21 09:39:57 +02:00
Daniel Hofstetter
06bae0d797
Merge pull request #7799 from BenWiederhake/dev-shred-verbose-no-padding
shred: remove unwanted padding in verbose messages
2025-04-21 09:33:44 +02:00
Daniel Hofstetter
36a6fe75fa
Merge pull request #7807 from uutils/renovate/blake3-1.x-lockfile
chore(deps): update rust crate blake3 to v1.8.2
2025-04-21 07:10:13 +02:00
renovate[bot]
0eab1c2391
chore(deps): update rust crate blake3 to v1.8.2 2025-04-21 02:13:39 +00:00
Jonas Platte
25ce0badf1
Fix chroot trying to change into non-existent directory 2025-04-20 22:12:21 +02:00
Nicolas Boichat
3de90b93ec ls/BENCHMARKING.md: Add some tricks 2025-04-20 22:07:21 +02:00
Nicolas Boichat
cd4cb43538 ls: display_item_name: Make current_column a closure
In many cases, current_column value is not actually needed, but
computing its value is quite expensive (`ansi_width` isn't very
fast).

Move the computation to a LazyCell, so that we only execute it
when required.

Saves 5% on a basic `ls -lR .git`.
2025-04-20 22:07:21 +02:00
Nicolas Boichat
4212385f76 ls: Add extend_pad_left/right functions that operate on Vec<u8>
Saves another ~7% performance.
2025-04-20 22:07:20 +02:00
Nicolas Boichat
8b9960f093 ls: Optimize display_item_long
Preallocate output_display to a larger size, and use `extend`
instead of format.

Saves about ~5% performance vs baseline implementation.
2025-04-20 22:06:58 +02:00
Zhang Wen
b009cae5a8
install: improve error message (#7794)
* friendly message install file to directory containing directory with same name

* install: test install file to directory containing directory with same name
2025-04-20 18:45:15 +02:00
Ben Wiederhake
af7a939b62 shred: remove unwanted padding in verbose messages
This is tested for in the GNU shred-passes test, so we don't have a
choice if we want to stay compatible.
2025-04-20 18:28:23 +02:00
Daniel Hofstetter
f92ee6a519
Merge pull request #7792 from karlmcdowall/tail_fix_v_option
tail: fix issue with -v flag and stdin
2025-04-20 17:00:37 +02:00
Karl McDowall
e35ef16030 tail: fix issue with -v flag and stdin
Fixes issue #7613
Tail now correctly handles the -v flag when only 1 input file is given.
2025-04-19 09:49:06 -06:00
Jeffrey Finkelstein
2717f9c8b5 mv: fix moving FIFO to a different filesystem
Fix a bug in `mv` where it would hang indefinitely while trying to copy
a FIFO across filesystems. The solution is to remove the old FIFO and
create a new one on the new filesystem.

Fixes #7076
2025-04-19 11:12:53 -04:00
Nicolas Boichat
ddbd995886 uucore: num_parser: Operate on slices, instead of iterator
Especially after splitting the `parse` function in multiple
chunks, this makes the code a bit easier to read, despite the fact
that `parse` is still inherently a complex function.
2025-04-19 17:09:13 +02:00
Daniel Hofstetter
1d89ea5b6d
Merge pull request #7781 from dan-hipschman/env-ignore-flags-after-command
env: ignore flags after the command or -- argument
2025-04-19 14:50:21 +02:00
Daniel Hofstetter
ed3dad81f7
Merge pull request #7786 from siddharthteli12/main
whoami: remove unused libc dependency
2025-04-19 13:29:14 +02:00
Sylvestre Ledru
e7f33f533b
Merge pull request #7776 from karlmcdowall/od_7666
od: fix for issue #7666
2025-04-19 12:03:00 +02:00
Sylvestre Ledru
c76467896a
Merge pull request #7770 from karlmcdowall/yes_splice
yes: Remove usage of vmsplice
2025-04-19 11:41:17 +02:00
jfinkels
3965bc5b9e
Merge pull request #7775 from jfinkels/cp-make-fifo-uucore
cp: factor make_fifo() function out to uucore::fs
2025-04-19 11:40:29 +02:00
siddharthteli12
5a02e74e8b whoami: remove unused libc dependency 2025-04-19 13:52:41 +05:30
Daniel Hofstetter
74e353dec0
Merge pull request #7783 from uutils/renovate/clap-4.x-lockfile
chore(deps): update rust crate clap to v4.5.37
2025-04-19 07:03:23 +02:00
Karl McDowall
b692fad45d od: Ensure stdin is left in the correct state
Fixes issue #7666
For `od` utility, if client specifies `-N` maximum bytes to be read
then ensure stdin is left pointing to the next byte when `od` exits.
To do this...
 - Bypass standard buffering on stdin.
 - Instantiate BufReader further up the stack to maintain performance.
2025-04-18 21:14:29 -06:00
Dan Hipschman
814e82ea4e env: ignore flags after the command or -- argument 2025-04-18 18:48:37 -07:00
renovate[bot]
7292ab97fa
chore(deps): update rust crate clap to v4.5.37 2025-04-18 19:51:00 +00:00
Daniel Hofstetter
50a3940797
Merge pull request #7764 from BenWiederhake/dev-du-demo-working-features
du: test existing correct behavior: warn about --inodes -b conflict
2025-04-18 16:56:10 +02:00
Ben Wiederhake
d6e78d738d du: test existing correct behavior: warn about --inodes -b conflict 2025-04-18 16:21:24 +02:00
Sylvestre Ledru
0f061dee68
Merge pull request #7779 from cakebaker/ci_lint_selinux
ci: lint with selinux
2025-04-18 14:36:27 +02:00
Lukas
d59ac4912c
csplit: removed unnecesary implementation of From<io::Error> (#7778) 2025-04-18 14:28:13 +02:00
Daniel Hofstetter
3210638168 ls,stat: fix single_char_pattern in tests 2025-04-18 13:52:47 +02:00
Daniel Hofstetter
0309ccd28b selinux: fix empty_line_after_doc_comments 2025-04-18 13:47:31 +02:00
Daniel Hofstetter
5e929577a8 ci: lint with selinux 2025-04-18 13:19:18 +02:00
Sylvestre Ledru
38ef20c385
Merge pull request #7777 from Qelxiros/7678-parsing-tests
add tests against '0 in sleep/timeout durations
2025-04-18 10:02:40 +02:00
Daniel Hofstetter
6cccd340f7
Merge pull request #7774 from jfinkels/mv-refactor-into-helpers
mv: factor rename_with_fallback function into helpers
2025-04-18 09:45:03 +02:00
Daniel Hofstetter
6ea58ea0aa
Merge pull request #7768 from sylvestre/ls-selinux
ls: add selinux support
2025-04-18 09:07:10 +02:00
Justin Tracey
42d06f9ddb
printf: fix OsString handling 2025-04-18 00:39:21 -04:00
Sylvestre Ledru
af577e7a14
printf: support for extract chars
Should fix tests/printf/printf-mb.sh
2025-04-18 00:39:13 -04:00
Sylvestre Ledru
79cb095636
printf: support for invalid utf-8 page 2025-04-18 00:39:05 -04:00
Sylvestre Ledru
e5980d4d2a
printf: simplify and dedup some tests 2025-04-18 00:38:57 -04:00
Sylvestre Ledru
8ff0db1db9
printf: Improve support for printing multi-byte values of characters 2025-04-18 00:38:48 -04:00
Jeremy Smart
5bcc56add5
sleep: add tests 2025-04-17 21:42:38 -04:00
Jeremy Smart
8cfffecd5f
timeout: add tests 2025-04-17 21:32:58 -04:00
Jeffrey Finkelstein
3b2db58a78 mv: factor rename_with_fallback func into helpers
Factor out helper functions from the `rename_with_fallback()` function
so that there is one fallback helper per file type (symlink, directory,
or file). This doesn't change the functionality of `mv`, it is just a
re-organization of the code.
2025-04-17 20:36:56 -04:00