mirror of
https://github.com/nvim-lua/kickstart.nvim.git
synced 2025-08-18 08:39:06 +02:00
claude-baseline-1752117543
This commit is contained in:
parent
15308b5cb7
commit
1b73512226
3 changed files with 36 additions and 17 deletions
|
@ -68,9 +68,18 @@ function M.pre_tool_use_hook()
|
|||
return
|
||||
end
|
||||
|
||||
-- Store the baseline commit reference
|
||||
M.baseline_commit = 'HEAD'
|
||||
utils.write_file(baseline_file, 'HEAD')
|
||||
-- Store the actual commit hash instead of 'HEAD'
|
||||
local hash_cmd = string.format('cd "%s" && git rev-parse HEAD', git_root)
|
||||
local commit_hash, hash_err = utils.exec(hash_cmd)
|
||||
|
||||
if not hash_err and commit_hash and commit_hash ~= '' then
|
||||
commit_hash = commit_hash:gsub('%s+', '')
|
||||
M.baseline_commit = commit_hash
|
||||
utils.write_file(baseline_file, commit_hash)
|
||||
else
|
||||
M.baseline_commit = 'HEAD'
|
||||
utils.write_file(baseline_file, 'HEAD')
|
||||
end
|
||||
|
||||
vim.notify('New baseline commit created: ' .. commit_msg, vim.log.levels.INFO)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue