1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-29 20:17:45 +00:00
Commit graph

15910 commits

Author SHA1 Message Date
Joseph Jon Booker
8ff45c97f0 uucore/quoting_style: Add support for quoting/escaping empty strings 2025-04-12 21:44:06 -05:00
Ben Wiederhake
875770f5d1 apply simple clippy nightly suggestions
See also:
https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains
https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_option_with_some
https://rust-lang.github.io/rust-clippy/master/index.html#ptr_eq
2025-04-13 04:35:38 +02:00
Ben Wiederhake
fc3f7eaa48 replace let_return as suggested by clippy
See also:
https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
2025-04-13 04:35:38 +02:00
Ben Wiederhake
11cd0b1bbf replace Error::new(ErrorKind::Other, _) as suggested by clippy
See also:
https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error
2025-04-13 04:35:38 +02:00
Jeremy Smart
37eee0e1e6 head: saturate to max int size on 32 bit platforms 2025-04-12 23:38:32 +02:00
Jeremy Smart
cc1112660a head: return to parse::<usize> and switch to parse_size_u64_max 2025-04-12 23:38:32 +02:00
Jeremy Smart
1ffaf2d629 head: update 32-bit tests 2025-04-12 23:38:32 +02:00
Jeremy Smart
d466b6702b head: fix overflow errors 2025-04-12 23:38:32 +02:00
Sylvestre Ledru
e4c7bd0641
Merge pull request #7724 from nyurik/ref-option
chore: fix `ref_option` lint
2025-04-12 23:37:57 +02:00
Sylvestre Ledru
689aaf9474
Merge pull request #7742 from BenWiederhake/dev-du-block-size-0
du: don't panic on block-size 0
2025-04-12 23:35:09 +02:00
Ben Wiederhake
a82dce0bd7 du: don't panic on block-size 0 2025-04-12 22:51:09 +02:00
Sylvestre Ledru
e1645bb9e2
Merge pull request #7730 from nyurik/unnested_or_patterns
chore: fix `clippy::unnested_or_patterns`
2025-04-12 21:44:17 +02:00
Sylvestre Ledru
3d99430fc8
Merge pull request #7741 from Ecordonnier/eco/musl-crate-cpp
enable feature_require_crate_cpp for musl
2025-04-12 20:19:34 +02:00
Etienne Cordonnier
bd53e904d7 enable feature_require_crate_cpp for musl
I am not sure what the original issue was, but it seems to work:

```
cargo build --target=x86_64-unknown-linux-musl --features feat_os_unix_musl
...
coreutils$ ./target/x86_64-unknown-linux-musl/debug/coreutils stdbuf -o L echo "foobar"
foobar
```
2025-04-12 19:57:29 +02:00
Sylvestre Ledru
fe77174904 CI/Selinux: also install attr for getfattr - test 2025-04-12 18:44:32 +02:00
Sylvestre Ledru
b874d90345 mkdir: move to a config approach for the functions 2025-04-12 18:44:32 +02:00
Sylvestre Ledru
d41c0ceb53 uucore/selinux: add a function to verify if selinux is enabled 2025-04-12 18:44:32 +02:00
Sylvestre Ledru
842f47b372 uucore: move the selinux function 2025-04-12 18:43:02 +02:00
jfinkels
5227178db2
Merge pull request #7681 from sargas/pass-printf-cov-test
printf: Error handling with unicode parsing
2025-04-12 12:12:21 -04:00
Daniel Hofstetter
617b5fba57
Merge pull request #7734 from uutils/renovate/data-encoding-macro-0.x-lockfile
fix(deps): update rust crate data-encoding-macro to v0.1.18
2025-04-12 13:43:51 +02:00
Daniel Hofstetter
96e7d4054c
Merge pull request #7735 from uutils/renovate/data-encoding-2.x-lockfile
fix(deps): update rust crate data-encoding to v2.9.0
2025-04-12 13:42:05 +02:00
renovate[bot]
b31547ba4d
fix(deps): update rust crate data-encoding to v2.9.0 2025-04-12 10:27:36 +00:00
renovate[bot]
6b6acef119
fix(deps): update rust crate data-encoding-macro to v0.1.18 2025-04-12 10:27:29 +00:00
Daniel Hofstetter
01a39369f2
Merge pull request #7731 from uutils/renovate/clap-4.x-lockfile
chore(deps): update rust crate clap to v4.5.36
2025-04-12 07:14:57 +02:00
Joseph Jon Booker
7df22051ea printf: Ignore thousand seperator flag 2025-04-11 23:17:50 -05:00
Joseph Jon Booker
ef7a8c300e printf: add error handling to escaped unicode characters 2025-04-11 23:17:50 -05:00
renovate[bot]
491e5c53ae
chore(deps): update rust crate clap to v4.5.36 2025-04-11 23:26:06 +00:00
Yuri Astrakhan
3b2d3716df chore: fix clippy::unnested_or_patterns
Used this command:

