chore: default :Review to unpushed commits

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Job79andClaude Opus 5.5 committed 2026-11-08 11:40:37 +01:00
1 parent c3bf6eec2e
commit fab3dc1d94
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -62,10 +62,10 @@ end
-- Last review, refreshed by `review()` without args
local last = {}
-- Review changes since the merge-base with `base` (default origin/HEAD) up to `head`.
-- Review changes since the merge-base with `base` (default @{upstream}, i.e. unpushed commits) up to `head`.
-- Without `head` the working tree is used, so the right side is your real, editable file.
local function review(base, head)
if base or not last.base then last = { base = base or 'origin/HEAD', head = head, seen = {} } end
if base or not last.base then last = { base = base or '@{upstream}', head = head, seen = {} } end
local root = vim.trim(git({ 'rev-parse', '--show-toplevel' }))
local merge_base = vim.trim(git({ 'merge-base', last.base, last.head or 'HEAD' }))
local range = last.head and (merge_base .. '..' .. last.head) or merge_base