Narasimha Prasanna HN
1194a8ce53
Fix: Update quick-error crate version from 1.2.3 to 2.0.1 in src/uu/cp ( #2947 )
...
fix: update quick-error crate from 1.2.3 to 2.0.1 for src/uu/cp tool, fixes: #2941
2022-01-31 21:56:47 +01:00
Daniel Eades
ba45fe312a
use 'Self' and derive 'Default' where possible
2022-01-30 15:08:26 +01:00
Daniel Eades
2f85610cc3
remove explicit iter loops
2022-01-30 15:08:26 +01:00
Daniel Eades
784f2e2ea1
use semicolons if nothing returned
2022-01-30 15:08:26 +01:00
Daniel Eades
a2d5f06be4
remove needless pass by value
2022-01-30 15:08:26 +01:00
Eli Youngs
680e9081fe
Don't panic when calling cp -a with a nonexistent file
2022-01-29 22:59:53 -08:00
Terts Diepraam
eb82015b23
all: change macros
...
- Change the main! proc_macro to a bin! macro_rules macro.
- Reexport uucore_procs from uucore
- Make utils to not import uucore_procs directly
- Remove the `syn` dependency and don't parse proc_macro input (hopefully for faster compile times)
2022-01-29 15:26:32 +01:00
Sylvestre Ledru
cbc7da3d7d
Merge pull request #2936 from tertsdiepraam/clap-infer-long-args
...
all: enable infer long arguments in clap
2022-01-29 09:57:15 +01:00
Terts Diepraam
9c8e865b55
all: enable infer long arguments in clap
2022-01-29 02:06:29 +01:00
Sylvestre Ledru
96584027e5
selinux: add consistency in the dep declaration
2022-01-29 01:31:17 +01:00
Terts Diepraam
55a47f6fc0
Merge pull request #2863 from tertsdiepraam/clap-3
...
Clap 3
2022-01-20 23:14:52 +01:00
Roy Ivy III
2e251f91f1
0.0.12
2022-01-19 05:35:00 -06:00
Terts Diepraam
8872485922
Merge branch 'main' into clap-3
2022-01-17 13:25:51 +01:00
Sylvestre Ledru
1fbda8003c
coreutils 0.0.8 => 0.0.9, uucore_procs 0.0.7 => 0.0.8, uucore 0.0.10 => 0.0.11
2022-01-16 17:05:48 +01:00
Terts Diepraam
37ab05bd7a
cp: clap 3
2022-01-11 19:16:47 +01:00
Terts Diepraam
f60c36f242
Merge pull request #2610 from miDeb/cp/abuse
...
cp: handle edge cases when dest is a symlink
2022-01-11 00:34:55 +01:00
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
Michael Debertol
3fdff304db
cp: handle edge cases when dest is a symlink
...
- Fail if dest is a dangling symlink
- Fail if dest is a symlink that was previously created by the same
invocation of cp
2021-11-01 22:48:48 +01: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