sapling/tests/test-lfs-pointer.py.out
Jun Wu a024f96812 lfs: add validation to pointer
Summary:
Read the Git-LFS specification [1] and implement most checks to prevent
programming error and detect data corruption.

The new code should be stronger than what was before the refactoring, since the
old code only checks keys but not values.

[1]: https://github.com/git-lfs/git-lfs/blob/master/docs/spec.md

Test Plan: Added a new test

Reviewers: #mercurial, davidsp, rmcelroy

Reviewed By: rmcelroy

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D5046740

Signature: t1:5046740:1494543072:2f0dbfc07cd52a10572550a277d850bdf3f78d27
2017-05-11 17:51:44 -07:00

13 lines
751 B
Plaintext

missed keys: oid, size
ok
unexpected value: version='https://unknown.github.com/spec/v1'
cannot parse git-lfs text: 'version https://git-lfs.github.com/spec/v1\n\noid sha256:4d7a214614ab2935c943f9e0ff69d22eadbb8f32b1258daaa5e2ca24d17e2393\nsize 12345\nx-foo extra-information\n'
unexpected value: oid='ahs256:4d7a214614ab2935c943f9e0ff69d22eadbb8f32b1258daaa5e2ca24d17e2393'
unexpected value: oid='4d7a214614ab2935c943f9e0ff69d22eadbb8f32b1258daaa5e2ca24d17e2393'
unexpected value: size='0x12345'
ok
cannot parse git-lfs text: 'version https://git-lfs.github.com/spec/v1\noid sha256:4d7a214614ab2935c943f9e0ff69d22eadbb8f32b1258daaa5e2ca24d17e2393\nsize 12345\nx-foo extra\ninformation\n'
unexpected key: x_foo
missed keys: oid
missed keys: oid, size