emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master b73264e 163/348: counsel.el (counsel-git-log-cmd): New def


From: Oleh Krehel
Subject: [elpa] master b73264e 163/348: counsel.el (counsel-git-log-cmd): New defvar
Date: Sat, 8 Apr 2017 11:03:48 -0400 (EDT)

branch: master
commit b73264eb678b96f1bb06f0fd2df9154d75549eca
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    counsel.el (counsel-git-log-cmd): New defvar
    
    * counsel.el (counsel-git-log-function): Use `counsel-git-log-cmd'.
    
    Fixes #652
---
 counsel.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/counsel.el b/counsel.el
index 4e574cf..f9ae4bf 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1203,6 +1203,9 @@ done") "\n" t)))
                   :action 'counsel-git-stash-kill-action
                   :caller 'counsel-git-stash)))))
 ;;** `counsel-git-log'
+(defvar counsel-git-log-cmd "GIT_PAGER=cat git log --grep '%s'"
+  "Command used for \"git log\".")
+
 (defun counsel-git-log-function (input)
   (if (< (length input) 3)
       (counsel-more-chars 3)
@@ -1211,10 +1214,8 @@ done") "\n" t)))
     (counsel--async-command
      ;; "git log --grep" likes to have groups quoted e.g. \(foo\).
      ;; But it doesn't like the non-greedy ".*?".
-     (format "GIT_PAGER=cat git log --grep '%s'"
-             (replace-regexp-in-string
-              "\\.\\*\\?" ".*"
-              ivy--old-re)))
+     (format counsel-git-log-cmd
+             (replace-regexp-in-string "\\.\\*\\?" ".*" ivy--old-re)))
     nil))
 
 (defun counsel-git-log-action (x)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]