```shell
cargo clippy --fix --workspace --all-targets -- -A clippy::all -W clippy::unnested_or_patterns
cargo fmt --all
```
2025-04-11 18:00:07 -04:00
Daniel Hofstetter
b10aa47e38
Merge pull request #7727 from uutils/renovate/self_cell-1.x-lockfile
chore(deps): update rust crate self_cell to v1.2.0
2025-04-11 19:26:44 +02:00
Yuri Astrakhan
ac5a913996 chore: fix ref_option lint
Resolve [ref_option](https://rust-lang.github.io/rust-clippy/master/index.html#ref_option) lint.  Also, I optimized `is_first_filename_timestamp` a bit to make it faster and more streamlined.

p.s. disclaimer: I'm the author of that lint
2025-04-11 12:12:54 -04:00
renovate[bot]
22c00b9241
chore(deps): update rust crate self_cell to v1.2.0 2025-04-11 16:10:51 +00:00
Daniel Hofstetter
da61ebf1f6
Merge pull request #7722 from nyurik/fmt-fix
chore: minor fmt match cleanup
2025-04-11 10:20:30 +02:00
Sylvestre Ledru
7e3b8f14d2
Merge pull request #7723 from cakebaker/cargo_toml_use_authors_workspace
Cargo.toml: use `authors.workspace = true`
2025-04-11 03:55:52 -04:00
Sylvestre Ledru
b13ce98484
Merge pull request #7699 from nyurik/returns
chore: simplify `return` in multi-branch
2025-04-11 03:53:10 -04:00
Daniel Hofstetter
4bc518519f
Merge pull request #7725 from nyurik/code-opt
chore: clean up a few code paths
2025-04-11 09:47:19 +02:00
Yuri Astrakhan
b09cd32534 chore: clean up a few code paths
* `cp`: in `copy_dir.rs`, remove duplicate copy_file() calls and streamline error handling
* `install`: simplify `preserve_timestamp`
* `tee` - simplify error handling
2025-04-11 02:02:32 -04:00
Daniel Hofstetter
b366b68505 libstdbuf/Cargo.toml: move package entries 2025-04-11 07:15:55 +02:00
Daniel Hofstetter
83221201cc Cargo.toml: use "authors.workspace = true" 2025-04-11 06:59:11 +02:00
Yuri Astrakhan
74d79589f4 chore: minor fmt match cleanup
Fix an overly complex case when w is 0. Note that this might have been an error - I kept the logic, but the initial implementation might have been incorrect.
2025-04-11 00:44:51 -04:00
Yuri Astrakhan
b5ed4a4acf chore: simplify return in multi-branch
It is usually easier to reason about the code if the return is used in one place rather than in every branch of the match or if statements.
2025-04-11 00:24:45 -04:00
Sylvestre Ledru
81c02b7408 mkdir: add support of -Z
Should fix: gnu/tests/mkdir/selinux.sh
tests/mkdir/restorecon.sh
2025-04-10 18:26:41 -04:00
Sylvestre Ledru
5bfbc30fba
Merge pull request #7715 from nyurik/unused_qualifications
Enable and fix `unused_qualifications` lint
2025-04-10 18:11:08 -04:00
Sylvestre Ledru
1bfe6563cd
Merge pull request #7710 from nyurik/workspaces
Consolidate crate config in workspace
2025-04-10 18:10:36 -04:00
Yuri Astrakhan
76b1b6835c rm ptr::NonNull 2025-04-10 17:13:18 -04:00
Yuri Astrakhan
9f56bf5f07 Enable and fix unused_qualifications lint
Improve code readability
2025-04-10 16:54:18 -04:00
Yuri Astrakhan
895b208391 Consolidate crate config in workspace
Make all common data like version, edition, license, ... be managed in one central workspace. This makes management much simpler
2025-04-10 16:52:01 -04:00
Daniel Hofstetter
4559e974ff
Merge pull request #7720 from uutils/renovate/uutils_term_grid-0.x
chore(deps): update rust crate uutils_term_grid to 0.7
2025-04-10 19:20:46 +02:00
hz2
cd2b56ea9c
cp: fix update prompting (#7668)
* added logic to check if we are updating the file and the destination is newer, to skip copying

* corrected logic to handle cp update

* - added test case that mocks the issue described in #7660
- adjusted conditions to satisfy clippy

* typo

* Update src/uu/cp/src/cp.rs

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>

* Update tests/by-util/test_cp.rs

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>

---------

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2025-04-10 19:00:39 +02:00
renovate[bot]
9e98b79930
chore(deps): update rust crate uutils_term_grid to 0.7 2025-04-10 16:38:54 +00:00
Sylvestre Ledru
45c978fae6
Merge pull request #7686 from dan-hipschman/numfmt/add-zero-terminated-option
numfmt: add --zero-terminated option
2025-04-10 07:14:35 -04:00