Skip to content

Identifying identical files #2

@Andrew-Hanlon

Description

@Andrew-Hanlon

Thank you for the great work you put into this port - it seems to run very efficiently.

I have been reading over the format, and am just wondering if you can confirm my understanding:

  • If the origin and target are the same then the byte stream will always start with [Size]\n[Size]@0,. Meaning that the full set of bytes is a copy.

Is checking for this condition the best approach to identify files (post diff) that are identical?
Edit: Is there the possibility of flagging this condition to optionally return an empty byte array?

My scenario is where I have an archive of file diffs, and I want to be able to simply write a zero byte file so that I can bypass Applying them altogether later-on and simply perform a straight copy.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions