better key matching with a regexp

Handles keys that are substrings of other keys, as well as pointer files
that contain a newline after the key.

Note that -S does not match regexp, while -G does by default. Docs are
not clear, determined experimentally. The only other difference in
changing to -G is that if a file used to contain the key and changed
in some way, while still containing the key, -G will match and -S would
not. So eg, annex links that git annex fix rewrites will match, and
files that change lock status will match. Which is an improvement anyway.

Sponsored-by: Jochen Bartl on Patreon
This commit is contained in:
Joey Hess 2021-07-14 16:28:07 -04:00
parent 7a46bb1b28
commit 274d2380c7
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 17 additions and 2 deletions

View file

@ -5,3 +5,5 @@ One way this is likely to happen is SHA256 keys with and without extension,
for the same content. Or WORM keys with similar filenames.
--[[Joey]]
> [[fixed|done]] --[[Joey]]