Skip to content

Commit e8d0107

Browse files
committed
fix(push): issues opened when pushing while everything is up-to-date
1 parent ac211b1 commit e8d0107

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lua/tinygit/commands/push-pull.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ local function pushCmd(opts)
3333
vim.schedule_wrap(function(result)
3434
local out = vim.trim((result.stdout or "") .. (result.stderr or ""))
3535
out = out:gsub("\n%s+", "\n") -- remove padding
36-
local commitRange = out:match("%x+%.%.%x+")
36+
local commitRange = out:match("%x+%.%.%x+") ---@type string|nil
3737
-- force-push `+` would get md-lhighlight
3838
local ft = opts.forceWithLease and "text" or "markdown"
3939

@@ -57,7 +57,7 @@ local function pushCmd(opts)
5757
end
5858

5959
-- post-push actions
60-
if config.openReferencedIssues and not opts.forceWithLease then
60+
if config.openReferencedIssues and not opts.forceWithLease and commitRange then
6161
openReferencedIssues(commitRange)
6262
end
6363
updateStatusline()

0 commit comments

Comments
 (0)