[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 10f9954 50/57: counsel.el (counsel-git-grep): Warn if not
From: |
Oleh Krehel |
Subject: |
[elpa] master 10f9954 50/57: counsel.el (counsel-git-grep): Warn if not in a repository |
Date: |
Tue, 19 May 2015 14:21:40 +0000 |
branch: master
commit 10f995468b6d97ea4034109a15e623aebfcf412b
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
counsel.el (counsel-git-grep): Warn if not in a repository
---
counsel.el | 20 +++++++++++---------
1 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/counsel.el b/counsel.el
index 23c9f0a..ea5496e 100644
--- a/counsel.el
+++ b/counsel.el
@@ -237,15 +237,17 @@
(interactive)
(setq counsel--git-grep-dir
(locate-dominating-file default-directory ".git"))
- (setq counsel--git-grep-count (counsel-git-grep-count ""))
- (ivy-read "pattern: " 'counsel-git-grep-function
- :initial-input initial-input
- :matcher #'counsel-git-grep-matcher
- :dynamic-collection (when (> counsel--git-grep-count 20000)
- 'counsel-git-grep-function)
- :keymap counsel-git-grep-map
- :action #'counsel-git-grep-action
- :unwind #'swiper--cleanup))
+ (if (null counsel--git-grep-dir)
+ (error "Not in a git repository")
+ (setq counsel--git-grep-count (counsel-git-grep-count ""))
+ (ivy-read "pattern: " 'counsel-git-grep-function
+ :initial-input initial-input
+ :matcher #'counsel-git-grep-matcher
+ :dynamic-collection (when (> counsel--git-grep-count 20000)
+ 'counsel-git-grep-function)
+ :keymap counsel-git-grep-map
+ :action #'counsel-git-grep-action
+ :unwind #'swiper--cleanup)))
(defun counsel-git-grep-matcher (x)
(when (string-match "^[^:]+:[^:]+:" x)
- [elpa] master 16eb4a2 31/57: When completing file names, defer to `minibuffer-complete' for "TAB", (continued)
- [elpa] master 16eb4a2 31/57: When completing file names, defer to `minibuffer-complete' for "TAB", Oleh Krehel, 2015/05/19
- [elpa] master b63c358 35/57: Properly update virtual buffers for "^ " interaction, Oleh Krehel, 2015/05/19
- [elpa] master d8f79fa 43/57: ivy.el (ivy-partial-or-done): Update doc, Oleh Krehel, 2015/05/19
- [elpa] master ce0efb3 29/57: Allow to customize the minibuffer formatter, Oleh Krehel, 2015/05/19
- [elpa] master 9a2083a 27/57: Swiper should use the :re-builder argument, Oleh Krehel, 2015/05/19
- [elpa] master d8c2ef3 45/57: ivy.el (ivy-partial-or-done): More predictability, Oleh Krehel, 2015/05/19
- [elpa] master e05e3b7 39/57: ivy.el (ivy-read): Keep the last ivy--index for :dynamic-collection, Oleh Krehel, 2015/05/19
- [elpa] master 1cdb6ed 32/57: ivy.el (ivy-partial-or-done): Fixup, Oleh Krehel, 2015/05/19
- [elpa] master 5f2cf0c 28/57: Update test, Oleh Krehel, 2015/05/19
- [elpa] master 6405cb3 42/57: ivy.el (ivy-partial-or-done): Always forward to `ivy-alt-done', Oleh Krehel, 2015/05/19
- [elpa] master 10f9954 50/57: counsel.el (counsel-git-grep): Warn if not in a repository,
Oleh Krehel <=
- [elpa] master 2cedcf5 37/57: Introduce :matcher for counsel-git-grep, Oleh Krehel, 2015/05/19
- [elpa] master 93faef3 41/57: ivy.el (ivy-delete-char): Add and bind to "C-d", Oleh Krehel, 2015/05/19
- [elpa] master 8630048 47/57: Fixed ivy--preselect-index on windows where the drives folders ends with a backslash (C:\, D:\), Oleh Krehel, 2015/05/19
- [elpa] master 1c0703e 36/57: Forward to minibuffer-complete for filenames only if "^/", Oleh Krehel, 2015/05/19
- [elpa] master 70c8c8a 40/57: ivy.el (ivy-switch-buffer): Preselect other-buffer, Oleh Krehel, 2015/05/19
- [elpa] master 9da8e53 54/57: counsel.el (counsel-info-lookup-symbol): Turn on sorting, Oleh Krehel, 2015/05/19
- [elpa] master e0b6c0c 46/57: Update the way spaces are quoted using ivy, Oleh Krehel, 2015/05/19
- [elpa] master 323efda 38/57: counsel-git-grep now works with ivy-resume, Oleh Krehel, 2015/05/19
- [elpa] master 88f4508 49/57: ivy.el (ivy-kill-word): Add and bind to "M-d", Oleh Krehel, 2015/05/19
- [elpa] master de5833e 51/57: Don't error on incomplete bad regexp in counsel-git-grep, Oleh Krehel, 2015/05/19