Commit graph

631 commits

Author SHA1 Message Date
Sylvestre Ledru
24aff229da Add a function to detect if file is likely to be the simple backup file 2023-06-28 23:11:25 +02:00
renovate[bot]
824097d224
fix(deps): update rust crate libc to 0.2.147 2023-06-25 19:09:01 +00:00
Sylvestre Ledru
ddcdda44db Remove the auto capitalization of error message 2023-06-25 00:18:33 +02:00
renovate[bot]
0144a3c78f
fix(deps): update rust crate itertools to 0.11.0 2023-06-22 13:43:21 +00:00
Rayhan Faizel
c113284a4b uucore: modify are_hardlinks_to_same_file to check only immediate metadata 2023-06-12 23:46:33 +05:30
Rayhan Faizel
ab42b1e599 uucore: add function which checks hardlink as well as directed symlink 2023-06-10 18:31:30 +05:30
Sylvestre Ledru
6ecef3a0e3 Reformat TOML files with taplo
npx --yes @taplo/cli fmt
2023-06-08 09:07:19 +02:00
renovate[bot]
c68b665bf9
fix(deps): update rust crate libc to 0.2.146 2023-06-06 14:39:50 +00:00
Sylvestre Ledru
830b7d5ce1 New release 2023-06-04 09:46:59 +02:00
Sylvestre Ledru
58bf998919
Ignore some words 2023-05-30 15:49:53 +02:00
John Shin
a397920183 core: refactor parse_number in size parser 2023-05-30 13:56:01 +02:00
John Shin
0465553f6e core: size parser treat 000 as decimal 2023-05-30 13:56:01 +02:00
John Shin
8ef926c6e8 core: refactor num and unit split 2023-05-30 13:56:01 +02:00
John Shin
6cadffc8f1 core: fix clippy warning for size parser 2023-05-30 13:56:01 +02:00
John Shin
6278c6f2d6 core: add octal and hex size parse support 2023-05-30 13:56:01 +02:00
Daniel Hofstetter
1781a5db1d
Merge pull request #4698 from uutils/renovate/windows-sys-0.x
fix(deps): update rust crate windows-sys to 0.48.0
2023-05-30 13:40:49 +02:00
renovate[bot]
2ec70dc05d
fix(deps): update rust crate dns-lookup to v2 2023-05-30 06:37:02 +00:00
renovate[bot]
8f9a328c6a
fix(deps): update rust crate windows-sys to 0.48.0 2023-05-30 06:36:57 +00:00
Moïse Valvassori
b29f8b011b
chown: show "ownership of 'foo' retained" message
* Display a message when the owner is not changed.

* Display a message when the current user/group doesn't match those specified in the `--from` args.

* print messages to stdout

* Show the message "ownership of 'foo' retained as 'bar'" for every path entry when `chown -v -R --from=`

* fix chown tests: test stdout and not stderr

* factorize duplicate code in a function

* Display a message when the owner is not changed.

* Display a message when the current user/group doesn't match those specified in the `--from` args.

* print messages to stdout

* Show the message "ownership of 'foo' retained as 'bar'" for every path entry when `chown -v -R --from=`

* fix chown tests: test stdout and not stderr

* factorize duplicate code in a function

* display the retained ownership details according to the destination ownership.
2023-05-24 09:45:19 +02:00
renovate[bot]
cda52ebce6
fix(deps): update rust crate data-encoding-macro to 0.1.13 2023-05-22 12:36:42 +00:00
renovate[bot]
66224cdbf8
fix(deps): update rust crate data-encoding to 2.4 2023-05-22 11:32:58 +00:00
Moïse Valvassori
0130a07579
chown: show message if file doesn't exist
* print the message "failed to change ownership of" when we try to change a non existing file.

* replace the 4-tuple returned by parse_gid_uid_and_filter by GidUidOwnerFilter struct.

* chain the test in one expression.

* chown: remove unused var "result" in test

