s3tools/s3cmd — pull request #267 by mdomsch (2014-01-10 15:14:11+00:00)
Title: --no-check-md5 should disable md5sum calculation, including preserved at...

...tributes

Fixes https://github.com/s3tools/s3cmd/issues/217

--no-check-md5 removes 'md5' from the cfg.sync_checks list. It does
not remove it from the cfg.preserve_attrs_list list. Therefore each
file's md5sum is calculated when generating the preserved attribute
header (which also includes username, groupname, size, obtained from
stat(), ...). The default for both sync and put is --preserve.

Therefore, to disable md5 generation completely, one needs to also use
--no-preserve.

Another option would be to have --no-check-md5 also remove 'md5' from
cfg.preserve_attrs_list. I had added 'md5' to the
cfg.preserve_attrs_list list in June 2012 (1.5.0-alpha time period)
when I added hardlink detection, so it's a relatively new change that
is causing md5sums to be calculated by default. This patch implements
this, --no-check-md5 now removes 'md5' from cfg.preserve_attrs_list.