Skip to content

Hash collision with renames, blank files, etc. #414

Open
@siddhesh

Description

@siddhesh

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/[email protected]/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions