]> git.phdru.name Git - git-wiki.git/blobdiff - pep-git.txt
Change wording about ``git grep`` and ``less +/$pattern``
[git-wiki.git] / pep-git.txt
index b8171dbe31dd62e9f13597c713573b11e081a7a8..d7eb1996f168abe73d025853bcc07402931dce49 100644 (file)
@@ -268,10 +268,11 @@ or even
 
     $ git pull
 
-Default remote repository for fetching/pulling is origin. Default set
-of references to fetch is calculated using matching algorithm: git
+Default remote repository for fetching/pulling is ``origin``. Default
+set of references to fetch is calculated using matching algorithm: git
 fetches all branches having the same name on both ends.
 
+
 Push
 ''''
 
@@ -310,8 +311,8 @@ or even
 
     $ git push
 
-Default remote repository for pushing is origin. Default set
-of references to push in git before 2.0 is calculated using matching
+Default remote repository for pushing is ``origin``. Default set of
+references to push in git before 2.0 is calculated using matching
 algorithm: git pushes all branches having the same name on both ends.
 Default set of references to push in git 2.0+ is calculated using
 simple algorithm: git pushes the current branch back to its
@@ -341,6 +342,7 @@ That changed in git 2.3, but see `the blog post
 for caveats; in 2.4 the push-to-deploy feature was `further improved
 <https://github.com/blog/1994-git-2-4-atomic-pushes-push-to-deploy-and-more#push-to-deploy-improvements>`_.
 
+
 Tags
 ''''
 
@@ -782,9 +784,12 @@ but you can use your editor::
 
     $ git grep -Ovim # but not -O vim
 
-BTW, there is a difference between running ``git grep -O`` and ``git
-grep -Oless`` - in the latter case ``git grep`` passes ``+/pattern``
-option to ``less``.
+BTW, if git is instructed to use ``less`` as the pager (i.e., if pager
+is not configured in git at all it uses ``less`` by default, or if it
+gets ``less`` from PAGER environment variable, or if it was configured
+with ``git config --global core.pager less``, or ``less`` is used in
+the command ``git grep -Oless``) ``git grep`` passes ``+/$pattern``
+option to ``less`` which is quite convenient.
 
 
 bash/zsh completion