Hash collision with renames, blank files, etc.
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 52/100
Research direction
Start in hasher.py and compare the hash inputs for the two linked patch examples. Trace how renames and blank-file creations or deletions are represented, then verify that filenames and their operations affect the result. Done means these distinct diffs no longer produce identical hashes.
Written by the indexing model from the issue text.
Description
The hash computation algorithm does not take into account file renames or new file creations, because of which if a diff has only renames or a blank file either being created or deleted, they all end up having the same hash. At the minimum, the filenames (and the operation on it) being hashed should be added to the hasher to eliminate these conflicts.
For example, these two patches end up with the same has with hasher.py:
https://patchwork.sourceware.org/project/glibc/patch/7c1fb956621e5644de7342022e4ae599b79b5626.1613577607.git.fweimer@redhat.com/
https://patchwork.sourceware.org/project/glibc/patch/20140621021718.2A4AA2C39AB@topped-with-meat.com/
- Dominant language
- Python
- Stars
- 317
- Forks
- 91
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from getpatchwork/patchwork
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
getpatchwork/patchwork#668 ·
-
bug web-ui
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
getpatchwork/patchwork#546 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
getpatchwork/patchwork#664 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
getpatchwork/patchwork#663 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
getpatchwork/patchwork#645 ·
All issues in getpatchwork/patchwork
Similar issues
-
Add: hunch Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AbdelStark/awesome-typesafe#104 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
DiamondLightSource/dodal#2211 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
openml/openml-python#1749 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
sipyourdrink-ltd/bernstein#6191 ·