Correctly avoid parsing ShaFiles with fixed SHAs when calling sha().
authorDave Borowitz <dborowitz@google.com>
Mon, 8 Mar 2010 18:47:05 +0000 (10:47 -0800)
committerDave Borowitz <dborowitz@google.com>
Wed, 14 Apr 2010 23:43:17 +0000 (16:43 -0700)
commit8db9444ba8a58e3c65fc2b5195eba77fb36b0fcf
tree2db7c62c7ed1fac9340ba8f280d168f4d658d203
parent617560f3c636a6527d7ecda8c7a235725dd17eff
Correctly avoid parsing ShaFiles with fixed SHAs when calling sha().

This required some reworking of the _needs_* and _sha ivars. Improved
check() to force computing the SHA and verifying that it matches the
previously-set value. Added a test for this check.

Change-Id: I6782693d7d7708bc7c28f357c27419d51409b884
dulwich/_objects.c
dulwich/objects.py
dulwich/tests/data/blobs/11/11111111111111111111111111111111111111 [new file with mode: 0644]
dulwich/tests/test_objects.py