Skip to content

Commit d89468d

Browse files
committed
Ignore .git when respecting .gitignore
See also BurntSushi/ripgrep#713
1 parent 405ae83 commit d89468d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

deadgrep.el

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,13 @@ to obtain ripgrep results."
763763

764764
(unless deadgrep--skip-if-hidden
765765
(push "--hidden" args))
766-
(unless deadgrep--skip-if-vcs-ignore
766+
(if deadgrep--skip-if-vcs-ignore
767+
;; By default, ripgrep searches .git even when it's respecting
768+
;; .gitignore, if --hidden is set. Ignore .git when we're
769+
;; using .gitignore.
770+
;;
771+
;; https://github.com/BurntSushi/ripgrep/issues/713
772+
(push "--glob=!/.git" args)
767773
(push "--no-ignore-vcs" args))
768774

769775
(push "--" args)

0 commit comments

Comments
 (0)