mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-14 14:23:51 -05:00
For older Git versions, use the list of subcommands from when --list-cmds= was first added, and subtract out "worktree" for Git versions too old to have it. This one simple conditional gives us accurate completion for Git versions up to a decade old. The option is described as "internal/experimental", so make sure the exit status is successful, and filter out anything that looks like a warning or deprecation notice. In case of failure, use the commands provided by --list-cmds= as of the date of this commit. Closes https://github.com/tpope/vim-fugitive/pull/1629