Skip to content

Don't add a calculated name to InfoHash subsets - #1168

Merged
sferik merged 1 commit into
masterfrom
fix-info-hash-subset-name
Oct 17, 2026
Merged

sferik merged 1 commit into
masterfrom
fix-info-hash-subset-name

Conversation

@sferik

@sferik sferik commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

InfoHash#to_hash fills in a calculated name when the info has none. That also happened for subsets from slice, except, select, and reject, so info.slice(:email).to_hash came back with an extra name key. Those subsets now convert as they are; a full info hash still gets the calculated name.

Fixes #892

🤖 Generated with Claude Code

InfoHash#to_hash fills in a calculated name (from first and last name,
nickname, or email) when the info has none. That also happened for
subsets returned by slice, except, select, and reject, so
info.slice(:email).to_hash came back with a name key that wasn't
asked for. Mark those subsets so to_hash leaves them as they are.

Fixes #892
@sferik
sferik merged commit 00ff9a2 into master Oct 17, 2026
32 checks passed
@sferik
sferik deleted the fix-info-hash-subset-name branch October 17, 2026 17:14
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.

InfoHash.slice.to_hash does not return expected keys

1 participant