Yggdroot / LeaderF

An efficient fuzzy finder that helps to locate files, buffers, mrus, gtags, etc. on the fly for both vim and neovim.
Apache License 2.0
2.14k stars 180 forks source link

让 leaderf git 支持多个git 仓库 #1066

Closed keeferwu closed 3 months ago

keeferwu commented 4 months ago

可否优化一下 Leaderf git 使其能够适应多个 git 仓库

例如有如下结构:

root_git
---  .git
---  aaa.c
---  sub1_git
     --- .git
     --- bbb.c
---  sub2_git
     --- .git
     --- ccc.c 

在 root_git 下打开bbb.c 或 ccc.c 使用Leaderf git log 就只能看到 root_git 下的log

目前的行为好像是显示当前工作目录下对应git仓库的log

能否做到不切换目录的情况下使用Leaderf git log 可以显示子仓库的log,

比如可以根据当前buffer 向上查找最近的.git,找到后就显示其对应仓库的log

或者命令中提供一个可以选择路径的选项,由用户自己决定查看哪个仓库

Yggdroot commented 4 months ago

等有时间考虑一下,看看怎么实现。

Yggdroot commented 3 months ago

现在可以根据当前buffer 向上查找最近的.git了。