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>
Fri, 16 Apr 2010 18:56:53 +0000 (11:56 -0700)
commit7499699bc773dd61d03ac83e581f857e1304e64c
tree058db1bc48771128f5bc51b87ab87ec29332ea3f
parent523de798fd32bf5cd2f93cc106a7abb61ccac991
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