diff options
| author | Simon Hauser <Simon-Hauser@outlook.de> | 2022-05-22 12:53:37 +0200 |
|---|---|---|
| committer | Simon Hauser <simon.hauser@helsinki-systems.de> | 2022-06-30 14:01:49 +0200 |
| commit | 83b6cadb2c61b6eee6a8f0ec8bb4599c89b6ab57 (patch) | |
| tree | 9e33acbc68a154e2ddb1fca34cfa87f6f80b2904 /lua/telescope/builtin/git.lua | |
| parent | a1aec79cb1abc5630f941bafbe83f6e00dcff316 (diff) | |
break: deprecate utils.get_default utils.if_nil (#1545)
Diffstat (limited to 'lua/telescope/builtin/git.lua')
| -rw-r--r-- | lua/telescope/builtin/git.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lua/telescope/builtin/git.lua b/lua/telescope/builtin/git.lua index caff989..74b7df9 100644 --- a/lua/telescope/builtin/git.lua +++ b/lua/telescope/builtin/git.lua @@ -22,8 +22,8 @@ git.files = function(opts) return end - local show_untracked = utils.get_default(opts.show_untracked, false) - local recurse_submodules = utils.get_default(opts.recurse_submodules, false) + local show_untracked = vim.F.if_nil(opts.show_untracked, false) + local recurse_submodules = vim.F.if_nil(opts.recurse_submodules, false) if show_untracked and recurse_submodules then utils.notify("builtin.git_files", { msg = "Git does not support both --others and --recurse-submodules", @@ -317,7 +317,7 @@ git.status = function(opts) end local gen_new_finder = function() - local expand_dir = utils.if_nil(opts.expand_dir, true, opts.expand_dir) + local expand_dir = vim.F.if_nil(opts.expand_dir, true) local git_cmd = { "git", "status", "-s", "--", "." } if expand_dir then @@ -374,7 +374,7 @@ local set_opts_cwd = function(opts) -- Find root of git directory and remove trailing newline characters local git_root, ret = utils.get_os_command_output({ "git", "rev-parse", "--show-toplevel" }, opts.cwd) - local use_git_root = utils.get_default(opts.use_git_root, true) + local use_git_root = vim.F.if_nil(opts.use_git_root, true) if ret ~= 0 then local in_worktree = utils.get_os_command_output({ "git", "rev-parse", "--is-inside-work-tree" }, opts.cwd) |
