[Top][All Lists]

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

bug#36644: Git log search

From: Juri Linkov
Subject: bug#36644: Git log search
Date: Tue, 16 Jul 2019 01:27:40 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

>> It would be very useful to have the command to grep git logs,
>> for instance, to search commits by bug numbers in format "bug#36789"
>> and many other such use cases:
> I like the idea.

Thanks for the review.  Installed to master after fixing
according to your comments.

>> +;; - log-search (pattern)
>> +;;
>> +;;   Search for PATTERN in the revision log.
> Is pattern a regexp or a verbatim string? That should be documented.

Fixed to use string.

> Git supports regexps, but maybe we should look at what other backends
> can support as well.

It seems the most compatible type is string.

> I wonder if the format of the output should be specified as well.
> E.g. by saying that it's the same as for print-log, long version.

Fixed by saying it's long version.

Should it support short format as well?

>> +(defun vc-git-log-search (buffer pattern)
>> +  (vc-setup-buffer buffer)
>> +  (vc-git-command
>> +   buffer 'async nil
>> +   "log"
>> +   "--no-color" "-i" (format "--grep=%s" pattern)))
> Should this use shell-quote-argument?

Fixed to use shell-quote-argument.

Should it have a key binding?

For example, `vc-log-incoming' is bound to `C-x v I',
`vc-log-outgoing' is bound to key `C-x v O', so logically
`vc-log-search' would be bound to `C-x v s', but unfortunately
it's already taken by `vc-create-tag'.

reply via email to

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