NOTE: The behavior is not byte-identical to git or jj! It does not support patch-id/change-id based deduplication.