GNU bug report logs -
#36052
26.2.50; [PATCH] Improve auth-source-pass
Previous Next
Reported by: Damien Cassou <damien <at> cassou.me>
Date: Sun, 2 Jun 2019 09:13:02 UTC
Severity: normal
Tags: patch
Found in version 26.2.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Damien Cassou <damien <at> cassou.me> writes:
>>
>> Double spacing, and this ChangeLog entry is a little sparse. It looks
>> like the last two prose paragraphs could be easily made into ChangeLog
>> entries, since they're already talking about specific functions.
>
>
> I thought about doing that as well but didn't. If you insist, I will do
> the requested changes but here are my reasons for not doing it right
> away:
>
> - The changes are on private methods (with the "--" naming convention)
> and I'm not sure how much of private changes should be in the
> ChangeLog.
AFAIK, we don't keep "private" functions out of the ChangeLog. Same
with even more internal C functions.
> - The commit message you mention modifies functions that are modified
> again by a later patch (named "Refactoring of auth-source-pass"). I
> usually only send the latest version of my code and not the whole
> history but, this time, I'm not the author of the original version and
> I believe the author deserves to have his name in Emacs' git history
> because of the massive work he did for the package.
>
> - I have tried not to rewrite too much of contributor's code and text in
> their own commit so that the authorship makes sense. I have no problem
> changing contributions in a later commit though (as I've shown in the
> patch "Refactoring of auth-source-pass").
Sure that make sense, but I think the commit message only needs some
pretty minor formatting (although it seems that the original patch
message has a typo in the function name mentioned, it should be
auth-source-pass--matching-entries rather than
auth-source-pass--applicable-entries), e.g., just change the last
two paragraphs into:
This commit implements that strategy. It is in spirit a refactor of
the existing code.
* lisp/auth-source-pass.el (auth-source-pass--matching-entries): New
function, generate an ordered list of regular expression matchers for
all possible names that could be in the password-store for the entry to
be found and then makes a pass over the password-store entry names
accumulating the matching entries in a list after the regexp that
matched. This implementation ensures the password-store entry list
still only has to be scanned once.
(auth-source-pass--find-match-unambiguous): Use it to obtain candidate
entries and then parse them one by one until an entry containing the
desired information is located. When complete, return the parsed data of
the entry instead of the entry name so that the information can be used
directly to construct the auth-source response.
and then at least mention the other functions:
(auth-source-pass--build-result): Update accordingly.
(auth-source-pass--select-one-entry)
(auth-source-pass--entry-valid-p)
(auth-source-pass--find-all-by-entry-name)
(auth-source-pass--find-one-by-entry-name): Remove.
(auth-source-pass--select-from-entries)
(auth-source-pass--accumulate-matches)
(auth-source-pass--entry-reducer)
(auth-source-pass--generate-entry-suffixes)
(auth-source-pass--domains)
(auth-source-pass--name-port-user-suffixes): New functions.
This bug report was last modified 5 years and 328 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.