Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identifying identical files #2

Open
Andrew-Hanlon opened this issue Dec 9, 2016 · 1 comment
Open

Identifying identical files #2

Andrew-Hanlon opened this issue Dec 9, 2016 · 1 comment

Comments

@Andrew-Hanlon
Copy link

Andrew-Hanlon commented Dec 9, 2016

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.

@endel
Copy link
Owner

endel commented Dec 17, 2016

Hi @Andrew-Hanlon,

Thanks for checking out this project. I'm all in for this feature.
At the moment I won't have time for this, unfortunately. :(

A pull-request is very appreciated! Cheers!

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

No branches or pull requests

2 participants