Sylvestre Ledru
446df9da5a
Merge branch 'main' into cp-backup-force
2022-11-06 07:24:48 +01:00
Sylvestre Ledru
47e3149e85
Merge pull request #3978 from jfinkels/cp-copy-contents-fifo
...
cp: implement --copy-contents option for fifos
2022-11-06 07:23:25 +01:00
Jeffrey Finkelstein
5b100fef62
cp: implement --copy-contents option for fifos
...
Implement the `--copy-contents` option when the source is a FIFO, so
that the contents of the FIFO are copied (when the bytes become
available for reading) instead of the FIFO object itself. For example,
$ mkfifo fifo
$ cp --copy-contents fifo outfile &
[1] 1614080
$ echo foo > fifo
$ cat outfile
foo
[1]+ Done cp --copy-contents fifo outfile
2022-11-05 19:25:37 -04:00
Jeffrey Finkelstein
fbed01dd54
cp: force copying file to itself with --backup
...
Fix the behavior of `cp` when both `--backup` and `--force` are
specified and the source and destination are the same file. Before
this commit, `cp` terminated without copying and without making a
backup. After this commit, the copy is made and the backup file is
made. For example,
$ touch f
$ cp --force --backup f f
results in a backup file `f~` being created.
2022-11-05 19:23:50 -04:00
Sylvestre Ledru
6bc68cdcdf
Merge branch 'main' into refactor/add_nix_error_auto_conversion
2022-11-04 12:54:35 +01:00
Orhun Parmaksız
be49eb68f3
fix: address test failures
2022-11-04 13:35:54 +03:00
Daniel Hofstetter
7df36bb153
mv: fix "needless borrow" clippy warnings
2022-11-04 10:07:21 +01:00
Daniel Hofstetter
59f37d88d0
rm: fix "needless borrow" clippy warnings
2022-11-04 10:07:21 +01:00
Sylvestre Ledru
d76da1dc95
Merge pull request #4106 from bnjbvr/remove-unused-dependencies2
...
Remove unused dependencies
2022-11-04 09:24:06 +01:00
dependabot[bot]
c44c7ac7b2
build(deps): bump num_cpus from 1.13.1 to 1.14.0
...
Bumps [num_cpus](https://github.com/seanmonstar/num_cpus ) from 1.13.1 to 1.14.0.
- [Release notes](https://github.com/seanmonstar/num_cpus/releases )
- [Changelog](https://github.com/seanmonstar/num_cpus/blob/master/CHANGELOG.md )
- [Commits](https://github.com/seanmonstar/num_cpus/compare/v1.13.1...v1.14.0 )
---
updated-dependencies:
- dependency-name: num_cpus
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-04 06:07:50 +00:00
Benjamin Bouvier
c2a6f6c77b
Remove unused dependencies
2022-11-03 21:14:38 +01:00
Sylvestre Ledru
2d79c4f693
Merge pull request #4091 from dmatos2012/allow-default-value-mktemp
...
mktemp: allow default missing value
2022-11-03 20:46:11 +01:00
Sylvestre Ledru
f60e861232
Merge pull request #4074 from jfinkels/cp-force-dangling-symlink
...
cp: restrict copy through dangling symlink with -f
2022-11-03 08:27:41 +01:00
David Matos
53c4b0b81e
mktemp: allow default missing value
2022-11-03 08:27:08 +01:00
Sylvestre Ledru
9293cbb05b
Merge pull request #4040 from uutils/dependabot/cargo/binary-heap-plus-0.5.0
...
build(deps): bump binary-heap-plus from 0.4.1 to 0.5.0
2022-11-03 08:25:30 +01:00
Daniel Hofstetter
2d4810b91b
numfmt: allow ' ' as field separator
2022-11-01 10:04:46 +01:00
Daniel Hofstetter
27c233f294
numfmt: allow "-" in field list
2022-10-31 14:53:41 +01:00
Terts Diepraam
ba3bb56041
Merge pull request #4013 from palaster/rm-correct-prompts
...
rm: rm3 now passes
2022-10-31 10:17:27 +01:00
Sylvestre Ledru
f2f2f7033e
Merge branch 'main' into refactor/add_nix_error_auto_conversion
2022-10-30 15:54:13 +01:00
Sylvestre Ledru
bc126085c4
Merge branch 'main' into cp-force-dangling-symlink
2022-10-29 20:01:07 +02:00
Pat Laster
7049c64790
Merge branch 'main' into rm-correct-prompts
2022-10-29 11:10:20 -05:00
Pat Laster
4b4222ffe3
Bump libc version from "0.2.136" to "0.2.137"
2022-10-29 11:09:52 -05:00
Daniel Hofstetter
3a8feedf2d
numfmt: allow hyphen values for --field option
2022-10-29 16:50:41 +02:00
Sylvestre Ledru
b3af47a390
Merge branch 'main' into cp-force-dangling-symlink
2022-10-28 21:24:42 +02:00
Sylvestre Ledru
4b2138e61e
Merge pull request #4087 from uutils/dependabot/cargo/libc-0.2.137
...
build(deps): bump libc from 0.2.136 to 0.2.137
2022-10-28 21:23:42 +02:00
Pat Laster
c7af9a6a80
Bump libc version from "0.2.135" to "0.2.136"
2022-10-27 13:41:55 -05:00
Pat Laster
c4417bf9b2
Merge branch 'main' into rm-correct-prompts
2022-10-27 13:38:41 -05:00
Sylvestre Ledru
00d93ff451
Merge pull request #4088 from tertsdiepraam/hashsum-test-no-names
...
hashsum: enable testing --no-names
2022-10-27 19:55:45 +02:00
Daniel Hofstetter
2eb0b6dfe0
numfmt: round values if precision is 0
2022-10-27 15:33:20 +02:00
Sylvestre Ledru
34eabca299
pwd: support the env variable 'POSIXLY_CORRECT'
...
Should fix tests/misc/pwd-option.sh
2022-10-26 11:40:46 +02:00
Terts Diepraam
96b6252910
Merge pull request #4081 from sylvestre/chown-sep
...
chown: fails when XXXX. or XXXX: is provided (when XXXX is numeric value)
2022-10-26 11:24:35 +02:00
Terts Diepraam
bbc3495896
hashsum: enable testing --no-names
...
Co-authored-by: Huijeong Kim <herehuijeong@gmail.com>
2022-10-26 11:10:26 +02:00
dependabot[bot]
69c1f28c66
build(deps): bump libc from 0.2.136 to 0.2.137
...
Bumps [libc](https://github.com/rust-lang/libc ) from 0.2.136 to 0.2.137.
- [Release notes](https://github.com/rust-lang/libc/releases )
- [Commits](https://github.com/rust-lang/libc/compare/0.2.136...0.2.137 )
---
updated-dependencies:
- dependency-name: libc
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-10-26 06:42:06 +00:00
Sylvestre Ledru
67a36cf55d
Merge pull request #4082 from uutils/dependabot/cargo/libc-0.2.136
...
build(deps): bump libc from 0.2.135 to 0.2.136
2022-10-26 08:40:14 +02:00
Pat Laster
0079f73568
Merge branch 'main' into rm-correct-prompts
2022-10-25 20:58:01 -05:00
Sylvestre Ledru
52d82d54a3
Revert "hashsum: test b3sum::test_nonames for real ( #4027 )"
...
This reverts commit 02f6fa7b24
.
2022-10-25 23:44:05 +02:00
dependabot[bot]
2213ad5d1c
build(deps): bump libc from 0.2.135 to 0.2.136
...
Bumps [libc](https://github.com/rust-lang/libc ) from 0.2.135 to 0.2.136.
- [Release notes](https://github.com/rust-lang/libc/releases )
- [Commits](https://github.com/rust-lang/libc/compare/0.2.135...0.2.136 )
---
updated-dependencies:
- dependency-name: libc
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-10-25 23:28:47 +02:00
Sylvestre Ledru
76a0794823
Merge pull request #4072 from jfinkels/clippy-fixes
...
clippy fixes
2022-10-25 23:28:20 +02:00
Sylvestre Ledru
42fad7c4e5
Merge pull request #4078 from sylvestre/update-i
...
{cp, mv} -i --update source existing should not do anything and exit 0
2022-10-25 08:31:39 +02:00
Sylvestre Ledru
9f1ac221cd
chown: fails when XXXX. or XXXX: is provided (when XXXX is numeric values)
...
If the arg starts with an id numeric value, the group isn't set but the separator is provided,
we should fail with an error
Should fix tests/chown/separator.sh
2022-10-25 08:25:05 +02:00
Pat Laster
9069d4832a
Merge branch 'main' into rm-correct-prompts
2022-10-24 18:36:52 -05:00
Sylvestre Ledru
6e8f8034ba
{cp, mv} -i --update source existing should not do anything and exit 0
...
Should fix tests/mv/update.sh
2022-10-24 21:03:30 +02:00
Daniel Hofstetter
dedb6289dd
numfmt: handle negative zero values
2022-10-24 15:13:02 +02:00
Jeffrey Finkelstein
d48a650966
cp: restrict copy through dangling symlink with -f
...
Change `cp` to terminate with an error when attempting to copy through
a dangling symbolic link with the `--force` option. Before this
commit,
touch src
ln -s no-such-file dest
cp -f src dest
would incorrectly replace `dest` with the contents of `src`. After
this commit, it correctly fails with the error message
cp: not writing through dangling symlink 'dest'
2022-10-23 20:17:20 -04:00
Jeffrey Finkelstein
55b3766c10
clippy fixes
2022-10-23 13:56:20 -04:00
Sylvestre Ledru
c766726e8b
Merge pull request #3281 from jfinkels/split-round-robin
...
split: implement round-robin arg to --number
2022-10-23 09:57:01 +02:00
Jeffrey Finkelstein
ac3fcca6c0
cp: correctly copy ancestor dirs in --parents mode
...
Fix a bug where `cp` failed to copy ancestor directories when using
the `--parents` option. For example, before this commit:
$ mkdir -p a/b/c d
$ cp --parents a/b/c d
$ find d
d
d/c
After this commit
$ mkdir -p a/b/c d
$ cp --parents a/b/c d
$ find d
d
d/a
d/a/b
d/a/b/c
This commit also adds the correct messages for `--verbose` mode:
$ cp -r --parents --verbose a/b/c d
a -> d/a
a/b -> d/a/b
'a/b/c' -> 'd/a/b/c'
Fixes #3332 .
2022-10-23 00:06:56 -04:00
Jeffrey Finkelstein
cd3f7b89a7
cp: make cp -a not fail on Windows
...
Before this commit, `cp -a` would terminate with a non-zero status
code on Windows because there are no extended attributes (xattr) to
copy. However, the GNU documentation for cp states
> Try to preserve SELinux security context and extended attributes
> (xattr), but ignore any failure to do that and print no
> corresponding diagnostic.
so it seems reasonable to do nothing instead of exiting with an error
in this case.
2022-10-23 00:03:26 -04:00
Jeffrey Finkelstein
7dc96697c9
split: implement round-robin arg to --number
...
Implement distributing lines of a file in a round-robin manner to a
specified number of chunks. For example,
$ (seq 1 10 | split -n r/3) && head -v xa[abc]
==> xaa <==
1
4
7
10
==> xab <==
2
5
8
==> xac <==
3
6
9
2022-10-22 23:15:55 -04:00
Pat Laster
744481c800
Updated handle_writable_directory comment
2022-10-22 18:00:17 -05:00