feat(git): lazy now detects origin changes and will fix it on update. Fixes #346. Fixes #331

This commit is contained in:
Folke Lemaitre 2023-01-08 08:32:03 +01:00
parent a39fa0f0ce
commit 615781aebf
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
2 changed files with 30 additions and 1 deletions

View file

@ -94,6 +94,7 @@ function M.update(opts)
opts = M.opts(opts, { mode = "update" })
return M.run({
pipeline = {
"git.origin",
"git.branch",
"git.fetch",
{ "git.checkout", lockfile = opts.lockfile },
@ -123,6 +124,7 @@ function M.check(opts)
opts = opts or {}
return M.run({
pipeline = {
{ "git.origin", check = true },
"git.fetch",
"wait",
{ "git.log", check = true },
@ -137,7 +139,10 @@ end
function M.log(opts)
opts = M.opts(opts, { mode = "log" })
return M.run({
pipeline = { "git.log" },
pipeline = {
{ "git.origin", check = true },
"git.log",
},
plugins = function(plugin)
return plugin.url and plugin._.installed
end,