diff options
| author | Simon Hauser <Simon-Hauser@outlook.de> | 2022-10-31 15:48:32 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-31 15:48:32 +0100 |
| commit | 4bd4205028d6588cf2e0a1346687a6039b0f0a7c (patch) | |
| tree | 1a545519ff8e10068c058d28de54533f173427bb | |
| parent | 97847309cbffbb33e442f07b8877d20322a26922 (diff) | |
Revert "feat(git): notify when not in a git repo instead of error (#2181)" (#2217)
This reverts commit a09df82861944aab86c74648b1a570ff8ff73f82.
| -rw-r--r-- | lua/telescope/builtin/__git.lua | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/lua/telescope/builtin/__git.lua b/lua/telescope/builtin/__git.lua index acab6c4..7c4f28b 100644 --- a/lua/telescope/builtin/__git.lua +++ b/lua/telescope/builtin/__git.lua @@ -392,11 +392,7 @@ local set_opts_cwd = function(opts) local in_bare = utils.get_os_command_output({ "git", "rev-parse", "--is-bare-repository" }, opts.cwd) if in_worktree[1] ~= "true" and in_bare[1] ~= "true" then - utils.notify("builtin.git", { - msg = opts.cwd .. " is not a git directory", - level = "ERROR", - }) - return false + error(opts.cwd .. " is not a git directory") elseif in_worktree[1] ~= "true" and in_bare[1] == "true" then opts.is_bare = true end @@ -405,8 +401,6 @@ local set_opts_cwd = function(opts) opts.cwd = git_root[1] end end - - return true end local function apply_checks(mod) @@ -414,10 +408,8 @@ local function apply_checks(mod) mod[k] = function(opts) opts = vim.F.if_nil(opts, {}) - local ok = set_opts_cwd(opts) - if ok then - v(opts) - end + set_opts_cwd(opts) + v(opts) end end |
