aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2019-07-25 02:21:28 +0300
committerJuri Linkov2019-07-25 02:21:28 +0300
commit8a5a1bebfa95bf50ef390e4b101f1cfe8046d565 (patch)
tree7785bff52ecada55f91ad9952f39e4a3586f2e8f
parenta5063aa8b174db286a0e83b8ffdd4e65c521f733 (diff)
downloademacs-8a5a1bebfa95bf50ef390e4b101f1cfe8046d565.tar.gz
emacs-8a5a1bebfa95bf50ef390e4b101f1cfe8046d565.zip
* lisp/vc/vc.el (vc-log-search): Fix docstring (bug#36644).
* lisp/vc/vc-git.el (vc-git-log-search): Add docstring.
-rw-r--r--etc/NEWS4
-rw-r--r--lisp/vc/vc-git.el10
-rw-r--r--lisp/vc/vc.el9
3 files changed, 19 insertions, 4 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 08f0e654f7f..c1cc216659e 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -703,8 +703,8 @@ buffers will delete the marked files (or if no files are marked, the
703file under point). This command does not notify the VC backend, and 703file under point). This command does not notify the VC backend, and
704is mostly useful for unregistered files. 704is mostly useful for unregistered files.
705 705
706*** New command 'vc-log-search' asks for a pattern string, searches 706*** New command 'vc-log-search' asks for a pattern, searches it
707it in the revision log, and displays matched log entries in the 707in the revision log, and displays matched log entries in the
708log buffer. For example, 'M-x vc-log-search RET bug#36644 RET' 708log buffer. For example, 'M-x vc-log-search RET bug#36644 RET'
709displays all entries whose log messages match the bug number. 709displays all entries whose log messages match the bug number.
710With a prefix argument asks for a command, so for example, 710With a prefix argument asks for a command, so for example,
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index d4833d86ac4..9715aea1fdc 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -74,6 +74,9 @@
74;; - steal-lock (file &optional revision) NOT NEEDED 74;; - steal-lock (file &optional revision) NOT NEEDED
75;; HISTORY FUNCTIONS 75;; HISTORY FUNCTIONS
76;; * print-log (files buffer &optional shortlog start-revision limit) OK 76;; * print-log (files buffer &optional shortlog start-revision limit) OK
77;; * log-outgoing (buffer remote-location) OK
78;; * log-incoming (buffer remote-location) OK
79;; - log-search (buffer pattern) OK
77;; - log-view-mode () OK 80;; - log-view-mode () OK
78;; - show-log-entry (revision) OK 81;; - show-log-entry (revision) OK
79;; - comment-history (file) ?? 82;; - comment-history (file) ??
@@ -1074,6 +1077,13 @@ If LIMIT is a revision string, use it as an end-revision."
1074 remote-location)))) 1077 remote-location))))
1075 1078
1076(defun vc-git-log-search (buffer pattern) 1079(defun vc-git-log-search (buffer pattern)
1080 "Search the log of changes for PATTERN and output results into BUFFER.
1081
1082PATTERN is a basic regular expression by default in Git.
1083
1084Display all entries that match log messages in long format.
1085With a prefix argument, ask for a command to run that will output
1086log entries."
1077 (let ((args `("log" "--no-color" "-i" 1087 (let ((args `("log" "--no-color" "-i"
1078 ,(format "--grep=%s" (or pattern ""))))) 1088 ,(format "--grep=%s" (or pattern "")))))
1079 (when current-prefix-arg 1089 (when current-prefix-arg
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index a68beb5e505..4cac1539289 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -339,7 +339,7 @@
339;; 339;;
340;; - log-search (pattern) 340;; - log-search (pattern)
341;; 341;;
342;; Search for string PATTERN in the revision log. 342;; Search for PATTERN in the revision log.
343;; 343;;
344;; - log-view-mode () 344;; - log-view-mode ()
345;; 345;;
@@ -2532,7 +2532,12 @@ When called interactively with a prefix argument, prompt for REMOTE-LOCATION."
2532 2532
2533;;;###autoload 2533;;;###autoload
2534(defun vc-log-search (pattern) 2534(defun vc-log-search (pattern)
2535 "Search a log of changes for PATTERN string. 2535 "Search the log of changes for PATTERN.
2536
2537PATTERN is usually interpreted as a regular expression. However, its
2538exact semantics is up to the backend's log search command; some can
2539only match fixed strings.
2540
2536Display all entries that match log messages in long format. 2541Display all entries that match log messages in long format.
2537With a prefix argument, ask for a command to run that will output 2542With a prefix argument, ask for a command to run that will output
2538log entries." 2543log entries."