Fossil

Check-in [c8870643]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Automatically convert from "auto" to "sha3" if a SHA3-named artifact is received.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | fossil-2.1
Files: files | file ages | folders
SHA1: c8870643b7bd1934cf47a5826820da97639b5107
User & Date: drh 2017-03-05 00:38:48
Context
2017-03-05
01:57
Add a first draft of the "Hash Policy" document. check-in: 6429054f user: drh tags: fossil-2.1
00:38
Automatically convert from "auto" to "sha3" if a SHA3-named artifact is received. check-in: c8870643 user: drh tags: fossil-2.1
00:29
Move the display of hash-policy to the Schema Version line of the /stat page, and only show the hash-policy name if it is something other than "auto". check-in: def29c31 user: drh tags: fossil-2.1
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/content.c.

526
527
528
529
530
531
532




533
534
535
536
537
538
539
      /* No existing artifact with the auxiliary hash name.  Therefore, use
      ** the primary hash name. */
      blob_reset(&hash);
      hname_hash(pBlob, 0, &hash);
    }
  }else{
    blob_init(&hash, zUuid, -1);




  }
  if( nBlob ){
    size = nBlob;
  }else{
    size = blob_size(pBlob);
    if( srcId ){
      size = delta_output_size(blob_buffer(pBlob), size);







>
>
>
>







526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
      /* No existing artifact with the auxiliary hash name.  Therefore, use
      ** the primary hash name. */
      blob_reset(&hash);
      hname_hash(pBlob, 0, &hash);
    }
  }else{
    blob_init(&hash, zUuid, -1);
  }
  if( g.eHashPolicy==HPOLICY_AUTO && blob_size(&hash)>HNAME_LEN_SHA1 ){
    g.eHashPolicy = HPOLICY_SHA3;
    db_set_int("hash-policy", HPOLICY_SHA3, 0);
  }
  if( nBlob ){
    size = nBlob;
  }else{
    size = blob_size(pBlob);
    if( srcId ){
      size = delta_output_size(blob_buffer(pBlob), size);