Skip to content

Commit 7782027

Browse files
authored
Merge branch 'main' into libstdbuf-warning
2 parents f879cf3 + cc60f5f commit 7782027

33 files changed

Lines changed: 488 additions & 250 deletions

File tree

.github/workflows/CICD.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ jobs:
839839
uses: lima-vm/lima-actions/setup@v1
840840
id: lima-actions-setup
841841
- name: Cache ~/.cache/lima
842-
uses: actions/cache@v5
842+
uses: actions/cache@v6
843843
with:
844844
path: ~/.cache/lima
845845
key: lima-${{ steps.lima-actions-setup.outputs.version }}

.github/workflows/GnuTests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ jobs:
194194
uses: lima-vm/lima-actions/setup@v1
195195
id: lima-actions-setup
196196
- name: Cache ~/.cache/lima
197-
uses: actions/cache@v5
197+
uses: actions/cache@v6
198198
with:
199199
path: ~/.cache/lima
200200
key: lima-${{ steps.lima-actions-setup.outputs.version }}

.github/workflows/android.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
free -mh
8686
df -Th
8787
- name: Restore AVD cache
88-
uses: actions/cache/restore@v5
88+
uses: actions/cache/restore@v6
8989
id: avd-cache
9090
continue-on-error: true
9191
with:
@@ -127,7 +127,7 @@ jobs:
127127
util/android-commands.sh init "${{ matrix.arch }}" "${{ matrix.api-level }}" "${{ env.TERMUX }}"
128128
- name: Save AVD cache
129129
if: steps.avd-cache.outputs.cache-hit != 'true'
130-
uses: actions/cache/save@v5
130+
uses: actions/cache/save@v6
131131
with:
132132
path: |
133133
~/.android/avd/*
@@ -143,7 +143,7 @@ jobs:
143143
trim: true
144144
- name: Restore rust cache
145145
id: rust-cache
146-
uses: actions/cache/restore@v5
146+
uses: actions/cache/restore@v6
147147
with:
148148
path: ~/__rust_cache__
149149
# The version vX at the end of the key is just a development version to avoid conflicts in
@@ -184,7 +184,7 @@ jobs:
184184
df -Th
185185
- name: Save rust cache
186186
if: steps.rust-cache.outputs.cache-hit != 'true'
187-
uses: actions/cache/save@v5
187+
uses: actions/cache/save@v6
188188
with:
189189
path: ~/__rust_cache__
190190
key: ${{ matrix.arch }}_${{ matrix.target}}_${{ steps.read_rustc_hash.outputs.content }}_${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }}_v3

.github/workflows/code-quality.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ jobs:
241241
run: npm install -g cspell
242242

243243
- name: Cache pre-commit environments
244-
uses: actions/cache@v5
244+
uses: actions/cache@v6
245245
with:
246246
path: ~/.cache/pre-commit
247247
key: pre-commit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }}

.vscode/cspell.dictionaries/workspace.wordlist.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ uutests
360360
uutils
361361

362362
# * function names
363+
sendfile
363364
execfn
364365
fadvise
365366
fstatfs
@@ -374,6 +375,8 @@ weblate
374375
algs
375376
wasm
376377
wasip
378+
statx
379+
Statx
377380

378381
# * stty terminal flags
379382
brkint

Cargo.lock

Lines changed: 25 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -272,11 +272,8 @@ feat_os_unix_musl = [
272272
"feat_require_unix_hostid",
273273
"feat_require_unix_utmpx",
274274
]
275-
# "feat_os_windows" == set of utilities which can be built/run on modern/usual windows platforms
276-
feat_os_windows = [
277-
"feat_Tier1", ## == "feat_os_windows_legacy" + "hostname"
278-
"stdbuf",
279-
]
275+
# "feat_os_windows" == set of utilities which can be built/run on modern windows platforms
276+
feat_os_windows = ["feat_Tier1", "stdbuf"]
280277
## (secondary platforms) feature sets
281278
# "feat_os_unix_gnueabihf" == set of utilities which can be built/run on the "arm-unknown-linux-gnueabihf" target (ARMv6 Linux [hardfloat])
282279
feat_os_unix_gnueabihf = [
@@ -352,15 +349,6 @@ feat_os_unix_redox = [
352349
"stat",
353350
"uname",
354351
]
355-
# "feat_os_windows_legacy" == slightly restricted set of utilities which can be built/run on early windows platforms (eg, "WinXP")
356-
feat_os_windows_legacy = [
357-
"feat_common_core",
358-
#
359-
"arch",
360-
"nproc",
361-
"sync",
362-
"whoami",
363-
]
364352
##
365353
# * bypass/override ~ translate 'test' feature name to avoid dependency collision with rust core 'test' crate (o/w surfaces as compiler errors during testing)
366354
test = ["uu_test"]
@@ -401,7 +389,7 @@ compare = "0.1.0"
401389
crossterm = { version = "0.29.0", default-features = false }
402390
ctor = "1.0.0"
403391
ctrlc = { version = "3.5.2", features = ["termination"] }
404-
divan = { package = "codspeed-divan-compat", version = "4.4.1" }
392+
divan = { package = "codspeed-divan-compat", version = "5.0.0" }
405393
dns-lookup = { version = "3.0.0" }
406394
exacl = "0.13.0"
407395
file_diff = "1.0.0"

src/uu/cat/src/cat.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,12 +369,13 @@ fn cat_path(path: &OsString, options: &OutputOptions, state: &mut OutputState) -
369369
match get_input_type(path)? {
370370
InputType::StdIn => {
371371
let stdin = io::stdin();
372+
let is_interactive = stdin.is_terminal();
372373
if is_unsafe_overwrite(&stdin, &io::stdout()) {
373374
return Err(CatError::OutputIsInput);
374375
}
375376
let mut handle = InputHandle {
376377
reader: stdin,
377-
is_interactive: io::stdin().is_terminal(),
378+
is_interactive,
378379
};
379380
cat_handle(&mut handle, options, state)
380381
}

src/uu/cp/src/platform/linux.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ where
3131
{
3232
let mut src = open_source(source, source_nofollow)?;
3333
let mut dst = create_dest_restrictive(dest, false)?;
34-
std::io::copy(&mut src, &mut dst).map(|_| ())
34+
if ioctl_ficlone(&dst, &src).is_err() {
35+
// faster than io::copy's copy_file_range and sendfile
36+
buf_copy::copy_stream(&mut src, &mut dst)?;
37+
}
38+
Ok(())
3539
}
3640

3741
/// The fallback behavior for [`clone`] on failed system call.

0 commit comments

Comments
 (0)