summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-08-02 22:30:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-08-02 22:30:44 (GMT)
commit87ece7ce1133ebc5d339cad5f6f92c02e5fc712d (patch)
tree80a92c51969d8893f56b74a595ab9c260cca1091 /Documentation
parent562413eb2938b7a1aa85a2ae157ef162d51e55dc (diff)
parent9d8db06eb4a5d5577db559a0059a377914c1ce5a (diff)
downloadgit-87ece7ce1133ebc5d339cad5f6f92c02e5fc712d.zip
git-87ece7ce1133ebc5d339cad5f6f92c02e5fc712d.tar.gz
git-87ece7ce1133ebc5d339cad5f6f92c02e5fc712d.tar.bz2
Merge branch 'tb/grep-only-matching'
"git grep" learned the "--only-matching" option. * tb/grep-only-matching: grep.c: teach 'git grep --only-matching' grep.c: extract show_line_header()
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-grep.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt
index 0de3493..a3049af 100644
--- a/Documentation/git-grep.txt
+++ b/Documentation/git-grep.txt
@@ -17,7 +17,7 @@ SYNOPSIS
[-l | --files-with-matches] [-L | --files-without-match]
[(-O | --open-files-in-pager) [<pager>]]
[-z | --null]
- [-c | --count] [--all-match] [-q | --quiet]
+ [ -o | --only-matching ] [-c | --count] [--all-match] [-q | --quiet]
[--max-depth <depth>]
[--color[=<when>] | --no-color]
[--break] [--heading] [-p | --show-function]
@@ -201,6 +201,11 @@ providing this option will cause it to die.
Output \0 instead of the character that normally follows a
file name.
+-o::
+--only-matching::
+ Print only the matched (non-empty) parts of a matching line, with each such
+ part on a separate output line.
+
-c::
--count::
Instead of showing every matched line, show the number of