lazy.nvim/lua/lazy
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
..
community chore(build): auto-generate rockspec mappings 2024-06-26 04:22:43 +00:00
core chore(main): release 11.10.2 (#1621) 2024-07-07 08:44:37 +02:00
manage fix(git): local plugin fixes (#1624) 2024-07-07 17:13:49 +02:00
pkg perf(rocks): `vim.fn.executable` is slow on WSL2, so only check for `luarocks` when needed. Closes #1585 2024-06-29 11:44:31 +02:00
view fix(async): make asyncs abortable 2024-06-30 13:35:14 +02:00
async.lua fix(async): make asyncs abortable 2024-06-30 13:35:14 +02:00
build.lua ci: added neo to rockspec patterns 2024-06-26 06:22:23 +02:00
docs.lua docs: fix commands table. Fixes #1393 2024-03-28 12:15:31 +01:00
example.lua style: fix some typo (#1496) 2024-06-03 09:18:43 +02:00
health.lua fix(health): check for errors when executing commands. Closes #1599 2024-07-02 13:43:03 +02:00
help.lua fix(help): get rid of any tbl_flatten or iter flatten code 2024-05-19 17:29:43 +02:00
init.lua docs: make bootstrap work on stable and nightly. Fixes #1391 2024-03-27 09:23:19 +01:00
minit.lua ci: dont enable local specs for minit 2024-07-04 18:00:59 +02:00
state.lua style: sort requires 2023-10-09 11:25:42 +02:00
stats.lua feat(profiling): merge VeryLazy stats and show startuptime in profile view 2024-07-04 15:17:10 +02:00
status.lua feat(ui): added statusline component to show pending updates 2022-12-05 20:49:45 +01:00
terminal.lua feat: added `opts.headless` to control ansi output when running headless 2024-06-26 21:38:28 +02:00
types.lua style: allow false for build 2024-06-24 20:23:03 +02:00
util.lua fix(process): deal with process errors 2024-06-29 13:52:50 +02:00