---------

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2023-05-21 17:54:32 +02:00
renovate[bot]
30c166ad40
fix(deps): update rust crate libc to 0.2.144 2023-05-08 16:28:38 +00:00
Daniel Hofstetter
d769871374
Merge pull request #4831 from sylvestre/mv-hardlink
mv: 'mv source hardlink' should fail
2023-05-08 16:12:23 +02:00
Sylvestre Ledru
b7cf825887 uucore::fs add an hardlink detection 2023-05-07 23:04:52 +02:00
renovate[bot]
214c027cfa
fix(deps): update rust crate libc to 0.2.143 2023-05-06 19:01:14 +00:00
Sylvestre Ledru
cd688662ec fix some lines_filter_map_ok clippy warnings 2023-05-06 14:53:42 +02:00
Sylvestre Ledru
f8d7bebed3 ignore some cognitive_complexity for now 2023-05-06 14:50:55 +02:00
Daniel Hofstetter
616a166e36
Merge pull request #4820 from sylvestre/thru-dangling-2
cp: fix cp -f f loop when loop is a symlink loop
2023-05-04 08:20:57 +02:00
Sylvestre Ledru
6547bec2ef uucore/detect_symlink_loop: add a function to detect symlink loops 2023-05-03 19:54:33 +02:00
Sylvestre Ledru
aae3f2f99c Ride along: fix some trivial clippy warnings 2023-05-02 23:22:39 +02:00
John Shin
898628fa3a core: fix typo in update control 2023-05-02 13:54:31 -07:00
John Shin
3b8f3d04f4 core: remove unnecessary if statement in update control 2023-05-02 12:49:49 -07:00
John Shin
460d346069 core: remove '' case for the update argument 2023-05-02 12:42:39 -07:00
John Shin
06d4603bea core: fix typo in update control 2023-05-02 12:40:04 -07:00
John Shin
36e93e12d6 core: add header notice for update control 2023-05-02 12:38:12 -07:00
John Shin
60c0b661c3 core: fix typo in update control 2023-05-01 17:22:08 -07:00
John Shin
c5327cf0a0 core: add docs for update control 2023-05-01 03:48:37 -07:00
John Shin
2f8df653c5 core mv cp: update help doc for 'update' functionality 2023-04-30 18:53:11 -07:00
John Shin
ecde4b6aa3 core: introduce update controller for mv and cp 2023-04-27 04:47:59 -07:00
Dan Gohman
f187a5ccff Fix a warning in upstream code on Rust nightly.
Rust nightly recently [started] issuing the following warning when
compiling coreutils:

[started]: https://github.com/rust-lang/rust/pull/109944

```
warning: getting the inner pointer of a temporary `CString`
   --> src/uucore/src/lib/features/entries.rs:324:67
    |
324 |                         let data = $fnam(CString::new(k).unwrap().as_ptr());
    |                                          ------------------------ ^^^^^^ this pointer will be invalid
    |                                          |
    |                                          this `CString` is deallocated at the end of the statement, bind it to a variable to extend its lifetime
...
340 | f!(getpwnam, getpwuid, uid_t, Passwd);
    | ------------------------------------- in this macro invocation
    |
    = note: pointers do not have a lifetime; when calling `as_ptr` the `CString` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned
    = help: for more information, see https://doc.rust-lang.org/reference/destructors.html
    = note: `#[warn(temporary_cstring_as_ptr)]` on by default
    = note: this warning originates in the macro `f` (in Nightly builds, run with -Z macro-backtrace for more info)
```

There doesn't seem to be an actual problem in this case, as the pointer is
only used within the statement.
2023-04-24 14:31:05 -07:00
renovate[bot]
790958e4f3
fix(deps): update rust crate libc to 0.2.142 2023-04-20 17:09:10 +00:00
renovate[bot]
54178d491c
fix(deps): update rust crate dunce to 1.0.4 2023-04-19 16:14:17 +00:00
Daniel Hofstetter
dd3c0f7fe9
Merge pull request #4729 from spineki/b2sum-missing-l-option
B2sum: add -l/--length option
2023-04-13 09:57:55 +02:00
Marras Antoine
ae1113d7dc b2sum: add support to -l option 2023-04-10 18:31:18 +02:00
Daniel Hofstetter
4355fb7f78 Remove some unnecessary "extern crate" statements 2023-04-09 16:12:45 +02:00
Daniel Hofstetter
dfea103bc4 uucore: remove commented out imports 2023-04-09 14:53:15 +02:00
renovate[bot]
120a5f6d76
fix(deps): update rust crate libc to 0.2.141 2023-04-04 10:22:35 +00:00
Sylvestre Ledru
3247e1b5e1
Merge pull request #4639 from sylvestre/version
0.0.17 => 0.0.18
2023-04-02 11:31:24 +02:00
Daniel Hofstetter
5d0f0144c1
Merge pull request #4691 from uutils/renovate/windows-sys-0.x
fix(deps): update rust crate windows-sys to 0.45.0
2023-03-31 08:09:33 +02:00