1
1
local Util = require (" lazy.util" )
2
2
local Git = require (" lazy.manage.git" )
3
3
local Lock = require (" lazy.manage.lock" )
4
+ local Config = require (" lazy.core.config" )
4
5
5
6
--- @type table<string , LazyTaskDef>
6
7
local M = {}
7
8
8
9
M .log = {
9
- --- @param opts { since ?: string , updated ?: boolean , check ?: boolean }
10
+ --- @param opts { updated ?: boolean , check ?: boolean }
10
11
skip = function (plugin , opts )
11
12
if opts .updated and not (plugin ._ .updated and plugin ._ .updated .from ~= plugin ._ .updated .to ) then
12
13
return true
13
14
end
14
15
return not Util .file_exists (plugin .dir .. " /.git" )
15
16
end ,
16
- --- @param opts { since ?: string , updated ?: boolean , check ?: boolean }
17
+ --- @param opts { args ?: string[] , updated ?: boolean , check ?: boolean }
17
18
run = function (self , opts )
18
19
local args = {
19
20
" log" ,
@@ -30,10 +31,8 @@ M.log = {
30
31
local info = assert (Git .info (self .plugin .dir ))
31
32
local target = assert (Git .get_target (self .plugin ))
32
33
table.insert (args , info .commit .. " .." .. target .commit )
33
- elseif opts .since then
34
- table.insert (args , " --since=" .. (opts .since or " 3 days ago" ))
35
34
else
36
- table.insert (args , " -10 " )
35
+ vim . list_extend (args , opts . args or Config . options . git . log )
37
36
end
38
37
39
38
self :spawn (" git" , {
0 commit comments