Repository: sharkdp/fd (language: rust)

Issue:
Documentation and differentiation of `--no-ignore-vcs` and `--no-ignore`
The man page says:

```
       -I, --no-ignore
              Do not respect files like .gitignore and .fdignore and include ignored files in the search results.

       --no-ignore-vcs
              Do not respect version control ignore files like .gitignore and include the respective entries in the search results.
```

1. Where is the list of `files like...` that are normally respected?  (The wording makes me wonder if there are other files ending in `ignore` which are usually looked at)
2. Is `-I` a strict superset of `--no-ignore-vcs`?


Discussion / hints:
Thank you very much for your feedback. This topic definitely needs some clarification.

> * Where is the list of `files like...` that are normally respected?  (The wording makes me wonder if there are other files ending in `ignore` which are usually looked at)

There are six sources for ignore patterns:
1. `.gitignore` files
2. `.git/info/exclude` files (these are like user-specific `.gitignore` files that are not shared with the rest of the world)
3. The global `gitignore` configuration (`core.excludesFile` git setting, defaults to `$HOME/.config/git/ignore`)
4. `.ignore` files (things you would like to ignore across tools like `fd`, `ripgrep`, `ag`, etc. that are not part of your `.gitignore`)
5. `.fdignore` files (things you would only like to be ignored by `fd`)
6. Manually added ignore patterns via `--exclude <pattern>` or `--ignore-file <path>` (things you would only like to be ignored in this specific run of `fd`)

The `--no-ignore` option switches off 1-5.
The `--no-ignore-vcs` option switches off 1-3.

> 2\. Is `-I` a strict superset of `--no-ignore-vcs`?

Yes.

---

Sources:
- https://docs.rs/ignore/0.4.4/ignore/struct.WalkBuilder.html#ignore-rules
- https://git-scm.com/docs/gitignore
I am not sure how common of a use case it is, but personally I would like the ability to turn on `1.` and turn off `2.`. (I want to respect my projects .gitignore, but I have my own scratchpad type files I would like to index, but never commit).

Is this possible with the current API? Is there something like an `--include` that I am missing?
I found the `--no-ignore` flag, but it "no ignores" everything, it would be cool to be able to specify certain paths to `--no-ignore` like you can with the `--ignore-path` flag.

BTW: Thanks for the awesome tool!!! 😁

Not a perfect solution. But as a workaround, you could use an ignore file (either .fdignore or with --ignore-path) that explicitly includes your scratchpad files.
@tmccombs oooh this actually works well for my use case. `fd --no-ignore --ignore-file=.gitignore` Thanks for the help! 👍

Fix patch:
diff --git a/doc/fd.1 b/doc/fd.1
index 94feaa1b4..48d3ca1cb 100644
--- a/doc/fd.1
+++ b/doc/fd.1
@@ -32,18 +32,36 @@ Include hidden files and directories in the search results
 .TP
 .B \-I, \-\-no\-ignore
 Show search results from files and directories that would otherwise be ignored by
-.IR .gitignore ,
-.IR .ignore ,
-.IR .fdignore ,
-or the global ignore file.
+.RS
+.IP \[bu] 2
+.I .gitignore
+.IP \[bu]
+.I .git/info/exclude
+.IP \[bu]
+The global gitignore configuration (by default
+.IR $HOME/.config/git/ignore )
+.IP \[bu]
+.I .ignore
+.IP \[bu]
+.I .fdignore
+.IP \[bu]
+The global fd ignore file (usually
+.I $HOME/.config/fd/ignore
+)
+.RE
 .TP
 .B \-u, \-\-unrestricted
 Alias for '--no-ignore'. Can be repeated; '-uu' is an alias for '--no-ignore --hidden'.
 .TP
 .B \-\-no\-ignore\-vcs
-Show search results from files and directories that would otherwise be ignored by
-.I .gitignore
-files.
+Show search results from files and directories that would otherwise be ignored by gitignore files
+including
+.IR  .gitignore ,
+.IR  .git/info/exclude ,
+and the global gitignore configuration
+.RI ( core.excludesFile
+git setting, which defaults to
+.IR $HOME/.config/git/ignore ).
 .TP
 .B \-s, \-\-case\-sensitive
 Perform a case-sensitive search. By default, fd uses case-insensitive searches, unless the


Test patch: