lazy.nvim/lua/lazy/manage
Andre Toerien 72c0dc9462
fix(git): local plugin fixes (#1624)
## Description

As I described in
https://github.com/folke/lazy.nvim/pull/1512#issuecomment-2212474372,
this makes it so that local plugins will only show as needing updates if
the local branch is behind the upstream branch. This is done by checking
the output of the `git log` command, and only setting `plugin._.updates`
if the output is not empty.

This seems to solve my issue where local plugins with unpushed changes
always show as needing updates, but if there's a easier/better way of
doing it then please feel free to edit/close this. Or if you don't agree
that the current behaviour is a bug, then that's also fine - it's not a
big deal and I can easily just ignore the "updates available" notice.

I also came across a minor issue where the plugin diff view (press `d`)
compares the wrong commits for local plugins, because
[lua/lazy/view/init.lua](c771cf4928/lua/lazy/view/init.lua (L268))
always uses `get_target`. I fixed this by moving `get_local_target` into
`get_target` - I think this is simpler and more straightforward than the
alternative of adding a ternary everywhere `get_target` is called.

This second bugfix is a very small change, so I've just included it
here, but I'm happy to make a second PR if you'd like.

## Related Issue(s)

Related PR: #1512
2024-07-07 17:13:49 +02:00
..
task fix(git): local plugin fixes (#1624) 2024-07-07 17:13:49 +02:00
checker.lua fix(git): local plugin fixes (#1624) 2024-07-07 17:13:49 +02:00
git.lua fix(git): local plugin fixes (#1624) 2024-07-07 17:13:49 +02:00
init.lua refactor: async processes 2024-06-28 16:08:26 +02:00
lock.lua fix(lockfile): keep cond=false and enabed=false in lockfile. Fixes #1535. Fixes #1606 2024-07-05 09:01:04 +02:00
process.lua fix(async): make asyncs abortable 2024-06-30 13:35:14 +02:00
reloader.lua refactor: reloader 2024-06-18 00:36:11 +02:00
runner.lua perf: suspend when tasks are active 2024-06-30 09:13:04 +02:00
semver.lua ci: auto-get rockspec mappings for rock name => github short url or url 2024-06-25 17:41:16 +02:00