From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#36644: Git log search Date: Mon, 15 Jul 2019 18:05:20 +0300 Message-ID: References: <874l3p4lks.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="24829"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 To: Juri Linkov , 36644@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 15 17:06:09 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hn2YL-0006KD-Ef for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Jul 2019 17:06:09 +0200 Original-Received: from localhost ([::1]:39830 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hn2YJ-000881-Rl for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Jul 2019 11:06:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42873) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hn2YG-00082N-Gj for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 11:06:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hn2YF-0000RC-9V for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 11:06:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39907) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hn2YF-0000R2-5f for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 11:06:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hn2YE-0003mL-0R for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 11:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Jul 2019 15:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36644 X-GNU-PR-Package: emacs Original-Received: via spool by 36644-submit@debbugs.gnu.org id=B36644.156320313414480 (code B ref 36644); Mon, 15 Jul 2019 15:06:01 +0000 Original-Received: (at 36644) by debbugs.gnu.org; 15 Jul 2019 15:05:34 +0000 Original-Received: from localhost ([127.0.0.1]:48728 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hn2Xk-0003lS-B2 for submit@debbugs.gnu.org; Mon, 15 Jul 2019 11:05:34 -0400 Original-Received: from mail-wm1-f44.google.com ([209.85.128.44]:40204) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hn2Xh-0003lC-8Y for 36644@debbugs.gnu.org; Mon, 15 Jul 2019 11:05:30 -0400 Original-Received: by mail-wm1-f44.google.com with SMTP id v19so15586822wmj.5 for <36644@debbugs.gnu.org>; Mon, 15 Jul 2019 08:05:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=363X5eRw2migw/pMShX2qOEA1rAtWxrGuUJUMyLiwOM=; b=b8lRyK/av1BgHh8XhvS4xe6NDwAsEqhcFEI/9KMhHN3qH9jgjK7eX/r676SXxEva3o 4X3MsbWrYkwWjtMs3FWnrj8ogGGnMlG38Fa7O1kCzEtMVK+Bw1ybmuH2Uo9d9zr+fT+z PVR3feAaggKFmwvePENo1lMJqomJHoNM7nxeeRGGWLt98NPBzpqpXEL3NwvNOc7k1lJX 4jIBO6JDWcQCVaEKAc0YKCZLuoA9WmQG2cZS3crt32ryw0EwCSc7a4sxSMtvBEKWWkfL uXqXznuoHRSJJNc6m3EGktNPSdTcwFqiQ6fQjsi5VyrHonUvGj4C2dIz8Lj8+iTXNhtP G99w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=363X5eRw2migw/pMShX2qOEA1rAtWxrGuUJUMyLiwOM=; b=acN0F26L2KZMHg97BqRpihWUt6QRnzZoHIM4qoOtZqvgYsAwSaHfLNWG9YbrfVoDlk YErVw5NsPxHPMI99+IZik+qOuBRZsGbKWYztSlX9AccrfHNsT9Al3DWdothhErdS9xIc HOsD0YtLacjP71Nmg/MYT/6Jn6h13O0nfYWHjQ0XiErpui3tyIr+h4ojWbgXpTdiRkSQ idPjX/GIrT618YOGEJWdQVedGe4nFl8Gk0zHcZLKr46yXV+LtlhXz4+rppR9ZVL734Xa xqb7eR8Afu7HBEpd3HjeMuJOREv9KUDMbxmgnKq7kbWzyh/X3lXR0lRpSZlsctkVLckO EViw== X-Gm-Message-State: APjAAAUmD2x2UxrQsntOi0lWrPt1YZ0+4Dt5OhRhR5fdZ8DAXN0uyut8 M5frn5EXhlzKcFLp0EfJDds3cov5 X-Google-Smtp-Source: APXvYqz6QGeS0XKg7YBb/kg420K3SPYGSLJOoiCafyRPNITY2O216RKQ4NaTH4Xi8G43phsdOt3neg== X-Received: by 2002:a1c:6c14:: with SMTP id h20mr20470162wmc.168.1563203122954; Mon, 15 Jul 2019 08:05:22 -0700 (PDT) Original-Received: from [192.168.0.195] ([109.110.245.170]) by smtp.googlemail.com with ESMTPSA id c1sm35082877wrh.1.2019.07.15.08.05.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Jul 2019 08:05:21 -0700 (PDT) In-Reply-To: <874l3p4lks.fsf@mail.linkov.net> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:163124 Archived-At: Hi Juri, On 14.07.2019 1:27, Juri Linkov wrote: > 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. > +;; - log-search (pattern) > +;; > +;; Search for PATTERN in the revision log. Is pattern a regexp or a verbatim string? That should be documented. Git supports regexps, but maybe we should look at what other backends can support as well. 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. > +(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?