Skip to content

Commit a6fd4e6

Browse files
authored
fix(fish): parse git lock timestamps portably (#3468)
1 parent dd37c8c commit a6fd4e6

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎home-manager/programs/fish/functions/_git_index_lock_wait.fish‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function _git_index_lock_wait --description "Wait for .git/index.lock to clear;
4646
end
4747

4848
if test (count $holders) -eq 0
49-
set -l mtime (stat -f %m "$lock" 2>/dev/null; or stat -c %Y "$lock" 2>/dev/null)
49+
set -l mtime (stat -c %Y "$lock" 2>/dev/null; or stat -f %m "$lock" 2>/dev/null)
5050
set -l age (math (date +%s) - $mtime)
5151
echo "git: removing stale index.lock (age $age s, no holder)" >&2
5252
rm -f -- "$lock"

‎home-manager/programs/fish/functions/_pixe_function.tpl.fish‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ function _pixe_function --description "Run Pi with a free-form prompt"
33
# Usage: pixe [<prompt words...>]
44

55
if test (count $argv) -gt 0; and contains -- "$argv[1]" --resume -r --continue -c
6-
pi --model 'cliproxyapi/__DEEPSEEK_FLASH__' --resume $argv[2]
6+
pi --model 'cliproxyapi/__DEEPSEEK_FLASH_UNVERSIONED__' --resume $argv[2]
77
else if test (count $argv) -eq 0
8-
pi --model 'cliproxyapi/__DEEPSEEK_FLASH__'
8+
pi --model 'cliproxyapi/__DEEPSEEK_FLASH_UNVERSIONED__'
99
else
1010
set -l prompt (string join " " -- $argv)
11-
pi --model 'cliproxyapi/__DEEPSEEK_FLASH__' "$prompt"
11+
pi --model 'cliproxyapi/__DEEPSEEK_FLASH_UNVERSIONED__' "$prompt"
1212
end
1313
end

‎home-manager/programs/fish/functions/_pixeh_function.tpl.fish‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ function _pixeh_function --description "Run Pi headlessly with a prompted input"
1414
return 1
1515
end
1616

17-
pi --model 'cliproxyapi/__DEEPSEEK_FLASH__' -p "$prompt"
17+
pi --model 'cliproxyapi/__DEEPSEEK_FLASH_UNVERSIONED__' -p "$prompt"
1818
end

‎spec/fish/_pixe_function.tpl_test.fish‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function pi; echo $argv >> $log1; end
77

88
_pixe_function
99

10-
@test "no args calls pi with templated cliproxyapi model" (grep -c "cliproxyapi/__DEEPSEEK_FLASH__" $log1) -ge 1
10+
@test "no args calls pi with templated cliproxyapi model" (grep -c "cliproxyapi/__DEEPSEEK_FLASH_UNVERSIONED__" $log1) -ge 1
1111

1212
# ── with args: builds prompt ──────────────────────────────
1313
set log2 (mktemp)
@@ -16,6 +16,6 @@ function pi; echo $argv >> $log2; end
1616
_pixe_function hello world
1717

1818
@test "with args builds prompt" (grep -c "hello world" $log2) -ge 1
19-
@test "with args uses templated cliproxyapi model" (grep -c "cliproxyapi/__DEEPSEEK_FLASH__" $log2) -ge 1
19+
@test "with args uses templated cliproxyapi model" (grep -c "cliproxyapi/__DEEPSEEK_FLASH_UNVERSIONED__" $log2) -ge 1
2020

2121
rm -f $log1 $log2

‎spec/fish/_pixeh_function.tpl_test.fish‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function pi; echo $argv >> $log1; end
1010
echo "hello world" | _pixeh_function
1111

1212
@test "non-empty prompt builds prompt" (grep -c "hello world" $log1) -ge 1
13-
@test "non-empty prompt uses templated cliproxyapi model" (grep -c "cliproxyapi/__DEEPSEEK_FLASH__" $log1) -ge 1
13+
@test "non-empty prompt uses templated cliproxyapi model" (grep -c "cliproxyapi/__DEEPSEEK_FLASH_UNVERSIONED__" $log1) -ge 1
1414
@test "non-empty prompt uses print mode" (grep -c -- "-p" $log1) -ge 1
1515

1616
set log2 (mktemp)

0 commit comments

Comments
 (0)