Commit graph

7372 commits

Author SHA1 Message Date
Daniel Hofstetter
c4160f2dd7
Merge pull request #6801 from Luv-Ray/cksum_error_handling
cksum: fix error handling
2024-10-22 16:35:36 +02:00
Luv-Ray
d5cc3dd8ee cksum: fix error handling 2024-10-22 20:20:18 +08:00
Andrew Liebenow
66f11c4ce4
echo: handle multibyte escape sequences (#6803)
* echo: handle multibyte escape sequences

Bug was reported, with root cause analysis, by kkew3
Added tests were derived from test cases provided by kkew3
See https://github.com/uutils/coreutils/issues/6741

* Use concrete type

* Fix MSRV issue

* Fix non-UTF-8 argument handling

* Fix MSRV issue

* Fix Clippy violation

* Fix compiler warning

* Address PR comments

* Add MSRV TODO comments

* echo: use stdout_only_bytes instead of stdout_is_bytes

---------

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2024-10-22 11:03:08 +02:00
Andrew Liebenow
d70990e0cc printf: remove unused argument name from help
printf --help is currently listing three usage forms:

```
Usage: coreutils printf FORMATSTRING [ARGUMENT]...
       coreutils printf FORMAT [ARGUMENT]...
       coreutils printf OPTION
```

But there are only two usage forms, since there is no difference
between "FORMAT" and "FORMATSTRING".

Remove references to "FORMATSTRING", and use "FORMAT" in all places
where "FORMATSTRING" appeared, since other implementations of
`printf` use the argument name "FORMAT".
2024-10-21 10:36:31 -05:00
Andrew Liebenow
80b63931a4 mkdir: emit error when path is empty 2024-10-20 10:45:46 -05:00
Sylvestre Ledru
5b881a0766
Merge pull request #6790 from sgvictorino/require-mkdir-rmdir-args
mkdir/rmdir: require arguments
2024-10-20 17:15:25 +02:00
Tom D.
66c3efa0b7
doc(tsort): Add benchmarking documentation 2024-10-19 15:08:06 +02:00
Tom D.
c3b28bf6c7 refactor(tsort): Switch to Knuth algorithm T
This commit is a complete rewrite of the tsort util, resulting in a x10 performance improvement
BREAKING CHANGE: the order is no longer the same as gnu tsort in some fringe cases.
2024-10-19 12:07:25 +02:00
Daniel Hofstetter
92e67a5a14
Merge pull request #6782 from RenjiSann/checksum-comment
cksum/hashsum: Support for commented lines in checksum files
2024-10-18 13:53:34 +02:00
Solomon Victorino
fe234164f4 rmdir: require argument 2024-10-18 08:30:18 +02:00
Solomon Victorino
6ad07a4fb3 mkdir: require argument 2024-10-18 08:30:18 +02:00
Daniel Hofstetter
91687ebbc1 uucore: allow use of deprecated PanicInfo 2024-10-18 07:36:30 +02:00
Andrey Turkin
b7819c0731 Get rid of redox-specific code
All of the specific functions are covered by relibc
2024-10-17 17:14:42 +03:00
Dorian Péron
f542bbca68 uucore(checksum): add support for comment lines in checksum verification 2024-10-16 12:27:49 +02:00
Luv-Ray
85b0ef132b
cp: fix symlink-overwrite error-priority (#6586) 2024-10-16 08:55:43 +02:00
Szabó Attila
1781c3e07d cp: fix possible OOM and partial write with large files 2024-10-15 21:24:47 +02:00
Dorian Péron
2a1558f741 test(quoting_style): Fix tests 2024-10-15 11:11:23 +02:00
Dorian Péron
e292e05f57 ls: Fix quoting for control characters in shell mode 2024-10-15 11:11:23 +02:00
Dorian Péron
3c5a419537 ls: Escape dirname in recursive mode when it has a colon 2024-10-15 11:11:23 +02:00
Andrew Liebenow
c41c601b45
paste: permit the delimiter list to be empty (#6714)
* paste: permit the delimiter list to be empty

Also: refactored the delimiter processing logic

* Extract duplicated code into function

* Address PR comments. Improve code structure.

* Fix additional paste bugs

* Fix additional paste bugs

* Simplify backslash delimiter validation

* Fix Clippy violations
2024-10-10 15:36:30 +02:00
Justin Tracey
7c3a9380f1 join: avoid extra allocations when using -i 2024-10-09 19:58:55 +02:00
Laurent Cheylus
c7cce2df37
users: fix lint error manual_unwrap_or_default on OpenBSD
Fix uutils/coreutils#6771

Signed-off-by: Laurent Cheylus <foxy@free.fr>
2024-10-07 17:32:35 +02:00
Justin Tracey
a51a731704
join: add support for multibyte separators (#6736)
* join: add test for multibyte separators

* join: implement support for multibyte separators

* join: use a trait instead of an enum for separator

* join: test whitespace merging
2024-10-06 11:48:08 +02:00
GiM
d8eb4e2214
cat: fix #5186 by adding explicit flush. (#5256)
* fix #5186 by adding explicit flush.
* make test machine-independent

---------

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2024-10-06 11:31:31 +02:00
Andrew Liebenow
32e1c54c78 Fix "coreutils manpage base64" bug 2024-10-05 08:17:10 -05:00
Andrew Liebenow
9fa405fad6 Update BENCHMARKING.md per PR comment 2024-09-27 11:35:44 -05:00
Andrew Liebenow
360ed8fbd5 Add BENCHMARKING.md 2024-09-26 20:16:16 -05:00
Andrew Liebenow
2c25ae2838 Fix spelling exception comment 2024-09-24 19:56:50 -05:00
Andrew Liebenow
70c3f49430 Add spelling exception 2024-09-24 19:37:43 -05:00
Andrew Liebenow
ea7a543bfe Fix two bugs. Add property testing. 2024-09-24 19:25:29 -05:00
Andrew Liebenow
4f19c0e9ff Address PR comments. Simplify structure. 2024-09-24 07:49:28 -05:00
Andrew Liebenow
ccb873519c Improve performance 2024-09-22 20:30:15 -05:00
Andrew Liebenow
2d09037c67 Fix MSRV issue 2024-09-22 08:36:16 -05:00
Andrew Liebenow
cdebd24733 Finish fast decode/encode by folding in Z85 2024-09-22 08:28:20 -05:00
Andrew Liebenow
5cd050665d Get number of bytes to drain in a safer way 2024-09-21 10:31:43 -05:00
Andrew Liebenow
8a6923dcd4 Fix line wrapping encoding performance 2024-09-21 09:35:20 -05:00
Andrew Liebenow
ed04f14ba8 basenc: also perform faster, streaming decoding
Same as previous changes, just applied to decoding
2024-09-21 04:02:09 -05:00
Andrew Liebenow
4d71c10279 Replace truncate with clear 2024-09-20 17:09:47 -05:00
Andrew Liebenow
167586f6fb Fix compilation error and spelling warning 2024-09-20 15:40:22 -05:00
Andrew Liebenow
846cf06272 basenc: perform faster, streaming encoding
Improve the performance, both in memory and time, of the encoding
performed by the basenc (except in --z85 mode), base32, and base64
programs.

These programs now perform encoding in a buffered/streaming manner,
so encoding is not constrained by the amount of available memory.
2024-09-20 14:34:18 -05:00
Sylvestre Ledru
50f99580b4
Merge pull request #6761 from cakebaker/users_use_option_instead_of_vec
users: use `Option` instead of `Vec` for file arg
2024-10-03 08:50:29 +02:00
Daniel Hofstetter
db36051383 cat: use write_end_of_line to avoid duplicate code 2024-10-02 15:21:35 +02:00
Peng Zijun
382e787d1c
cat: handle CRLF delimiters correctly (#6763)
* fix issue #6248

* add test to cat for the case of issue #6248
2024-10-02 15:15:06 +02:00
Daniel Hofstetter
462b1deb51 users: use Option instead of Vec for file arg 2024-10-01 16:41:29 +02:00
Ben Wiederhake
5824ce5890 printf: delete unused file
Found by #6721.
2024-10-01 12:58:59 +02:00
Sylvestre Ledru
892e9a4bc0
Merge pull request #6748 from dcampbell24/fix-clippy-reduced-commits-try-try-again
Clippy Pedantic Acceptable Commits Try Again
2024-09-30 09:34:10 +02:00
David Campbell
d338206a62
Rename bytes to hex, allocate String with capacity. 2024-09-28 19:03:53 -04:00
David Campbell
ae01996066
Fix clippy::format_collect. 2024-09-28 19:03:30 -04:00
David Campbell
3c26dd869e
Fix clippy::flat_map_option. 2024-09-24 20:33:08 -04:00
David Campbell
392344c93a
Fix clippy::cloned_instead_of_copied. 2024-09-24 20:33:08 -04:00