From 440684edad0b56cb746c1f1aaef6a53aa703b2ce Mon Sep 17 00:00:00 2001 From: Ben Smith Date: Wed, 18 May 2022 18:27:06 +0000 Subject: [PATCH] break(git_files): change show_untracked default to false (#842) --- doc/telescope.txt | 2 +- lua/telescope/builtin/git.lua | 2 +- lua/telescope/builtin/init.lua | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/telescope.txt b/doc/telescope.txt index 42f8da1..b79006b 100644 --- a/doc/telescope.txt +++ b/doc/telescope.txt @@ -977,7 +977,7 @@ builtin.git_files({opts}) *telescope.builtin.git_files()* (default: true) {show_untracked} (boolean) if true, adds `--others` flag to command and shows untracked files - (default: true) + (default: false) {recurse_submodules} (boolean) if true, adds the `--recurse-submodules` flag to command (default: false) diff --git a/lua/telescope/builtin/git.lua b/lua/telescope/builtin/git.lua index 5f6b17e..caff989 100644 --- a/lua/telescope/builtin/git.lua +++ b/lua/telescope/builtin/git.lua @@ -22,7 +22,7 @@ git.files = function(opts) return end - local show_untracked = utils.get_default(opts.show_untracked, true) + local show_untracked = utils.get_default(opts.show_untracked, false) local recurse_submodules = utils.get_default(opts.recurse_submodules, false) if show_untracked and recurse_submodules then utils.notify("builtin.git_files", { diff --git a/lua/telescope/builtin/init.lua b/lua/telescope/builtin/init.lua index 4a99f3f..e9b695b 100644 --- a/lua/telescope/builtin/init.lua +++ b/lua/telescope/builtin/init.lua @@ -132,7 +132,7 @@ builtin.current_buffer_tags = require_on_exported_call("telescope.builtin.files" ---@param opts table: options to pass to the picker ---@field cwd string: specify the path of the repo ---@field use_git_root boolean: if we should use git root as cwd or the cwd (important for submodule) (default: true) ----@field show_untracked boolean: if true, adds `--others` flag to command and shows untracked files (default: true) +---@field show_untracked boolean: if true, adds `--others` flag to command and shows untracked files (default: false) ---@field recurse_submodules boolean: if true, adds the `--recurse-submodules` flag to command (default: false) ---@field git_command table: command that will be exectued. {"git","ls-files","--exclude-standard","--cached"} builtin.git_files = require_on_exported_call("telescope.builtin.git").files