Skip to content
This repository was archived by the owner on Jan 14, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lua/codecompanion/_extensions/gitcommit/tools/command.lua
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ end
---@param to_tag string Ending tag
---@return string command
function CommandBuilder.release_notes_log(from_tag, to_tag)
local range = from_tag .. "^.." .. to_tag
local range = from_tag .. ".." .. to_tag
local escaped_range = vim.fn.shellescape(range)
local format_str = shell_quote("%h\x01%s\x01%an\x01%ad")
return "git log --pretty=format:" .. format_str .. " --date=short " .. escaped_range
Expand Down
4 changes: 2 additions & 2 deletions mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ windows_default_inline_shell_args = "pwsh -NoProfile -Command"
description = "Install test dependencies (mini.nvim)"
run = """
mkdir -p deps
test -d deps/mini.nvim || git clone --depth 1 https://github.com/echasnovski/mini.nvim deps/mini.nvim
test -d deps/mini.nvim/.git || (rm -rf deps/mini.nvim && git clone --depth 1 https://github.com/echasnovski/mini.nvim deps/mini.nvim)
"""
run_windows = """
if (-not (Test-Path deps)) { New-Item -ItemType Directory -Path deps | Out-Null }
if (-not (Test-Path deps/mini.nvim)) { git clone --depth 1 https://github.com/echasnovski/mini.nvim deps/mini.nvim }
if (-not (Test-Path deps/mini.nvim/.git)) { Remove-Item -Recurse -Force deps/mini.nvim -ErrorAction SilentlyContinue; git clone --depth 1 https://github.com/echasnovski/mini.nvim deps/mini.nvim }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The use of -ErrorAction SilentlyContinue can mask failures. If Remove-Item fails for a reason other than the path not existing (e.g., permissions), the error is suppressed, and the script proceeds to git clone, which will then fail with a potentially confusing message. The Unix equivalent command uses &&, which correctly prevents git clone from running if the removal fails.

To make the Windows command more robust and align its behavior with the Unix command, it's better to first check if the directory exists before attempting removal and to use an error action that halts the script on failure.

Suggested change
if (-not (Test-Path deps/mini.nvim/.git)) { Remove-Item -Recurse -Force deps/mini.nvim -ErrorAction SilentlyContinue; git clone --depth 1 https://github.com/echasnovski/mini.nvim deps/mini.nvim }
if (-not (Test-Path deps/mini.nvim/.git)) { if (Test-Path deps/mini.nvim) { Remove-Item -Recurse -Force deps/mini.nvim -ErrorAction Stop }; git clone --depth 1 https://github.com/echasnovski/mini.nvim deps/mini.nvim }

"""

[tasks.test]
Expand Down
Loading