GNU bug report logs - #36644
Git log search

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Sat, 13 Jul 2019 22:32:02 UTC

Severity: wishlist

Tags: fixed

Fixed in version 27.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: rpluim <at> gmail.com, 36644 <at> debbugs.gnu.org, juri <at> linkov.net
Subject: bug#36644: Git log search
Date: Wed, 24 Jul 2019 19:13:37 +0300
> Cc: "36644 <at> debbugs.gnu.org" <36644 <at> debbugs.gnu.org>,
>  Juri Linkov <juri <at> linkov.net>, Eli Zaretskii <eliz <at> gnu.org>
> From: Dmitry Gutov <dgutov <at> yandex.ru>
> Date: Wed, 24 Jul 2019 18:53:01 +0300
> 
> > 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."
> 
> IME this doesn't match the way we try to document commands in Emacs, but 
> I wouldn't want to spend much time arguing about this.
> 
> Eli, could you weigh in in this discussion? Would you say Robert's 
> proposal is acceptable?

Yes, I think on balance it's acceptable.

I also see your point: it would be nice to be able to document the
semantics of PATTERN in a backend-independent way.  But I think this
is next to impossible in this case, both because of significant
differences in the backend capabilities (e.g., bzr doesn't have the
equivalent of Git's --fixed-strings, AFAICT), and because some backend
allow great flexibility in interpreting PATTERN, under control of
optional switches passed to the backend.  the only way to make this
backend-independent is to do the search in Emacs Lisp, which I think
will slow down the command too much.

So I think we should treat this as we do in "M-x grep": leave the
semantics of PATTERN backend-dependent, and rely on the user to quote
some characters in it as needed.  Admittedly, 'grep' is lower-level
than 'vc-log-search', but at least we have a precedent.

Note that I still think we should use PATTERN, not STRING in the doc
string, because a literal string here is more an exception than a
rule.  But we should say that the exact semantics of PATTERN is
backend-dependent, and perhaps describe how a couple of the more
popular backends interpret it.




This bug report was last modified 6 years and 25 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.