Sylvestre Ledru
be0cc8ff67
Merge pull request #3738 from cakebaker/numfmt_enable_test
...
numfmt: enable ignored test
2022-07-21 14:52:04 +02:00
Daniel Hofstetter
29c4d08ee9
numfmt: enable ignored test
2022-07-21 13:20:42 +02:00
Owen Anderson
417ad0e384
Add rustdoc comment.
2022-07-20 23:32:50 -07:00
Owen Anderson
13762cae05
Implement a fast path for character counting in wc.
...
When wc is invoked with only the -m flag, we only need to count the
number of Unicode characters in the input. In order to do so, we don't
actually need to decode the input bytes into characters. Rather, we can
simply count the number of non-continuation bytes in the UTF-8 stream,
since every character will contain exactly one non-continuation byte.
On my laptop, this speeds up `wc -m odyssey1024.txt` from 745ms to
109ms.
2022-07-20 22:35:40 -07:00
Sylvestre Ledru
ba24565b60
Merge pull request #3732 from cakebaker/numfmt_auto_suf_si_i
...
numfmt: show "invalid suffix" error for "i" suffix
2022-07-20 22:51:14 +02:00
Sylvestre Ledru
c5f35aabc6
Merge pull request #3730 from niyaznigmatullin/ln_error_messages
...
ln: error messages
2022-07-20 17:52:51 +02:00
Sylvestre Ledru
ba44fd0e2b
document some common fs functions
2022-07-20 17:51:53 +02:00
Daniel Hofstetter
74bd9a26d6
numfmt: show "invalid suffix" error for "i" suffix
2022-07-20 17:51:36 +02:00
Sylvestre Ledru
b9d8ee6605
Merge pull request #3734 from uutils/dependabot/github_actions/vmactions/freebsd-vm-0.2.0
...
build(deps): bump vmactions/freebsd-vm from 0.1.9 to 0.2.0
2022-07-20 11:59:07 +02:00
dependabot[bot]
7948cb7924
build(deps): bump vmactions/freebsd-vm from 0.1.9 to 0.2.0
...
Bumps [vmactions/freebsd-vm](https://github.com/vmactions/freebsd-vm ) from 0.1.9 to 0.2.0.
- [Release notes](https://github.com/vmactions/freebsd-vm/releases )
- [Commits](https://github.com/vmactions/freebsd-vm/compare/v0.1.9...v0.2.0 )
---
updated-dependencies:
- dependency-name: vmactions/freebsd-vm
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-07-20 06:45:20 +00:00
Niyaz Nigmatullin
9f2a9fa6ff
uucore/fs: make function more generic
2022-07-19 17:34:52 +03:00
Niyaz Nigmatullin
b76c53c090
ln: fix windows non-compiling code
2022-07-19 17:34:52 +03:00
Niyaz Nigmatullin
f220c86121
util/build-gnu.sh: remove some test changes + change some messages
2022-07-19 17:34:52 +03:00
Niyaz Nigmatullin
406d3931e9
tests/ln: fix tests according to new messages
2022-07-19 17:34:52 +03:00
Niyaz Nigmatullin
80ff3b3b40
ln: change error messages, extract common code
2022-07-19 17:34:52 +03:00
Sylvestre Ledru
9402a7b3ba
Merge pull request #3728 from uutils/dependabot/github_actions/vmactions/freebsd-vm-0.1.8
...
build(deps): bump vmactions/freebsd-vm from 0.1.7 to 0.1.9
2022-07-19 16:07:01 +02:00
Sylvestre Ledru
5eafcc4801
Use macos-12 for freebsd hosts
2022-07-19 14:04:03 +02:00
Sylvestre Ledru
e16545723d
Merge pull request #3720 from andrewbaptist/fix_warnings
...
Update to handle all the latest cargo warnings
2022-07-19 11:40:38 +02:00
Andrew Baptist
cc08e1cc3a
Update to handle all the latest cargo warnings
2022-07-18 13:20:49 -04:00
Sylvestre Ledru
ce12dec5c9
freebsd-vm - update to 0.1.9
2022-07-18 16:17:20 +02:00
Owen Anderson
735db78b3d
wc: specialize scanning loop on settings. ( #3708 )
...
* wc: specialize scanning loop on settings.
The primary computational loop in wc (iterating over all the
characters and computing word lengths, etc) is configured by a
number of boolean options that control the text-scanning behavior.
If we monomorphize the code loop for each possible combination of
scanning configurations, the rustc is able to generate better code
for each instantiation, at the least by removing the conditional
checks on each iteration, and possibly by allowing things like
vectorization.
On my computer (aarch64/macos), I am seeing at least a 5% performance
improvement in release builds on all wc flag configurations
(other than those that were already specialized) against
odyssey1024.txt, with wc -l showing the greatest improvement at 15%.
* Reduce the size of the wc dispatch table by half.
By extracting the handling of hand-written fast-paths to the
same dispatch as the automatic specializations, we can avoid
needing to pass `show_bytes` as a const generic to
`word_count_from_reader_specialized`. Eliminating this parameter
halves the number of arms in the dispatch.
2022-07-18 12:16:52 +02:00
dependabot[bot]
04ddf559ec
build(deps): bump vmactions/freebsd-vm from 0.1.7 to 0.1.8
...
Bumps [vmactions/freebsd-vm](https://github.com/vmactions/freebsd-vm ) from 0.1.7 to 0.1.8.
- [Release notes](https://github.com/vmactions/freebsd-vm/releases )
- [Commits](https://github.com/vmactions/freebsd-vm/compare/v0.1.7...v0.1.8 )
---
updated-dependencies:
- dependency-name: vmactions/freebsd-vm
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-07-18 12:12:19 +02:00
Sylvestre Ledru
189a8af450
Merge pull request #3721 from niyaznigmatullin/add_test_for_issue_3332
...
tests/cp: add test for cp-parents.sh
2022-07-18 12:11:30 +02:00
Sylvestre Ledru
6248afed68
Merge pull request #3725 from uutils/dependabot/cargo/nix-0.24.2
...
build(deps): bump nix from 0.24.1 to 0.24.2
2022-07-18 12:11:07 +02:00
dependabot[bot]
d15b95533e
build(deps): bump nix from 0.24.1 to 0.24.2
...
Bumps [nix](https://github.com/nix-rust/nix ) from 0.24.1 to 0.24.2.
- [Release notes](https://github.com/nix-rust/nix/releases )
- [Changelog](https://github.com/nix-rust/nix/blob/v0.24.2/CHANGELOG.md )
- [Commits](https://github.com/nix-rust/nix/compare/v0.24.1...v0.24.2 )
---
updated-dependencies:
- dependency-name: nix
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-07-18 06:41:18 +00:00
Sylvestre Ledru
fbe22497ff
Merge pull request #3724 from niyaznigmatullin/ln_same_file_on_force
...
ln: symlink --force, src and dst are same file
2022-07-18 08:29:44 +02:00
Niyaz Nigmatullin
0ab0f2761f
tests/ln: add test for same file
2022-07-18 08:17:37 +03:00
Niyaz Nigmatullin
4db08273b3
ln: error on --force when src=dst and dst is regular file
2022-07-18 08:17:37 +03:00
Sylvestre Ledru
ef6182d209
Merge pull request #3723 from niyaznigmatullin/add_issue_3722_test
...
tests/rm: add test for issue #3722
2022-07-17 23:41:05 +02:00
Niyaz Nigmatullin
028c08cce2
tests/rm: add test for issue #3722
2022-07-17 23:34:04 +03:00
Niyaz Nigmatullin
147f83f68a
tests/cp: add test for cp-parents.sh
2022-07-17 23:04:09 +03:00
Niyaz Nigmatullin
0ea3a735ca
readlink: symlink loop handling ( #3717 )
...
readlink: fix symlink loop handling
2022-07-14 22:32:55 +02:00
Sylvestre Ledru
882cd527ff
Merge pull request #3704 from Sciencentistguy/once_cell
...
Replace lazy_static with once_cell
2022-07-13 16:15:47 +02:00
Sylvestre Ledru
8938b1f9e1
Merge pull request #3716 from cakebaker/numfmt_reject_suffix
...
numfmt: reject suffix if unit is "none"
2022-07-13 16:14:43 +02:00
Daniel Hofstetter
9e44acf307
numfmt: reject suffix if unit is "none"
2022-07-13 10:47:59 +02:00
Sylvestre Ledru
db2e5fc6ec
Merge pull request #3714 from niyaznigmatullin/canonicalize_windows_symlink_loop_looking
...
canonicalize: Loop looking in windows
2022-07-13 10:36:18 +02:00
Sylvestre Ledru
4b27776237
Merge pull request #3713 from cakebaker/numfmt_missing_i_suffix
...
numfmt: show error if "i" suffix is missing
2022-07-13 10:35:22 +02:00
Sylvestre Ledru
073c432e5e
Merge pull request #3715 from uutils/dependabot/github_actions/vmactions/freebsd-vm-0.1.7
...
build(deps): bump vmactions/freebsd-vm from 0.1.6 to 0.1.7
2022-07-13 10:34:55 +02:00
dependabot[bot]
2e39f6faf2
build(deps): bump vmactions/freebsd-vm from 0.1.6 to 0.1.7
...
Bumps [vmactions/freebsd-vm](https://github.com/vmactions/freebsd-vm ) from 0.1.6 to 0.1.7.
- [Release notes](https://github.com/vmactions/freebsd-vm/releases )
- [Commits](https://github.com/vmactions/freebsd-vm/compare/v0.1.6...v0.1.7 )
---
updated-dependencies:
- dependency-name: vmactions/freebsd-vm
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-07-13 06:41:10 +00:00
Niyaz Nigmatullin
c829ecfd1d
uucore/fs: get back to loop looking in windows as FileInformation
...
for directory is fixed
2022-07-12 17:15:16 +03:00
Jamie Quigley
1a270361c0
Replace lazy_static with once_cell
2022-07-12 14:08:30 +01:00
Daniel Hofstetter
aef24db90f
numfmt: show error if "i" suffix is missing
2022-07-12 10:58:07 +02:00
Niyaz Nigmatullin
de65d4d649
Realpath relative options ( #3710 )
...
* realpath: introduce relative options, make correct exit codes, make pass
GNU test mist/realpath.sh
2022-07-12 08:29:20 +02:00
Terts Diepraam
6b00aec48e
Merge pull request #3602 from lendandgit/main
...
df: better error message when executed in a chroot without /proc #3601
2022-07-11 23:02:39 +02:00
Sylvestre Ledru
e239ed9417
Merge pull request #3692 from jfinkels/cp-preserve-perm-link
...
cp: correctly copy attributes of a dangling symbolic link
2022-07-11 22:50:24 +02:00
Sylvestre Ledru
8074020a8b
Merge pull request #3705 from cakebaker/numfmt_unit
...
numfmt: implement "--to-unit" & "--from-unit"
2022-07-11 22:46:56 +02:00
Niyaz Nigmatullin
da5808d4ac
ls: add already listed message ( #3707 )
...
* ls: handle looping symlinks infinite printing
* ls: better coloring and printing symlinks when dereferenced
* tests/ls: add dereferencing and symlink loop tests
* ls: reformat changed using rustfmt
* ls: follow clippy advice for cleaner code
* uucore/fs: fix FileInformation to open directory handles in Windows as
well
2022-07-11 17:18:58 +02:00
Sylvestre Ledru
8f4a3266a4
Merge pull request #3709 from uutils/dependabot/cargo/memmap2-0.5.5
...
build(deps): bump memmap2 from 0.5.4 to 0.5.5
2022-07-11 10:37:05 +02:00
dependabot[bot]
7be2139919
build(deps): bump memmap2 from 0.5.4 to 0.5.5
...
Bumps [memmap2](https://github.com/RazrFalcon/memmap2-rs ) from 0.5.4 to 0.5.5.
- [Release notes](https://github.com/RazrFalcon/memmap2-rs/releases )
- [Changelog](https://github.com/RazrFalcon/memmap2-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.4...v0.5.5 )
---
updated-dependencies:
- dependency-name: memmap2
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-07-11 06:40:50 +00:00
Niyaz Nigmatullin
9d285e953d
Realpath symlinks handling, solves issue #3669 ( #3703 )
2022-07-10 16:49:25 +02:00