Page MenuHomeSoftware Heritage

Ignore special file when computing content hashes
ClosedPublic

Authored by ardumont on Feb 23 2017, 2:36 PM.

Details

Reviewers
olasd
Group Reviewers
Reviewers
Summary

Ref. T255

Diff Detail

Repository
rDMOD Data model
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 701
Build 941: arc lint + arc unit

Event Timeline

ardumont retitled this revision from Ignore special file when computing hashes for content file to Ignore special file when computing content hashes.Feb 23 2017, 2:36 PM
olasd requested changes to this revision.Feb 23 2017, 3:07 PM
olasd edited edge metadata.

In T255, we agreed that we would make special files be equivalent to empty files, rather than be completely ignored. Under that assumption this needs to be adapted :)

This revision now requires changes to proceed.Feb 23 2017, 3:07 PM

In T255, we agreed that we would make special files be equivalent to empty files, rather than be completely ignored. Under that assumption this needs to be adapted :)

yes, that was my first implementation (possibly still under the undo memory :)

But then reading yet again the task description, 'It should probably consider such files empty and skip them.', i understood to skip them altogether...
My bad.

ardumont edited edge metadata.

Do not ignore special files but consider them empty regular ones

olasd edited edge metadata.

Accepted with one comment about using hashutil.hash_data directly

swh/model/git.py
180

why not use hashutil.hash_data directly ?

This revision is now accepted and ready to land.Feb 23 2017, 3:27 PM
swh/model/git.py
180

To avoid indirection in function calls (hash_file and len inside hash_data).
Adapted to call hash_data.