Subject: Re: bug#36644: Git log search

From: Robert Pluim <[email-masked]>
Date: Wed, 24 Jul 2019 18:13:53 +0200

>>>>> On Wed, 24 Jul 2019 18:53:01 +0300, Dmitry Gutov <[email-masked]> said:
    >> Itʼs not a pattern. Itʼs a string that is passed as-is to the backend,
    >> which is free to interpret it as it wishes. From my viewpoint, we can
    >> just say
    >> 
    >> "Search for STRING, which is passed unsullied to the backend's log
    >> search command.  Consult the documentation for your backend to
    >> understand the matching method it uses to search for STRING."

    Dmitry> IME this doesn't match the way we try to document commands in Emacs,
    Dmitry> but I wouldn't want to spend much time arguing about this.

    Dmitry> Eli, could you weigh in in this discussion? Would you say Robert's
    Dmitry> proposal is acceptable?

Going back to Juri's original proposal:

+;;;###autoload
+(defun vc-log-search (pattern)
+  "Search a log of changes for PATTERN."
+  (interactive (list (read-regexp "Log search pattern: ")))
+  (let ((backend (vc-deduce-backend)))
+    (unless backend
+      (error "Buffer is not version controlled"))
+    (vc-incoming-outgoing-internal backend pattern
+                                   "*vc-search*" 'log-search)))
+

How about:

"Search a log of changes for PATTERN.

How PATTERN is interpreted will depend on how each individual
backend's log search command is implemented, as some can only match
fixed strings, some have regular expression support, etc."

Robert