Skip to content
/ prs Public

Conversation

@shemeshg
Copy link
Contributor

@shemeshg shemeshg commented Jun 4, 2023

it makes the function names very confusing because now

fn fingerprints_equal means contain
fn fingerprints_contain means search store with...

solves #22

Anyway, doing the search ourselves not using the gpg search c++ api is probably right

pub fn fingerprints_equal<S: AsRef<str>, T: AsRef<str>>(a: S, b: T) -> bool {
!a.as_ref().trim().is_empty()
&& a.as_ref().trim().to_uppercase() == b.as_ref().trim().to_uppercase()
&& a.as_ref().trim().to_uppercase().contains(&b.as_ref().trim().to_uppercase())
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think, would starts_with work as well?

Because then I expect A0B1C2 # comment to still match A0B1C2.

I'd prefer it to be as strict as possible when we can.

Sorry for my late reply on this.

Copy link
Contributor Author

@shemeshg shemeshg Nov 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't startwith fail the new gnupg format that start with 0x<ID>.....(also default in gopass?

@timvisee
Copy link
Owner

timvisee commented Jan 7, 2026

I've merged this through https://gitlab.com/timvisee/prs/-/merge_requests/50 (commit).

This is now released as part of prs 0.5.6.

Thanks!

@timvisee timvisee closed this Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants