git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 00/14] SHA-256 CVS and SVN patches

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Jun 22, 2020, 18:04 UTC
Message-ID
<20200622180418.2418483-1-sandals@crustytoothpaste.net>
In-Reply-To
<20200619223947.947067-1-sandals@crustytoothpaste.net>

I recently sent out part 2/3 of the SHA-256 work and then I realized that I hadn't built with the CVS and SVN adapters. So this is part 2.5/3 (or, to be pedantic, 3/4).

The patches are ordered roughly with test-only fixes, then SVN, and then CVS. There are no additional tests here because everything fails with SHA-256 before and passes afterwards.

Changes from v1:
* Adopt Andreas's suggestion to preserve more of the structure of the
  original function.
Range-diff below.
brian m. carlson (14):
  t9109: make test hash independent
  t9168: make test hash independent
  t9108: make test hash independent
  t9100: make test work with SHA-256
  t9104: make hash size independent
  t9101: make hash independent
  t/lib-git-svn: make hash size independent
  perl: create and switch variables for hash constants
  perl: make Git::IndexInfo work with SHA-256
  perl: make SVN code hash independent
  git-svn: set the OID length based on hash algorithm
  git-cvsserver: port to SHA-256
  git-cvsimport: port to SHA-256
  git-cvsexportcommit: port to SHA-256
 git-cvsexportcommit.perl                   | 14 ++--
 git-cvsimport.perl                         |  8 +--
 git-cvsserver.perl                         | 37 +++++-----
 git-svn.perl                               | 25 ++++---
 perl/Git/IndexInfo.pm                      |  6 +-
 perl/Git/SVN.pm                            | 83 +++++++++++-----------
 perl/Git/SVN/Editor.pm                     |  8 +--
 perl/Git/SVN/Fetcher.pm                    |  6 +-
 perl/Git/SVN/Log.pm                        |  2 +-
 perl/Git/SVN/Ra.pm                         |  4 +-
 t/lib-git-svn.sh                           | 17 +++--
 t/t9100-git-svn-basic.sh                   | 19 ++++-
 t/t9101-git-svn-props.sh                   | 12 ++--
 t/t9104-git-svn-follow-parent.sh           |  3 +-
 t/t9108-git-svn-glob.sh                    |  4 +-
 t/t9109-git-svn-multi-glob.sh              |  6 +-
 t/t9168-git-svn-partially-globbed-names.sh |  8 +--
 17 files changed, 151 insertions(+), 111 deletions(-)
Range-diff against v1:
 1:  cc8a204394 =  1:  cc8a204394 t9109: make test hash independent
 2:  814c3423ef =  2:  814c3423ef t9168: make test hash independent
 3:  81b1f48671 =  3:  81b1f48671 t9108: make test hash independent
 4:  8571f65b17 =  4:  8571f65b17 t9100: make test work with SHA-256
 5:  d93ded4e74 =  5:  d93ded4e74 t9104: make hash size independent
 6:  3e401f3e48 =  6:  3e401f3e48 t9101: make hash independent
 7:  02cb87e4be !  7:  17cc278f1d t/lib-git-svn: make hash size independent
    @@ t/lib-git-svn.sh: maybe_start_httpd () {
      
      convert_to_rev_db () {
     -	perl -w -- - "$@" <<\EOF
    --use strict;
    -+	perl -w -e "use strict; my \$oidlen = $(test_oid rawsz);" -e '
    ++	perl -w -- - "$(test_oid rawsz)" "$@" <<\EOF
    + use strict;
    ++my $oidlen = shift;
      @ARGV == 2 or die "usage: convert_to_rev_db <input> <output>";
    --open my $wr, '+>', $ARGV[1] or die "$!: couldn't open: $ARGV[1]";
    --open my $rd, '<', $ARGV[0] or die "$!: couldn't open: $ARGV[0]";
     +my $record_size = $oidlen + 4;
     +my $hexlen = $oidlen * 2;
    -+open my $wr, "+>", $ARGV[1] or die "$!: couldn'\''t open: $ARGV[1]";
    -+open my $rd, "<", $ARGV[0] or die "$!: couldn'\''t open: $ARGV[0]";
    + open my $wr, '+>', $ARGV[1] or die "$!: couldn't open: $ARGV[1]";
    + open my $rd, '<', $ARGV[0] or die "$!: couldn't open: $ARGV[0]";
      my $size = (stat($rd))[7];
     -($size % 24) == 0 or die "Inconsistent size: $size";
     -while (sysread($rd, my $buf, 24) == 24) {
    @@ t/lib-git-svn.sh: maybe_start_httpd () {
      		}
      	}
      	seek $wr, $offset, 0 or die $!;
    - 	print $wr $c,"\n" or die $!;
    - }
    - close $wr or die $!;
    --close $rd or die $!;
    --EOF
    -+close $rd or die $!;' \
    -+	-- "$@"
    - }
    - 
    - require_svnserve () {
 8:  d59b8ac38e =  8:  a59dbf9637 perl: create and switch variables for hash constants
 9:  d3c991fb52 =  9:  c2ff48efa4 perl: make Git::IndexInfo work with SHA-256
10:  7f87880cb2 = 10:  2b5d83ad2f perl: make SVN code hash independent
11:  9100fbd4cf = 11:  66a46baf27 git-svn: set the OID length based on hash algorithm
12:  9655d1f0ea = 12:  b2309179f6 git-cvsserver: port to SHA-256
13:  618abf0af1 = 13:  0d5680f2e6 git-cvsimport: port to SHA-256
14:  290f0ec11f = 14:  fecbc1fbf9 git-cvsexportcommit: port to SHA-256
Previous: brian m. carlsonNext: brian m. carlson
Message 21 of 40 in “SHA-256 CVS and SVN patches”
  1. 00/14 SHA-256 CVS and SVN patchesbrian m. carlson, Jun 19, 2020
  2. 04/14 t9100: make test work with SHA-256brian m. carlson, Jun 19, 2020
  3. 05/14 t9104: make hash size independentbrian m. carlson, Jun 19, 2020
  4. 06/14 t9101: make hash independentbrian m. carlson, Jun 19, 2020
  5. 09/14 perl: make Git::IndexInfo work with SHA-256brian m. carlson, Jun 19, 2020
  6. 07/14 t/lib-git-svn: make hash size independentbrian m. carlson, Jun 19, 2020
  7. Andreas SchwabJun 20, 2020
  8. brian m. carlsonJun 20, 2020
  9. 13/14 git-cvsimport: port to SHA-256brian m. carlson, Jun 19, 2020
  10. 11/14 git-svn: set the OID length based on hash algorithmbrian m. carlson, Jun 19, 2020
  11. 14/14 git-cvsexportcommit: port to SHA-256brian m. carlson, Jun 19, 2020
  12. 12/14 git-cvsserver: port to SHA-256brian m. carlson, Jun 19, 2020
  13. 01/14 t9109: make test hash independentbrian m. carlson, Jun 19, 2020
  14. 03/14 t9108: make test hash independentbrian m. carlson, Jun 19, 2020
  15. 02/14 t9168: make test hash independentbrian m. carlson, Jun 19, 2020
  16. 10/14 perl: make SVN code hash independentbrian m. carlson, Jun 19, 2020
  17. 08/14 perl: create and switch variables for hash constantsbrian m. carlson, Jun 19, 2020
  18. Eric WongJun 20, 2020
  19. Junio C HamanoJun 22, 2020
  20. brian m. carlsonJun 22, 2020
  21. 00/14 SHA-256 CVS and SVN patchesbrian m. carlson, Jun 22, 2020
  22. 01/14 t9109: make test hash independentbrian m. carlson, Jun 22, 2020
  23. 02/14 t9168: make test hash independentbrian m. carlson, Jun 22, 2020
  24. 08/14 perl: create and switch variables for hash constantsbrian m. carlson, Jun 22, 2020
  25. 03/14 t9108: make test hash independentbrian m. carlson, Jun 22, 2020
  26. 04/14 t9100: make test work with SHA-256brian m. carlson, Jun 22, 2020
  27. 09/14 perl: make Git::IndexInfo work with SHA-256brian m. carlson, Jun 22, 2020
  28. 07/14 t/lib-git-svn: make hash size independentbrian m. carlson, Jun 22, 2020
  29. 14/14 git-cvsexportcommit: port to SHA-256brian m. carlson, Jun 22, 2020
  30. Andreas SchwabAug 3, 2020
  31. brian m. carlsonAug 3, 2020
  32. Eric WongAug 4, 2020
  33. brian m. carlsonAug 4, 2020
  34. Andreas SchwabAug 5, 2020
  35. 11/14 git-svn: set the OID length based on hash algorithmbrian m. carlson, Jun 22, 2020
  36. 13/14 git-cvsimport: port to SHA-256brian m. carlson, Jun 22, 2020
  37. 05/14 t9104: make hash size independentbrian m. carlson, Jun 22, 2020
  38. 12/14 git-cvsserver: port to SHA-256brian m. carlson, Jun 22, 2020
  39. 06/14 t9101: make hash independentbrian m. carlson, Jun 22, 2020
  40. 10/14 perl: make SVN code hash independentbrian m. carlson, Jun 22, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.