It seems to lead to some issues reading the header.  For example adding:

sha1 = Blob.from_path(os.path.join(r.path, entry[0])).id

yields:

Error
Traceback (most recent call last):
  File "/Users/rfaulk/Projects/dulwich/dulwich/tests/test_porcelain.py", line 532, in test_get_unstaged_changes
    changes = porcelain.get_unstaged_changes(self.repo.path)
  File "/Users/rfaulk/Projects/dulwich/dulwich/porcelain.py", line 542, in get_unstaged_changes
    sha1 = Blob.from_path(os.path.join(r.path, entry[0])).id
  File "/Users/rfaulk/Projects/dulwich/dulwich/objects.py", line 572, in from_path
    blob = ShaFile.from_path(path)
  File "/Users/rfaulk/Projects/dulwich/dulwich/objects.py", line 384, in from_path
    obj = cls.from_file(f)
  File "/Users/rfaulk/Projects/dulwich/dulwich/objects.py", line 397, in from_file
    obj = cls._parse_file_header(f)
  File "/Users/rfaulk/Projects/dulwich/dulwich/objects.py", line 344, in _parse_file_header
    return cls._parse_object_header(magic, f)
  File "/Users/rfaulk/Projects/dulwich/dulwich/objects.py", line 315, in _parse_object_header
    raise ObjectFormatException("Not a known type %d" % num_type)
ObjectFormatException: Not a known type 7

Looking at some samples in test it seems that paths are transformed using hex_to_filename that itself relies on a sha being passed.