File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,8 +5,9 @@ local createGitHubPr = require("tinygit.commands.github").createGitHubPr
55local updateStatusline = require (" tinygit.statusline" ).updateAllComponents
66---- ----------------------------------------------------------------------------
77
8- --- @param commitRange string
8+ --- @param commitRange string | nil
99local function openReferencedIssues (commitRange )
10+ if not commitRange then return end -- e.g. for "Everything is up-to-date"
1011 local repo = require (" tinygit.commands.github" ).getGithubRemote (" silent" )
1112 if not repo then return end
1213
@@ -33,7 +34,7 @@ local function pushCmd(opts)
3334 vim .schedule_wrap (function (result )
3435 local out = vim .trim ((result .stdout or " " ) .. (result .stderr or " " ))
3536 out = out :gsub (" \n %s+" , " \n " ) -- remove padding
36- local commitRange = out :match (" %x+%.%.%x+" )
37+ local commitRange = out :match (" %x+%.%.%x+" ) --- @type string | nil
3738 -- force-push `+` would get md-lhighlight
3839 local ft = opts .forceWithLease and " text" or " markdown"
3940
You can’t perform that action at this time.
0 commit comments