electricboogie
a1960f5da0
Fix cp bug: pre-write permission change ( #2769 )
2021-12-15 22:18:02 +01:00
Roy Ivy III
f20aa49821
maint/CICD ~ (GHA) fix cargo-udeps
false positives (add 'ignore' exceptions to sub-crates)
2021-11-19 17:55:02 -06:00
Sylvestre Ledru
6946377e02
cp: Also import entries from uucore
2021-10-24 00:29:24 +02:00
Sylvestre Ledru
59e9870c56
Prepare version 0.0.8
2021-10-23 19:21:50 +02:00
vulppine
4319248bb6
cp: Changes '1' to 'EXIT_ERR' in UError impl
2021-10-01 16:45:19 -07:00
vulppine
c64f09dc59
cp: Adds a needed macro, changes a return
2021-10-01 15:18:05 -07:00
vulppine
4ff5fea502
cp: uumain returns UResult, UError for Error
2021-10-01 14:58:26 -07:00
Sylvestre Ledru
7eaae75bfc
add a github action job to identify unused deps
2021-09-15 12:06:50 +02:00
Jan Verbeek
259f18fcab
Update message quoting and filename printing
2021-09-07 19:49:01 +02:00
Michael Debertol
ef9c5d4fcf
cp: canonicalize paths upfront
...
This way later code can assume `src` and `dest` to be the actual paths
of source and destination, and do not have to constantly check
`options.dereference`.
This requires moving the error context calculation to the beginning as
well, since later steps no longer operate with the same file paths as
supplied by the user.
2021-09-01 00:16:22 +02:00
Michael Debertol
8b74562820
cp: correctly copy mode, ownership, acl and context
...
Fix a mix-up between ownership and mode. The latter (mode / file permissions)
can also be set on windows (which however only affects the read-only flag),
while there doesn't seem to be a straight-forward way to change file ownership
on windows.
Copy the acl as well when copying the mode. This is a non-default feature and can be
enabled with --features feat_acl, because it doesn't seem to work on CI.
It is only available for unix so far.
Copy the SELinux context if possible.
2021-09-01 00:16:22 +02:00
Andreas Hartmann
f2311f87f4
cp: Adapt to modified backup_control
interface
2021-08-25 16:33:50 +02:00
Sylvestre Ledru
114c9a409c
Merge pull request #2471 from miDeb/real-exe-name
...
make executable!() return the real executable name
2021-08-22 16:55:06 +02:00
Sylvestre Ledru
8337aeb4d6
bump a few crates to simplify Debian packaging
2021-08-21 23:34:45 +02:00
Michael Debertol
5e07d58a4d
Merge pull request #2459 from jaggededgedjustice/realpath-add-physical-mode
...
Add Physical mode to realpath
2021-08-21 02:01:10 +02:00
Michael Debertol
252220e9eb
refactor/uucore ~ make util_name and execution_phrase functions
...
Since util_name and execution_phrase no longer rely on features that are
only available to macros, they may as well be plain functions.
2021-08-14 17:55:18 +02:00
Michael Debertol
5f2335829a
refactor ~ revert to single quotes for "Try '{0 --help'"
...
This is a test expectation for gnu.
2021-08-14 17:22:09 +02:00
Roy Ivy III
c0854000d1
refactor ~ use execution_phrase!()
for usage messaging
2021-08-14 14:01:33 +02:00
Roy Ivy III
23b68d80ba
refactor ~ usage()
instead of get_usage()
2021-08-14 13:58:43 +02:00
Roy Ivy III
894d9a068c
refactor ~ standardize on 'Try {} --help
...' messaging (common markdown-type formatting)
2021-08-14 13:55:11 +02:00
Roy Ivy III
c5792c2a0f
refactor ~ use util_name!()
as clap::app::App name argument for all utils
2021-08-14 13:53:13 +02:00
James Robson
0e04f959c2
Add Physical mode to realpath
...
This adds the 'Physical Mode' and 'Logical Mode' switches to realpath, which control when symlinks are resolved.
2021-08-01 17:06:09 +01:00
sagudev
4f4338f1c0
Delete all allow(nonstandard_macro_braces) and fix other clippy warnings
2021-07-25 18:51:16 +02:00
Terts Diepraam
eae8c72793
Merge pull request #2467 from Funky185540/backup_mode_determination
...
backup_control: Fix backup mode determination
2021-07-20 13:27:04 +02:00
Andreas Hartmann
3a0164310a
cp: Adapt to modified backup mode determination
2021-07-19 17:01:49 +02:00
Sylvestre Ledru
26a882551b
update the dep to uucore_procs 0.0.6
2021-07-11 21:04:11 +02:00
Sylvestre Ledru
1d8a66b7d3
Update to version 0.0.7
2021-07-11 18:04:56 +02:00
Michael Debertol
2ebca384c6
all utils: enable wrap_help
...
This makes clap wrap the help text according to the terminal width,
which improves readability for terminal widths < 120 chars,
because clap defaults to a width of 120 chars without this feature.
2021-06-27 16:17:10 +02:00
Michael Debertol
73cfcc27e7
cp: insert some spaces into the help text
2021-06-25 21:23:45 +02:00
Michael Debertol
0531153fa6
uutils: move clap::App creation to separate functions
2021-06-25 21:23:45 +02:00
Sylvestre Ledru
a73e71ba74
Merge pull request #2437 from miDeb/cp/reflink-auto
...
cp: default to --reflink=auto on linux and macos
2021-06-23 12:37:44 +02:00
Jan Scheer
c0be979611
fix some issues with locale (replace "LANGUAGE" with "LC_ALL")
...
`LANGUAGE=C` is not enough, `LC_ALL=C` is needed as the environment
variable that overrides all the other localization settings.
e.g.
```bash
$ LANGUAGE=C id foobar
id: ‘foobar’: no such user
$ LC_ALL=C id foobar
id: 'foobar': no such user
```
* replace `LANGUAGE` with `LC_ALL` as environment variable in the tests
* fix the the date string of affected uutils
* replace `‘` and `’` with `'`
2021-06-23 11:30:28 +02:00
Michael Debertol
a91369bbff
cp: fix dead code warnings on windows
2021-06-20 19:10:51 +02:00
Michael Debertol
076c7fa501
cp: default to --reflink=auto on linux and macos
2021-06-19 18:59:57 +02:00
Michael Debertol
9fb927aa85
cp: always delete the destination for symlinks
2021-06-19 18:59:57 +02:00
Michael Debertol
6400cded54
cp: fix order of checks in copy_helper
2021-06-19 18:59:57 +02:00
Terts Diepraam
14520fb64e
cp: remove redundant newline in readme
2021-06-18 18:00:27 +02:00
Terts Diepraam
fdfa44cb5c
Merge branch 'master' into cp/update-options
2021-06-18 17:59:13 +02:00
Terts Diepraam
ab3f2cb672
cp: update list of implemented arguments
2021-06-18 17:56:22 +02:00
Terts Diepraam
cf1a7d0796
cp: use options module
2021-06-18 17:56:04 +02:00
Michael Debertol
a371c03431
cp: only get the current directory once
2021-06-18 11:48:13 +02:00
Michael Debertol
32526e3048
cp: one more clippy fix
2021-06-18 11:45:04 +02:00
Michael Debertol
315bfd65a3
cp: move symlink check to the right place
2021-06-18 11:44:39 +02:00
Michael Debertol
12a1c87cb8
cp: improve symlink handling
2021-06-17 22:26:13 +02:00
Hanif Bin Ariffin
2a7209116d
Fixed cp --preserve accepting no args
...
Signed-off-by: Hanif Bin Ariffin <hanif.ariffin.4326@gmail.com>
2021-06-16 11:26:52 +08:00
Jeong YunWon
7cc17c15c2
cp: clean up returning Err
2021-06-11 23:26:58 +09:00
Roy Ivy III
423f4f9bf1
fix/cp ~ correct cargo clippy
complaint exception (*allow* clippy::unnecessary_wraps)
2021-06-06 19:28:25 -05:00
Sylvestre Ledru
841b689477
Merge pull request #2334 from sylvestre/crate_version
...
use crate_version!() instead of reading the env + rustfmt
2021-06-03 10:56:57 +02:00
Sylvestre Ledru
d8c06dd6bb
use clap::crate_version macro instead of the env variable
2021-06-02 19:00:19 +02:00
Michael Debertol
dfaaa8c787
Merge branch 'master' of https://github.com/uutils/coreutils into cp/close-fd
2021-06-02 11:37:37 +02:00