git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 5/5] grep docs: describe new config option to include untracked files

From
DSDragan Simic <dsimic@manjaro.org>
Date
Mar 18, 2024, 17:03 UTC
Message-ID
<9ce006509306136bb2354006e3b14ceaf26d0d32.1710781235.git.dsimic@manjaro.org>
In-Reply-To
<cover.1710781235.git.dsimic@manjaro.org>

Describe the new configuration option grep.includeUntracked, including the dependencies with the already existing options, and the conditions that make this option ignored, which allows other options to be used while the new option is enabled in one's git configuration file.

Signed-off-by: Dragan Simic <dsimic@manjaro.org>
---
 Documentation/config/grep.txt | 6 ++++++
 Documentation/git-grep.txt    | 3 ++-
 2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/Documentation/config/grep.txt b/Documentation/config/grep.txt
index 10041f27b0c8..32f086997596 100644
--- a/Documentation/config/grep.txt
+++ b/Documentation/config/grep.txt
@@ -23,6 +23,12 @@ grep.threads::
 grep.fullName::
 	If set to true, enable `--full-name` option by default.
 
+grep.includeUntracked::
+	If set to true, enable `--untracked` option by default, to search also
+	in untracked files, in addition to searching in the tracked files in the
+	working tree.  If `--cached` or `--no-index` is specified, this option is
+	ignored.  Also, it cannot be enabled together with `submodule.recurse`.
+
 grep.fallbackToNoIndex::
 	If set to true, fall back to `git grep --no-index` if `git grep`
 	is executed outside of a git repository.  Defaults to false.
diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt
index b377523381bb..af5f6572df16 100644
--- a/Documentation/git-grep.txt
+++ b/Documentation/git-grep.txt
@@ -47,7 +47,8 @@ OPTIONS
 
 --untracked::
 	In addition to searching in the tracked files in the working
-	tree, search also in untracked files.
+	tree, search also in untracked files.  See also `grep.includeUntracked`
+	in CONFIGURATION below.
 
 --no-index::
 	Search files in the current directory that is not managed by Git.
Previous: Dragan SimicNext: Junio C Hamano
Message 18 of 22 in “New config option for git-grep to include untracked files”
  1. 0/5 New config option for git-grep to include untracked filesDragan Simic, Mar 18, 2024
  2. 3/5 grep docs: describe --no-index furtherDragan Simic, Mar 18, 2024
  3. Junio C HamanoMar 19, 2024
  4. Dragan SimicMar 19, 2024
  5. 4/5 grep: introduce new config option to include untracked filesDragan Simic, Mar 18, 2024
  6. Junio C HamanoMar 19, 2024
  7. Dragan SimicMar 19, 2024
  8. Junio C HamanoMar 19, 2024
  9. Dragan SimicMar 19, 2024
  10. 2/5 grep docs: describe --recurse-submodules further and improve formatting a bitDragan Simic, Mar 18, 2024
  11. Eric SunshineMar 18, 2024
  12. Dragan SimicMar 18, 2024
  13. 1/5 grep: perform some minor code and comment cleanupsDragan Simic, Mar 18, 2024
  14. Eric SunshineMar 18, 2024
  15. Dragan SimicMar 18, 2024
  16. Junio C HamanoMar 19, 2024
  17. Dragan SimicMar 19, 2024
  18. 5/5 grep docs: describe new config option to include untracked filesDragan Simic, Mar 18, 2024
  19. Junio C HamanoMar 19, 2024
  20. Dragan SimicMar 19, 2024
  21. Junio C HamanoMar 19, 2024
  22. Dragan SimicMar 19, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.