fix(tasks): always set updated on checkout. Change default logging to 3 days

This commit is contained in:
Folke Lemaitre 2022-11-29 10:30:45 +01:00
parent 0db98bf053
commit 5bcdddc0ec
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 5 additions and 1 deletions

View File

@ -31,7 +31,7 @@ M.log = {
local target = assert(Git.get_target(self.plugin)) local target = assert(Git.get_target(self.plugin))
table.insert(args, info.commit .. ".." .. target.commit) table.insert(args, info.commit .. ".." .. target.commit)
else else
table.insert(args, "--since=" .. (opts.since or "7 days ago")) table.insert(args, "--since=" .. (opts.since or "3 days ago"))
end end
self:spawn("git", { self:spawn("git", {
@ -138,6 +138,10 @@ M.checkout = {
end end
if not self.plugin._.cloned and info.commit == target.commit and info.branch == target.branch then if not self.plugin._.cloned and info.commit == target.commit and info.branch == target.branch then
self.plugin._.updated = {
from = info.commit,
to = info.commit,
}
return return
end end