Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The problem with
--hash-unmatched
is twofold.First, the criterion in
rm_shred_group_update_status()
that is responsible for hashing partially-hashed groups to the end is broken. It can never be fulfilled becausegroup->head_files
is always empty at this point, and even if it was not,head->digest
is always NULL because that's whatrm_shred_group_push_file()
does.The only reason why
--hash-unmatched
even works is because the--merge-directories
condition above is broken as well and it always fires for all single-file groups. (Consequently,--hash-unmatched
without--merge-directories
is broken in develop.) However, the same bug also means that all unique files will always get hashed to the end if--merge-directories
is set, thus making--hash-unmatched
behave like--hash-uniques
.This function only works as designed if neither
--hash-unmatched
nor--hash-uniques
is set, because in this case all single-file groups get filtered early by therm_shred_group_qualifies()
check.Fixes #614.