]> git.ipfire.org Git - thirdparty/git.git/commitdiff
doc: fix git grep args order in Quick Reference
authorGuillaume Jacob <guillaume@absolut-sensing.com>
Mon, 16 Mar 2026 14:15:36 +0000 (14:15 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 16 Mar 2026 17:15:34 +0000 (10:15 -0700)
The example provided has its arguments in the wrong order. The revision
should follow the pattern, and not the other way around.

Signed-off-by: Guillaume Jacob <guillaume@absolut-sensing.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/user-manual.adoc

index d2b478ad23221ac23fc397481b2c839102ef503c..c6996a2141c222625e5cc2b87a6ba1b3e17c772a 100644 (file)
@@ -4466,7 +4466,7 @@ $ git show                    # most recent commit
 $ git diff v2.6.15..v2.6.16 # diff between two tagged versions
 $ git diff v2.6.15..HEAD    # diff with current head
 $ git grep "foo()"         # search working directory for "foo()"
-$ git grep v2.6.15 "foo()"  # search old tree for "foo()"
+$ git grep "foo()" v2.6.15  # search old tree for "foo()"
 $ git show v2.6.15:a.txt    # look at old version of a.txt
 -----------------------------------------------