File tree 2 files changed +9
-1
lines changed
2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -148,6 +148,14 @@ function M.get_target(plugin)
148
148
return { branch = branch , commit = M .get_commit (plugin .dir , branch , true ) }
149
149
end
150
150
151
+ --- @param plugin LazyPlugin
152
+ --- @return GitInfo ?
153
+ function M .get_local_target (plugin )
154
+ local info = M .info (plugin .dir )
155
+ local branch = assert (info and info .branch or M .get_branch (plugin ))
156
+ return { branch = branch , commit = M .get_commit (plugin .dir , branch , true ) }
157
+ end
158
+
151
159
function M .ref (repo , ...)
152
160
local ref = table.concat ({ ... }, " /" )
153
161
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ M.log = {
36
36
table.insert (args , self .plugin ._ .updated .from .. " .." .. (self .plugin ._ .updated .to or " HEAD" ))
37
37
elseif opts .check then
38
38
local info = assert (Git .info (self .plugin .dir ))
39
- local target = assert (Git .get_target (self .plugin ))
39
+ local target = assert (self . plugin . _ . is_local and Git . get_local_target ( self . plugin ) or Git .get_target (self .plugin ))
40
40
if not target .commit then
41
41
for k , v in pairs (target ) do
42
42
error (k .. " '" .. v .. " ' not found" )
You can’t perform that action at this time.
0 commit comments