{"thread":{"id":"52756","subject":"[PATCH v3 01/21] t/lib-pack: support SHA-256","startedAt":"2020-02-07T00:53:35Z","lastAt":"2020-02-07T00:53:59Z","messageCount":22,"participants":["brian m. carlson"],"isPatch":true,"patchVersion":3,"patchTotal":21},"messages":[{"id":"391290","messageId":"20200207005254.1495851-2-sandals@crustytoothpaste.net","threadId":"52756","inReplyTo":"20200207005254.1495851-1-sandals@crustytoothpaste.net","subject":"[PATCH v3 01/21] t/lib-pack: support SHA-256","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2020-02-07T00:52:34Z","receivedAt":"2020-02-07T00:53:35Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"Update the support routines for generating packs to support both SHA-1\nand SHA-256.  Compute the trailing pack checksum and its length\ncorrectly depending on the algorithm, and look up the object names based\non the algorithm as well.  Ensure we initialize the algorithm facts so\nthat our callers need not do so.\n\nSigned-off-by: brian m. carlson <sandals@crustytoothpaste.net>\n---\n t/lib-pack.sh | 35 ++++++++++++++++++++++++++++++-----\n 1 file changed, 30 insertions(+), 5 deletions(-)\n\ndiff --git a/t/lib-pack.sh b/t/lib-pack.sh\nindex c4d907a450..f3463170b3 100644\n--- a/t/lib-pack.sh\n+++ b/t/lib-pack.sh\n@@ -35,9 +35,11 @@ pack_header () {\n # have hardcoded some well-known objects. See the case statements below for the\n # complete list.\n pack_obj () {\n+\ttest_oid_init\n+\n \tcase \"$1\" in\n \t# empty blob\n-\te69de29bb2d1d6434b8b29ae775ad8c2e48c5391)\n+\t$EMPTY_BLOB)\n \t\tcase \"$2\" in\n \t\t'')\n \t\t\tprintf '\\060\\170\\234\\003\\0\\0\\0\\0\\1'\n@@ -47,7 +49,7 @@ pack_obj () {\n \t\t;;\n \n \t# blob containing \"\\7\\76\"\n-\te68fe8129b546b101aee9510c5328e7f21ca1d18)\n+\t$(test_oid packlib_7_76))\n \t\tcase \"$2\" in\n \t\t'')\n \t\t\tprintf '\\062\\170\\234\\143\\267\\3\\0\\0\\116\\0\\106'\n@@ -59,11 +61,18 @@ pack_obj () {\n \t\t\tprintf '\\234\\143\\142\\142\\142\\267\\003\\0\\0\\151\\0\\114'\n \t\t\treturn\n \t\t\t;;\n+\t\t37c8e2c15bb22b912e59b43fd51a4f7e9465ed0b5084c5a1411d991cbe630683)\n+\t\t\tprintf '\\165\\67\\310\\342\\301\\133\\262\\53\\221\\56\\131' &&\n+\t\t\tprintf '\\264\\77\\325\\32\\117\\176\\224\\145\\355\\13\\120' &&\n+\t\t\tprintf '\\204\\305\\241\\101\\35\\231\\34\\276\\143\\6\\203\\170' &&\n+\t\t\tprintf '\\234\\143\\142\\142\\142\\267\\003\\0\\0\\151\\0\\114'\n+\t\t\treturn\n+\t\t\t;;\n \t\tesac\n \t\t;;\n \n \t# blob containing \"\\7\\0\"\n-\t01d7713666f4de822776c7622c10f1b07de280dc)\n+\t$(test_oid packlib_7_0))\n \t\tcase \"$2\" in\n \t\t'')\n \t\t\tprintf '\\062\\170\\234\\143\\147\\0\\0\\0\\20\\0\\10'\n@@ -75,6 +84,13 @@ pack_obj () {\n \t\t\tprintf '\\143\\142\\142\\142\\147\\0\\0\\0\\53\\0\\16'\n \t\t\treturn\n \t\t\t;;\n+\t\t5d8e6fc40f2dab00e6983a48523fe57e621f46434cb58dbd4422fba03380d886)\n+\t\t\tprintf '\\165\\135\\216\\157\\304\\17\\55\\253\\0\\346\\230\\72' &&\n+\t\t\tprintf '\\110\\122\\77\\345\\176\\142\\37\\106\\103\\114\\265' &&\n+\t\t\tprintf '\\215\\275\\104\\42\\373\\240\\63\\200\\330\\206\\170\\234' &&\n+\t\t\tprintf '\\143\\142\\142\\142\\147\\0\\0\\0\\53\\0\\16'\n+\t\t\treturn\n+\t\t\t;;\n \t\tesac\n \t\t;;\n \tesac\n@@ -86,7 +102,7 @@ pack_obj () {\n \tthen\n \t\techo \"$1\" | git pack-objects --stdout >pack_obj.tmp &&\n \t\tsize=$(wc -c <pack_obj.tmp) &&\n-\t\tdd if=pack_obj.tmp bs=1 count=$((size - 20 - 12)) skip=12 &&\n+\t\tdd if=pack_obj.tmp bs=1 count=$((size - $(test_oid rawsz) - 12)) skip=12 &&\n \t\trm -f pack_obj.tmp\n \t\treturn\n \tfi\n@@ -97,7 +113,8 @@ pack_obj () {\n \n # Compute and append pack trailer to \"$1\"\n pack_trailer () {\n-\ttest-tool sha1 -b <\"$1\" >trailer.tmp &&\n+\ttest_oid_init &&\n+\ttest-tool $(test_oid algo) -b <\"$1\" >trailer.tmp &&\n \tcat trailer.tmp >>\"$1\" &&\n \trm -f trailer.tmp\n }\n@@ -108,3 +125,11 @@ pack_trailer () {\n clear_packs () {\n \trm -f .git/objects/pack/*\n }\n+\n+test_oid_cache <<-EOF\n+packlib_7_0 sha1:01d7713666f4de822776c7622c10f1b07de280dc\n+packlib_7_0 sha256:37c8e2c15bb22b912e59b43fd51a4f7e9465ed0b5084c5a1411d991cbe630683\n+\n+packlib_7_76 sha1:e68fe8129b546b101aee9510c5328e7f21ca1d18\n+packlib_7_76 sha256:5d8e6fc40f2dab00e6983a48523fe57e621f46434cb58dbd4422fba03380d886\n+EOF\n"},{"id":"391291","messageId":"20200207005254.1495851-1-sandals@crustytoothpaste.net","threadId":"52756","inReplyTo":null,"subject":"[PATCH v3 00/21] SHA-256 test fixes, part 8","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2020-02-07T00:52:33Z","receivedAt":"2020-02-07T00:53:35Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"This series is the penultimate series of SHA-256 test fixes.\n\nv3 is a bit larger due to the increase in t4211 test cases, but\notherwise has shrunk in terms of patches from v2.\n\nChanges from v2:\n* Drop t3305 in favor of Johan Herland's patch series.\n* Add underscores to variables in t4013.\n* Add SHA-256 test cases to t4211 and restructure test accordingly.\n* Adopt proposed fixes to t5302.\n* Replace \"sorted-sha1\" with \"sorted-hash\" in t5313.\n* Use a sed script in t5515 to make operations more efficient.\n* Consolidated both patches for t5703 into one.\n\nChanges from v1:\n* Drop patch for t3404 in favor of Dscho's fix.\n* Drop patch for t5616 in favor of Jonathan Tan's fix.\n* Add missing sign-off.\n* Move test_oid_init into the correct patch.\n\nbrian m. carlson (21):\n  t/lib-pack: support SHA-256\n  t3206: make hash size independent\n  t3308: make test work with SHA-256\n  t3309: make test work with SHA-256\n  t3310: make test work with SHA-256\n  t3311: make test work with SHA-256\n  t4013: make test hash independent\n  t4211: move SHA-1-specific test cases into a directory\n  t4211: add test cases for SHA-256\n  t4060: make test work with SHA-256\n  t5302: make hash size independent\n  t5309: make test hash independent\n  t5313: make test hash independent\n  t5321: make test hash independent\n  t5515: make test hash independent\n  t5318: update for SHA-256\n  t5607: make hash size independent\n  t5703: make test work with SHA-256\n  t6000: abstract away SHA-1-specific constants\n  t6006: make hash size independent\n  t6024: update for SHA-256\n\n t/lib-pack.sh                                 |  35 ++-\n t/t3206-range-diff.sh                         |  14 +-\n t/t3308-notes-merge.sh                        |  83 ++++---\n t/t3309-notes-merge-auto-resolve.sh           | 228 +++++++++++-------\n t/t3310-notes-merge-manual-resolve.sh         |  84 +++++--\n t/t3311-notes-merge-fanout.sh                 |  60 +++--\n t/t4013-diff-various.sh                       |  44 +++-\n t/t4060-diff-submodule-option-diff-format.sh  | 126 +++++-----\n t/t4211-line-log.sh                           |   3 +-\n t/t4211/{ => sha1}/expect.beginning-of-file   |   0\n t/t4211/{ => sha1}/expect.end-of-file         |   0\n t/t4211/{ => sha1}/expect.move-support-f      |   0\n t/t4211/{ => sha1}/expect.multiple            |   0\n .../{ => sha1}/expect.multiple-overlapping    |   0\n t/t4211/{ => sha1}/expect.multiple-superset   |   0\n .../expect.parallel-change-f-to-main          |   0\n t/t4211/{ => sha1}/expect.simple-f            |   0\n t/t4211/{ => sha1}/expect.simple-f-to-main    |   0\n t/t4211/{ => sha1}/expect.simple-main         |   0\n t/t4211/{ => sha1}/expect.simple-main-to-end  |   0\n t/t4211/{ => sha1}/expect.two-ranges          |   0\n t/t4211/{ => sha1}/expect.vanishes-early      |   0\n t/t4211/{ => sha256}/expect.beginning-of-file |   6 +-\n t/t4211/{ => sha256}/expect.end-of-file       |   8 +-\n t/t4211/{ => sha256}/expect.move-support-f    |   8 +-\n t/t4211/{ => sha256}/expect.multiple          |  10 +-\n .../{ => sha256}/expect.multiple-overlapping  |  12 +-\n t/t4211/{ => sha256}/expect.multiple-superset |  12 +-\n .../expect.parallel-change-f-to-main          |  16 +-\n t/t4211/{ => sha256}/expect.simple-f          |   6 +-\n t/t4211/{ => sha256}/expect.simple-f-to-main  |   8 +-\n t/t4211/{ => sha256}/expect.simple-main       |   8 +-\n .../{ => sha256}/expect.simple-main-to-end    |   8 +-\n t/t4211/{ => sha256}/expect.two-ranges        |  10 +-\n t/t4211/{ => sha256}/expect.vanishes-early    |   6 +-\n t/t5302-pack-index.sh                         |  21 +-\n t/t5309-pack-delta-cycles.sh                  |  10 +-\n t/t5313-pack-bounds-checks.sh                 |  19 +-\n t/t5318-commit-graph.sh                       |   4 +-\n t/t5321-pack-large-objects.sh                 |   4 +-\n t/t5515-fetch-merge-logic.sh                  |  59 ++++-\n t/t5607-clone-bundle.sh                       |   2 +-\n t/t5703-upload-pack-ref-in-want.sh            |   7 +-\n t/t6000-rev-list-misc.sh                      |  13 +-\n t/t6006-rev-list-format.sh                    |   4 +-\n t/t6024-recursive-merge.sh                    |  15 +-\n 46 files changed, 615 insertions(+), 338 deletions(-)\n copy t/t4211/{ => sha1}/expect.beginning-of-file (100%)\n copy t/t4211/{ => sha1}/expect.end-of-file (100%)\n copy t/t4211/{ => sha1}/expect.move-support-f (100%)\n copy t/t4211/{ => sha1}/expect.multiple (100%)\n copy t/t4211/{ => sha1}/expect.multiple-overlapping (100%)\n copy t/t4211/{ => sha1}/expect.multiple-superset (100%)\n copy t/t4211/{ => sha1}/expect.parallel-change-f-to-main (100%)\n copy t/t4211/{ => sha1}/expect.simple-f (100%)\n copy t/t4211/{ => sha1}/expect.simple-f-to-main (100%)\n copy t/t4211/{ => sha1}/expect.simple-main (100%)\n copy t/t4211/{ => sha1}/expect.simple-main-to-end (100%)\n copy t/t4211/{ => sha1}/expect.two-ranges (100%)\n copy t/t4211/{ => sha1}/expect.vanishes-early (100%)\n rename t/t4211/{ => sha256}/expect.beginning-of-file (75%)\n rename t/t4211/{ => sha256}/expect.end-of-file (77%)\n rename t/t4211/{ => sha256}/expect.move-support-f (77%)\n rename t/t4211/{ => sha256}/expect.multiple (79%)\n rename t/t4211/{ => sha256}/expect.multiple-overlapping (83%)\n rename t/t4211/{ => sha256}/expect.multiple-superset (83%)\n rename t/t4211/{ => sha256}/expect.parallel-change-f-to-main (78%)\n rename t/t4211/{ => sha256}/expect.simple-f (77%)\n rename t/t4211/{ => sha256}/expect.simple-f-to-main (79%)\n rename t/t4211/{ => sha256}/expect.simple-main (77%)\n rename t/t4211/{ => sha256}/expect.simple-main-to-end (78%)\n rename t/t4211/{ => sha256}/expect.two-ranges (79%)\n rename t/t4211/{ => sha256}/expect.vanishes-early (74%)\n\nRange-diff against v2:\n 1:  3cf0a234b5 =  1:  0c219d6dc3 t/lib-pack: support SHA-256\n 2:  174fb9325d =  2:  427d42c03f t3206: make hash size independent\n 3:  ce9f103b2c <  -:  ---------- t3305: annotate with SHA1 prerequisite\n 4:  294cdb98a3 =  3:  387b1ef0a1 t3308: make test work with SHA-256\n 5:  8c3c7975aa =  4:  3ff1f44a6f t3309: make test work with SHA-256\n 6:  09cc75b2e0 =  5:  42cca3b5d2 t3310: make test work with SHA-256\n 7:  368f4f07f8 =  6:  38ecd05cb3 t3311: make test work with SHA-256\n 8:  1626574e2e !  7:  9c0d2209cc t4013: make test hash independent\n    @@ t/t4013-diff-various.sh: test_expect_success setup '\n      EOF\n      \n     +process_diffs () {\n    -+\tx04=\"[0-9a-f][0-9a-f][0-9a-f][0-9a-f]\" &&\n    -+\tx07=\"$_x05[0-9a-f][0-9a-f]\" &&\n    ++\t_x04=\"[0-9a-f][0-9a-f][0-9a-f][0-9a-f]\" &&\n    ++\t_x07=\"$_x05[0-9a-f][0-9a-f]\" &&\n     +\tsed -e \"s/$OID_REGEX/$ZERO_OID/g\" \\\n     +\t    -e \"s/From $_x40 /From $ZERO_OID /\" \\\n     +\t    -e \"s/from $_x40)/from $ZERO_OID)/\" \\\n    @@ t/t4013-diff-various.sh: test_expect_success setup '\n     +\t    -e \"s/^$_x40 $_x40$/$ZERO_OID $ZERO_OID/\" \\\n     +\t    -e \"s/^$_x40 /$ZERO_OID /\" \\\n     +\t    -e \"s/^$_x40$/$ZERO_OID/\" \\\n    -+\t    -e \"s/$x07\\.\\.$x07/fffffff..fffffff/g\" \\\n    -+\t    -e \"s/$x07,$x07\\.\\.$x07/fffffff,fffffff..fffffff/g\" \\\n    -+\t    -e \"s/$x07 $x07 $x07/fffffff fffffff fffffff/g\" \\\n    -+\t    -e \"s/$x07 $x07 /fffffff fffffff /g\" \\\n    -+\t    -e \"s/Merge: $x07 $x07/Merge: fffffff fffffff/g\" \\\n    -+\t    -e \"s/$x07\\.\\.\\./fffffff.../g\" \\\n    -+\t    -e \"s/ $x04\\.\\.\\./ ffff.../g\" \\\n    -+\t    -e \"s/ $x04/ ffff/g\" \\\n    ++\t    -e \"s/$_x07\\.\\.$_x07/fffffff..fffffff/g\" \\\n    ++\t    -e \"s/$_x07,$_x07\\.\\.$_x07/fffffff,fffffff..fffffff/g\" \\\n    ++\t    -e \"s/$_x07 $_x07 $_x07/fffffff fffffff fffffff/g\" \\\n    ++\t    -e \"s/$_x07 $_x07 /fffffff fffffff /g\" \\\n    ++\t    -e \"s/Merge: $_x07 $_x07/Merge: fffffff fffffff/g\" \\\n    ++\t    -e \"s/$_x07\\.\\.\\./fffffff.../g\" \\\n    ++\t    -e \"s/ $_x04\\.\\.\\./ ffff.../g\" \\\n    ++\t    -e \"s/ $_x04/ ffff/g\" \\\n     +\t    \"$1\"\n     +}\n     +\n -:  ---------- >  8:  b26cda12e1 t4211: move SHA-1-specific test cases into a directory\n -:  ---------- >  9:  2c9d7bed6c t4211: add test cases for SHA-256\n 9:  293a7de6c5 = 10:  aef4e633c0 t4060: make test work with SHA-256\n10:  6d145eb073 <  -:  ---------- t4211: make test hash independent\n11:  eb7ce42e0e ! 11:  34870c3e84 t5302: make hash size independent\n    @@ Commit message\n         Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>\n     \n      ## t/t5302-pack-index.sh ##\n    -@@ t/t5302-pack-index.sh: test_description='pack index with 64-bit offsets and object CRC'\n    +@@\n    + test_description='pack index with 64-bit offsets and object CRC'\n    + . ./test-lib.sh\n      \n    - test_expect_success \\\n    -     'setup' \\\n    +-test_expect_success \\\n    +-    'setup' \\\n     -    'rm -rf .git &&\n    -+    'test_oid_init &&\n    ++test_expect_success 'setup' '\n    ++     test_oid_init &&\n    ++     rawsz=$(test_oid rawsz) &&\n     +     rm -rf .git &&\n           git init &&\n           git config pack.threads 1 &&\n    @@ t/t5302-pack-index.sh: test_expect_success \\\n      \t git ls-tree $tree | sed -e \"s/.* \\\\([0-9a-f]*\\\\)\t.*/\\\\1/\"\n           } >obj-list &&\n     -     git update-ref HEAD $commit'\n    -+     git update-ref HEAD $commit &&\n    -+     rawsz=$(test_oid rawsz)\n    ++     git update-ref HEAD $commit\n     +'\n      \n      test_expect_success \\\n          'pack-objects with index version 1' \\\n     @@ t/t5302-pack-index.sh: test_expect_success \\\n    -     '[index v1] 2) create a stealth corruption in a delta base reference' \\\n    -     '# This test assumes file_101 is a delta smaller than 16 bytes.\n    -      # It should be against file_100 but we substitute its base for file_099\n    -+     offset=$((rawsz + 4)) &&\n    -      sha1_101=$(git hash-object file_101) &&\n    -      sha1_099=$(git hash-object file_099) &&\n           offs_101=$(index_obj_offset 1.idx $sha1_101) &&\n    -@@ t/t5302-pack-index.sh: test_expect_success \\\n    +      nr_099=$(index_obj_nr 1.idx $sha1_099) &&\n           chmod +w \".git/objects/pack/pack-${pack1}.pack\" &&\n    ++     recordsz=$((rawsz + 4)) &&\n           dd of=\".git/objects/pack/pack-${pack1}.pack\" seek=$(($offs_101 + 1)) \\\n              if=\".git/objects/pack/pack-${pack1}.idx\" \\\n     -        skip=$((4 + 256 * 4 + $nr_099 * 24)) \\\n     -        bs=1 count=20 conv=notrunc &&\n    -+        skip=$((4 + 256 * 4 + $nr_099 * offset)) \\\n    ++        skip=$((4 + 256 * 4 + $nr_099 * recordsz)) \\\n     +        bs=1 count=$rawsz conv=notrunc &&\n           git cat-file blob $sha1_101 > file_101_foo1'\n      \n12:  3d38f92e0c = 12:  c0746ca94e t5309: make test hash independent\n13:  b44f4ccb19 ! 13:  1d0e795639 t5313: make test hash independent\n    @@ t/t5313-pack-bounds-checks.sh: test_expect_success 'bogus offset inside v2 exten\n      \t#\n      \t# Note that the value is important here. We want $object as\n     -\t# the second entry in sorted-sha1 order. The sha1 of 1485 starts\n    -+\t# the second entry in sorted-sha1 order. The hash of this object starts\n    ++\t# the second entry in sorted-hash order. The hash of this object starts\n      \t# with \"000\", which sorts before that of $object (which starts\n      \t# with \"fff\").\n     -\tsecond=$(echo 1485 | git hash-object -w --stdin) &&\n14:  a7025ea2b4 = 14:  62a11bfd93 t5321: make test hash independent\n15:  fe5cfb2745 ! 15:  909fcd8d9f t5515: make test hash independent\n    @@ t/t5515-fetch-merge-logic.sh: GIT_TEST_PROTOCOL_VERSION=\n      \n      . ./test-lib.sh\n      \n    -+convert_expected () {\n    -+\tfile=\"$1\" &&\n    ++build_script () {\n    ++\tscript=\"$1\" &&\n     +\tfor i in one three_file master master2 one_tree three two two2 three2\n     +\tdo\n    -+\t\tsed -e \"s/$(test_oid --hash=sha1 \"$i\")/$(test_oid \"$i\")/g\" \\\n    -+\t\t\t\"$file\" >\"$file.tmp\" &&\n    -+\t\tmv \"$file.tmp\" \"$file\"\n    ++\t\techo \"s/$(test_oid --hash=sha1 \"$i\")/$(test_oid \"$i\")/g\" >>\"$script\"\n     +\tdone\n     +}\n    ++\n    ++convert_expected () {\n    ++\tfile=\"$1\" &&\n    ++\tscript=\"$2\" &&\n    ++\tsed -f \"$script\" \"$file\" >\"$file.tmp\" &&\n    ++\tmv \"$file.tmp\" \"$file\"\n    ++}\n     +\n      test_expect_success setup '\n      \tGIT_AUTHOR_DATE=\"2006-06-26 00:00:00 +0000\" &&\n    @@ t/t5515-fetch-merge-logic.sh: GIT_TEST_PROTOCOL_VERSION=\n      \techo >file original &&\n      \tgit add file &&\n      \tgit commit -a -m One &&\n    +@@ t/t5515-fetch-merge-logic.sh: test_expect_success setup '\n    + \t\tgit config branch.br-$remote-octopus.remote $remote &&\n    + \t\tgit config branch.br-$remote-octopus.merge refs/heads/one &&\n    + \t\tgit config --add branch.br-$remote-octopus.merge two\n    +-\tdone\n    ++\tdone &&\n    ++\tbuild_script sed_script\n    + '\n    + \n    + # Merge logic depends on branch properties and Pull: or .fetch lines\n     @@ t/t5515-fetch-merge-logic.sh: do\n      \tactual_r=\"$pfx-refs.$test\"\n      \n      \ttest_expect_success \"$cmd\" '\n     +\t\tcp \"$expect_f\" expect_f &&\n    -+\t\tconvert_expected expect_f &&\n    ++\t\tconvert_expected expect_f sed_script &&\n     +\t\tcp \"$expect_r\" expect_r &&\n    -+\t\tconvert_expected expect_r &&\n    ++\t\tconvert_expected expect_r sed_script &&\n      \t\t{\n      \t\t\techo \"# $cmd\"\n      \t\t\tset x $cmd; shift\n16:  fdd54d76d0 = 16:  9c3de0ede2 t5318: update for SHA-256\n17:  9b18e4b0e1 <  -:  ---------- t5616: use correct filter syntax\n18:  8e6a811438 = 17:  13fd8132f5 t5607: make hash size independent\n19:  275228768f <  -:  ---------- t5703: make test work with SHA-256\n20:  cdc73103ef ! 18:  4a872b0096 t5703: switch tests to use test_oid\n    @@ Metadata\n     Author: brian m. carlson <sandals@crustytoothpaste.net>\n     \n      ## Commit message ##\n    -    t5703: switch tests to use test_oid\n    +    t5703: make test work with SHA-256\n     \n    -    To make this test work correctly with SHA-256, switch the hard-coded\n    -    invalid object IDs to use test_oid.\n    +    This test used an object ID which was 40 hex characters in length,\n    +    causing the test not only not to pass, but to hang, when run with\n    +    SHA-256 as the hash.  Change this value to a fixed dummy object ID using\n    +    test_oid_init and test_oid.\n    +\n    +    Furthermore, ensure we extract an object ID of the appropriate length\n    +    using cut with fields instead of a fixed length.\n     \n         Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>\n     \n      ## t/t5703-upload-pack-ref-in-want.sh ##\n    +@@ t/t5703-upload-pack-ref-in-want.sh: get_actual_commits () {\n    + \t\t}' <out | test-tool pkt-line unpack-sideband >o.pack &&\n    + \tgit index-pack o.pack &&\n    + \tgit verify-pack -v o.idx >objs &&\n    +-\tgrep commit objs | cut -c-40 | sort >actual_commits\n    ++\tgrep commit objs | cut -d\" \" -f1 | sort >actual_commits\n    + }\n    + \n    + check_output () {\n     @@ t/t5703-upload-pack-ref-in-want.sh: check_output () {\n      #             \\ | /\n      #               a\n21:  d338d24661 = 19:  bd6905fe17 t6000: abstract away SHA-1-specific constants\n22:  65bae45a5f = 20:  4131bdbeec t6006: make hash size independent\n23:  a25605c259 = 21:  1f3c3bccf0 t6024: update for SHA-256\n"},{"id":"391292","messageId":"20200207005254.1495851-3-sandals@crustytoothpaste.net","threadId":"52756","inReplyTo":"20200207005254.1495851-1-sandals@crustytoothpaste.net","subject":"[PATCH v3 02/21] t3206: make hash size independent","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2020-02-07T00:52:35Z","receivedAt":"2020-02-07T00:53:37Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"Fix the one assertion in this test that still uses SHA-1 to use test_oid\nto be independent of the hash.\n\nSigned-off-by: brian m. carlson <sandals@crustytoothpaste.net>\n---\n t/t3206-range-diff.sh | 14 +++++++++++---\n 1 file changed, 11 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t3206-range-diff.sh b/t/t3206-range-diff.sh\nindex 0575dd72b1..bd808f87ed 100755\n--- a/t/t3206-range-diff.sh\n+++ b/t/t3206-range-diff.sh\n@@ -102,6 +102,14 @@ test_expect_success 'setup' '\n \tn3 sha256:3b0a644\n \tn4 sha256:e461653\n \n+\t# mode change\n+\to1 sha1:4d39cb3\n+\to2 sha1:26c107f\n+\to3 sha1:4c1e0f5\n+\to1 sha256:d0dd598\n+\to2 sha256:c4a279e\n+\to3 sha256:78459d7\n+\n \t# added and removed\n \ts1 sha1:096b1ba\n \ts2 sha1:d92e698\n@@ -336,7 +344,7 @@ test_expect_success 'renamed file' '\n test_expect_success 'file with mode only change' '\n \tgit range-diff --no-color --submodule=log topic...mode-only-change >actual &&\n \tsed s/Z/\\ /g >expect <<-EOF &&\n-\t1:  fccce22 ! 1:  4d39cb3 s/4/A/\n+\t1:  $(test_oid t2) ! 1:  $(test_oid o1) s/4/A/\n \t    @@ Metadata\n \t    ZAuthor: Thomas Rast <trast@inf.ethz.ch>\n \t    Z\n@@ -352,7 +360,7 @@ test_expect_success 'file with mode only change' '\n \t    Z 7\n \t    +\n \t    + ## other-file (new) ##\n-\t2:  147e64e ! 2:  26c107f s/11/B/\n+\t2:  $(test_oid t3) ! 2:  $(test_oid o2) s/11/B/\n \t    @@ Metadata\n \t    ZAuthor: Thomas Rast <trast@inf.ethz.ch>\n \t    Z\n@@ -368,7 +376,7 @@ test_expect_success 'file with mode only change' '\n \t    Z 14\n \t    +\n \t    + ## other-file (mode change 100644 => 100755) ##\n-\t3:  a63e992 = 3:  4c1e0f5 s/12/B/\n+\t3:  $(test_oid t4) = 3:  $(test_oid o3) s/12/B/\n \tEOF\n \ttest_cmp expect actual\n '\n"},{"id":"391293","messageId":"20200207005254.1495851-4-sandals@crustytoothpaste.net","threadId":"52756","inReplyTo":"20200207005254.1495851-1-sandals@crustytoothpaste.net","subject":"[PATCH v3 03/21] t3308: make test work with SHA-256","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2020-02-07T00:52:36Z","receivedAt":"2020-02-07T00:53:38Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"Replace the hard-coded SHA-1 constants with the use of test_oid to look\nup an appropriate constant for each hash algorithm.\n\nSigned-off-by: brian m. carlson <sandals@crustytoothpaste.net>\n---\n t/t3308-notes-merge.sh | 83 ++++++++++++++++++++++++++++--------------\n 1 file changed, 55 insertions(+), 28 deletions(-)\n\ndiff --git a/t/t3308-notes-merge.sh b/t/t3308-notes-merge.sh\nindex d60588ec8f..790e292966 100755\n--- a/t/t3308-notes-merge.sh\n+++ b/t/t3308-notes-merge.sh\n@@ -20,7 +20,34 @@ test_expect_success setup '\n \tgit notes add -m \"Notes on 3rd commit\" 3rd &&\n \tgit notes add -m \"Notes on 4th commit\" 4th &&\n \t# Copy notes to remote-notes\n-\tgit fetch . refs/notes/*:refs/remote-notes/origin/*\n+\tgit fetch . refs/notes/*:refs/remote-notes/origin/* &&\n+\n+\ttest_oid_init &&\n+\ttest_oid_cache <<-EOF\n+\thash4a sha1:5e93d24084d32e1cb61f7070505b9d2530cca987\n+\thash3a sha1:8366731eeee53787d2bdf8fc1eff7d94757e8da0\n+\thash2a sha1:eede89064cd42441590d6afec6c37b321ada3389\n+\thash1a sha1:daa55ffad6cb99bf64226532147ffcaf5ce8bdd1\n+\thash5b sha1:0f2efbd00262f2fd41dfae33df8765618eeacd99\n+\thash4b sha1:dec2502dac3ea161543f71930044deff93fa945c\n+\thash3b sha1:4069cdb399fd45463ec6eef8e051a16a03592d91\n+\thash2c sha1:d000d30e6ddcfce3a8122c403226a2ce2fd04d9d\n+\thash1c sha1:43add6bd0c8c0bc871ac7991e0f5573cfba27804\n+\thash4d sha1:1f257a3a90328557c452f0817d6cc50c89d315d4\n+\thash3d sha1:05a4927951bcef347f51486575b878b2b60137f2\n+\n+\thash4a sha256:eef876be1d32ac2e2e42240e0429325cec116e55e88cb2969899fac695aa762f\n+\thash3a sha256:cf7cd1bc091d7ba4166a86df864110e42087cd893a5ae96bc50d637e0290939d\n+\thash2a sha256:21ddde7ebce2c285213898cb04deca0fd3209610cf7aaf8222e4e2f45262fae2\n+\thash1a sha256:f9fe0eda16c6027732ed9d4295689a03abd16f893be69b3dcbf4037ddb191921\n+\thash5b sha256:20046f2244577797a9e3d3f790ea9eca4d8a6bafb2a5570bcb0e03aa02ce100b\n+\thash4b sha256:f90563d134c61a95bb88afbd45d48ccc9e919c62aa6fbfcd483302b3e4d8dbcb\n+\thash3b sha256:988f2aca9f2d87e93e6a73197c2bb99560cc44a2f92d18653968f956f01221e0\n+\thash2c sha256:84153b777b4d42827a756c6578dcdb59d8ae5d1360b874fb37c430150c825c26\n+\thash1c sha256:9beb2bc4eef72e4c4087be168a20573e34d993d9ab1883055f23e322afa06567\n+\thash4d sha256:32de39dc06e679a7abb2d4a55ede7709b3124340a4a90aa305971b1c72ac319d\n+\thash3d sha256:fa73b20e41cbb7541c4c81d1535016131dbfbeb05bf6a71f6115e9cad31c7af5\n+\tEOF\n '\n \n commit_sha1=$(git rev-parse 1st^{commit})\n@@ -40,10 +67,10 @@ verify_notes () {\n }\n \n cat <<EOF | sort >expect_notes_x\n-5e93d24084d32e1cb61f7070505b9d2530cca987 $commit_sha4\n-8366731eeee53787d2bdf8fc1eff7d94757e8da0 $commit_sha3\n-eede89064cd42441590d6afec6c37b321ada3389 $commit_sha2\n-daa55ffad6cb99bf64226532147ffcaf5ce8bdd1 $commit_sha1\n+$(test_oid hash4a) $commit_sha4\n+$(test_oid hash3a) $commit_sha3\n+$(test_oid hash2a) $commit_sha2\n+$(test_oid hash1a) $commit_sha1\n EOF\n \n cat >expect_log_x <<EOF\n@@ -126,10 +153,10 @@ test_expect_success 'merge previous notes commit (y^ => y) => No-op' '\n '\n \n cat <<EOF | sort >expect_notes_y\n-0f2efbd00262f2fd41dfae33df8765618eeacd99 $commit_sha5\n-dec2502dac3ea161543f71930044deff93fa945c $commit_sha4\n-4069cdb399fd45463ec6eef8e051a16a03592d91 $commit_sha3\n-daa55ffad6cb99bf64226532147ffcaf5ce8bdd1 $commit_sha1\n+$(test_oid hash5b) $commit_sha5\n+$(test_oid hash4b) $commit_sha4\n+$(test_oid hash3b) $commit_sha3\n+$(test_oid hash1a) $commit_sha1\n EOF\n \n cat >expect_log_y <<EOF\n@@ -193,11 +220,11 @@ test_expect_success 'merge empty notes ref (z => y)' '\n '\n \n cat <<EOF | sort >expect_notes_y\n-0f2efbd00262f2fd41dfae33df8765618eeacd99 $commit_sha5\n-dec2502dac3ea161543f71930044deff93fa945c $commit_sha4\n-4069cdb399fd45463ec6eef8e051a16a03592d91 $commit_sha3\n-d000d30e6ddcfce3a8122c403226a2ce2fd04d9d $commit_sha2\n-43add6bd0c8c0bc871ac7991e0f5573cfba27804 $commit_sha1\n+$(test_oid hash5b) $commit_sha5\n+$(test_oid hash4b) $commit_sha4\n+$(test_oid hash3b) $commit_sha3\n+$(test_oid hash2c) $commit_sha2\n+$(test_oid hash1c) $commit_sha1\n EOF\n \n cat >expect_log_y <<EOF\n@@ -231,9 +258,9 @@ test_expect_success 'change notes on other notes ref (y)' '\n '\n \n cat <<EOF | sort >expect_notes_x\n-0f2efbd00262f2fd41dfae33df8765618eeacd99 $commit_sha5\n-1f257a3a90328557c452f0817d6cc50c89d315d4 $commit_sha4\n-daa55ffad6cb99bf64226532147ffcaf5ce8bdd1 $commit_sha1\n+$(test_oid hash5b) $commit_sha5\n+$(test_oid hash4d) $commit_sha4\n+$(test_oid hash1a) $commit_sha1\n EOF\n \n cat >expect_log_x <<EOF\n@@ -262,10 +289,10 @@ test_expect_success 'change notes on notes ref (x)' '\n '\n \n cat <<EOF | sort >expect_notes_x\n-0f2efbd00262f2fd41dfae33df8765618eeacd99 $commit_sha5\n-1f257a3a90328557c452f0817d6cc50c89d315d4 $commit_sha4\n-d000d30e6ddcfce3a8122c403226a2ce2fd04d9d $commit_sha2\n-43add6bd0c8c0bc871ac7991e0f5573cfba27804 $commit_sha1\n+$(test_oid hash5b) $commit_sha5\n+$(test_oid hash4d) $commit_sha4\n+$(test_oid hash2c) $commit_sha2\n+$(test_oid hash1c) $commit_sha1\n EOF\n \n cat >expect_log_x <<EOF\n@@ -296,8 +323,8 @@ test_expect_success 'merge y into x => Non-conflicting 3-way merge' '\n '\n \n cat <<EOF | sort >expect_notes_w\n-05a4927951bcef347f51486575b878b2b60137f2 $commit_sha3\n-d000d30e6ddcfce3a8122c403226a2ce2fd04d9d $commit_sha2\n+$(test_oid hash3d) $commit_sha3\n+$(test_oid hash2c) $commit_sha2\n EOF\n \n cat >expect_log_w <<EOF\n@@ -326,11 +353,11 @@ test_expect_success 'create notes on new, separate notes ref (w)' '\n '\n \n cat <<EOF | sort >expect_notes_x\n-0f2efbd00262f2fd41dfae33df8765618eeacd99 $commit_sha5\n-1f257a3a90328557c452f0817d6cc50c89d315d4 $commit_sha4\n-05a4927951bcef347f51486575b878b2b60137f2 $commit_sha3\n-d000d30e6ddcfce3a8122c403226a2ce2fd04d9d $commit_sha2\n-43add6bd0c8c0bc871ac7991e0f5573cfba27804 $commit_sha1\n+$(test_oid hash5b) $commit_sha5\n+$(test_oid hash4d) $commit_sha4\n+$(test_oid hash3d) $commit_sha3\n+$(test_oid hash2c) $commit_sha2\n+$(test_oid hash1c) $commit_sha1\n EOF\n \n cat >expect_log_x <<EOF\n"},{"id":"391294","messageId":"20200207005254.1495851-8-sandals@crustytoothpaste.net","threadId":"52756","inReplyTo":"20200207005254.1495851-1-sandals@crustytoothpaste.net","subject":"[PATCH v3 07/21] t4013: make test hash independent","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2020-02-07T00:52:40Z","receivedAt":"2020-02-07T00:53:38Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"This test produces a large number of diff formats and compares the\noutput with test files that have content specific to SHA-1. Since we are\nmore interested in the format of the diffs, and not their specific\nvalues, which are tested elsewhere, add a function which uses sed to\ntransform these specific object IDs into generic ones of the right size,\nwhich we can then compare.\n\nSigned-off-by: brian m. carlson <sandals@crustytoothpaste.net>\n---\n t/t4013-diff-various.sh | 44 +++++++++++++++++++++++++++++++++++------\n 1 file changed, 38 insertions(+), 6 deletions(-)\n\ndiff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh\nindex 5ac94b390d..dde3f11fec 100755\n--- a/t/t4013-diff-various.sh\n+++ b/t/t4013-diff-various.sh\n@@ -120,6 +120,30 @@ test_expect_success setup '\n +*++ [initial] Initial\n EOF\n \n+process_diffs () {\n+\t_x04=\"[0-9a-f][0-9a-f][0-9a-f][0-9a-f]\" &&\n+\t_x07=\"$_x05[0-9a-f][0-9a-f]\" &&\n+\tsed -e \"s/$OID_REGEX/$ZERO_OID/g\" \\\n+\t    -e \"s/From $_x40 /From $ZERO_OID /\" \\\n+\t    -e \"s/from $_x40)/from $ZERO_OID)/\" \\\n+\t    -e \"s/commit $_x40\\$/commit $ZERO_OID/\" \\\n+\t    -e \"s/commit $_x40 (/commit $ZERO_OID (/\" \\\n+\t    -e \"s/$_x40 $_x40 $_x40/$ZERO_OID $ZERO_OID $ZERO_OID/\" \\\n+\t    -e \"s/$_x40 $_x40 /$ZERO_OID $ZERO_OID /\" \\\n+\t    -e \"s/^$_x40 $_x40$/$ZERO_OID $ZERO_OID/\" \\\n+\t    -e \"s/^$_x40 /$ZERO_OID /\" \\\n+\t    -e \"s/^$_x40$/$ZERO_OID/\" \\\n+\t    -e \"s/$_x07\\.\\.$_x07/fffffff..fffffff/g\" \\\n+\t    -e \"s/$_x07,$_x07\\.\\.$_x07/fffffff,fffffff..fffffff/g\" \\\n+\t    -e \"s/$_x07 $_x07 $_x07/fffffff fffffff fffffff/g\" \\\n+\t    -e \"s/$_x07 $_x07 /fffffff fffffff /g\" \\\n+\t    -e \"s/Merge: $_x07 $_x07/Merge: fffffff fffffff/g\" \\\n+\t    -e \"s/$_x07\\.\\.\\./fffffff.../g\" \\\n+\t    -e \"s/ $_x04\\.\\.\\./ ffff.../g\" \\\n+\t    -e \"s/ $_x04/ ffff/g\" \\\n+\t    \"$1\"\n+}\n+\n V=$(git version | sed -e 's/^git version //' -e 's/\\./\\\\./g')\n while read magic cmd\n do\n@@ -158,13 +182,15 @@ do\n \t\t} >\"$actual\" &&\n \t\tif test -f \"$expect\"\n \t\tthen\n+\t\t\tprocess_diffs \"$actual\" >actual &&\n+\t\t\tprocess_diffs \"$expect\" >expect &&\n \t\t\tcase $cmd in\n \t\t\t*format-patch* | *-stat*)\n-\t\t\t\ttest_i18ncmp \"$expect\" \"$actual\";;\n+\t\t\t\ttest_i18ncmp expect actual;;\n \t\t\t*)\n-\t\t\t\ttest_cmp \"$expect\" \"$actual\";;\n+\t\t\t\ttest_cmp expect actual;;\n \t\t\tesac &&\n-\t\t\trm -f \"$actual\"\n+\t\t\trm -f \"$actual\" actual expect\n \t\telse\n \t\t\t# this is to help developing new tests.\n \t\t\tcp \"$actual\" \"$expect\"\n@@ -383,16 +409,22 @@ test_expect_success 'log -S requires an argument' '\n test_expect_success 'diff --cached on unborn branch' '\n \techo ref: refs/heads/unborn >.git/HEAD &&\n \tgit diff --cached >result &&\n-\ttest_cmp \"$TEST_DIRECTORY/t4013/diff.diff_--cached\" result\n+\tprocess_diffs result >actual &&\n+\tprocess_diffs \"$TEST_DIRECTORY/t4013/diff.diff_--cached\" >expected &&\n+\ttest_cmp expected actual\n '\n \n test_expect_success 'diff --cached -- file on unborn branch' '\n \tgit diff --cached -- file0 >result &&\n-\ttest_cmp \"$TEST_DIRECTORY/t4013/diff.diff_--cached_--_file0\" result\n+\tprocess_diffs result >actual &&\n+\tprocess_diffs \"$TEST_DIRECTORY/t4013/diff.diff_--cached_--_file0\" >expected &&\n+\ttest_cmp expected actual\n '\n test_expect_success 'diff --line-prefix with spaces' '\n \tgit diff --line-prefix=\"| | | \" --cached -- file0 >result &&\n-\ttest_cmp \"$TEST_DIRECTORY/t4013/diff.diff_--line-prefix_--cached_--_file0\" result\n+\tprocess_diffs result >actual &&\n+\tprocess_diffs \"$TEST_DIRECTORY/t4013/diff.diff_--line-prefix_--cached_--_file0\" >expected &&\n+\ttest_cmp expected actual\n '\n \n test_expect_success 'diff-tree --stdin with log formatting' '\n"},{"id":"391295","messageId":"20200207005254.1495851-5-sandals@crustytoothpaste.net","threadId":"52756","inReplyTo":"20200207005254.1495851-1-sandals@crustytoothpaste.net","subject":"[PATCH v3 04/21] t3309: make test work with SHA-256","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2020-02-07T00:52:37Z","receivedAt":"2020-02-07T00:53:39Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"Replace the hard-coded SHA-1 constants with the use of test_oid to look\nup an appropriate constant for each hash algorithm.\n\nSigned-off-by: brian m. carlson <sandals@crustytoothpaste.net>\n---\n t/t3309-notes-merge-auto-resolve.sh | 228 ++++++++++++++++++----------\n 1 file changed, 144 insertions(+), 84 deletions(-)\n\ndiff --git a/t/t3309-notes-merge-auto-resolve.sh b/t/t3309-notes-merge-auto-resolve.sh\nindex 14c2adf970..141d3e4ca4 100755\n--- a/t/t3309-notes-merge-auto-resolve.sh\n+++ b/t/t3309-notes-merge-auto-resolve.sh\n@@ -23,7 +23,67 @@ test_expect_success 'setup commits' '\n \ttest_commit 12th &&\n \ttest_commit 13th &&\n \ttest_commit 14th &&\n-\ttest_commit 15th\n+\ttest_commit 15th &&\n+\n+\ttest_oid_cache <<-EOF\n+\thash15a sha1:457a85d6c814ea208550f15fcc48f804ac8dc023\n+\thash14a sha1:b0c95b954301d69da2bc3723f4cb1680d355937c\n+\thash13a sha1:5d30216a129eeffa97d9694ffe8c74317a560315\n+\thash12a sha1:dd161bc149470fd890dd4ab52a4cbd79bbd18c36\n+\thash11a sha1:7abbc45126d680336fb24294f013a7cdfa3ed545\n+\thash10a sha1:b8d03e173f67f6505a76f6e00cf93440200dd9be\n+\thash09a sha1:20c613c835011c48a5abe29170a2402ca6354910\n+\thash08a sha1:a3daf8a1e4e5dc3409a303ad8481d57bfea7f5d6\n+\thash07a sha1:897003322b53bc6ca098e9324ee508362347e734\n+\thash06a sha1:11d97fdebfa5ceee540a3da07bce6fa0222bc082\n+\thash15b sha1:68b8630d25516028bed862719855b3d6768d7833\n+\thash14b sha1:5de7ea7ad4f47e7ff91989fb82234634730f75df\n+\thash13b sha1:3a631fdb6f41b05b55d8f4baf20728ba8f6fccbc\n+\thash12b sha1:a66055fa82f7a03fe0c02a6aba3287a85abf7c62\n+\thash05b sha1:154508c7a0bcad82b6fe4b472bc4c26b3bf0825b\n+\thash04b sha1:e2bfd06a37dd2031684a59a6e2b033e212239c78\n+\thash03b sha1:5772f42408c0dd6f097a7ca2d24de0e78d1c46b1\n+\thash15c sha1:9b4b2c61f0615412da3c10f98ff85b57c04ec765\n+\thash11c sha1:7e3c53503a3db8dd996cb62e37c66e070b44b54d\n+\thash08c sha1:851e1638784a884c7dd26c5d41f3340f6387413a\n+\thash05c sha1:99fc34adfc400b95c67b013115e37e31aa9a6d23\n+\thash02c sha1:283b48219aee9a4105f6cab337e789065c82c2b9\n+\thash15d sha1:7c4e546efd0fe939f876beb262ece02797880b54\n+\thash05d sha1:6c841cc36ea496027290967ca96bd2bef54dbb47\n+\thash15e sha1:d682107b8bf7a7aea1e537a8d5cb6a12b60135f1\n+\thash05e sha1:357b6ca14c7afd59b7f8b8aaaa6b8b723771135b\n+\thash15f sha1:6be90240b5f54594203e25d9f2f64b7567175aee\n+\thash05f sha1:660311d7f78dc53db12ac373a43fca7465381a7e\n+\n+\thash15a sha256:45b1558e5c1b75f570010fa48aaa67bb2289fcd431b34ad81cb4c8b95f4f872a\n+\thash14a sha256:6e7af179ea4dd28afdc83ae6912ba0098cdeff764b26a8b750b157dd81749092\n+\thash13a sha256:7353089961baf555388e1bac68c67c8ea94b08ccbd97532201cf7f6790703052\n+\thash12a sha256:5863e4521689ee1879ceab3b38d39e93ab5b51ec70aaf6a96ad388fbdedfa25e\n+\thash11a sha256:82a0ec0338b4ecf8b44304badf4ad38d7469dc41827f38d7ba6c42e3bae3ee98\n+\thash10a sha256:e84f2564e92de9792c93b8d197262c735d7ccb1de6025cef8759af8f6c3308eb\n+\thash09a sha256:4dd07764bcec696f195c0ea71ae89e174876403af1637e4642b8f4453fd23028\n+\thash08a sha256:02132c4546cd88a1d0aa5854dd55da120927f7904ba16afe36fe03e91a622067\n+\thash07a sha256:369baf7d00c6720efdc10273493555f943051f84a4706fb24caeb353fa4789db\n+\thash06a sha256:52d32c10353583b2d96a5849b1f1f43c8018e76f3e8ef1b0d46eb5cff7cdefaf\n+\thash15b sha256:345e6660b345fa174738a31a7a59423c394bdf414804e200bc510c65d971ae96\n+\thash14b sha256:7653a6596021c52e405cba979eea15a729993e7102b9a61ba4667e34f0ead4a1\n+\thash13b sha256:0f202a0b6b9690de2349c173dfd766a37e82744f61c14f1c389306f1d69f470b\n+\thash12b sha256:eb00f219c026136ea6535b16ff8ec3efa510e6bf50098ca041e1a2a1d4b79840\n+\thash05b sha256:993b2290cd0c24c27c849d99f1904f3b590f77af0f539932734ad05679ac5a2f\n+\thash04b sha256:c7fba0d6104917fbf35258f40b9fa4fc697cfa992deecd1570a3b08d0a5587a9\n+\thash03b sha256:7287a2d78a3766c181b08df38951d784b08b72a44f571ed6d855bd0be22c70f6\n+\thash15c sha256:62316660a22bf97857dc4a16709ec4d93a224e8c9f37d661ef91751e1f4c4166\n+\thash11c sha256:51c3763de9b08309370adc5036d58debb331980e73097902957c444602551daa\n+\thash08c sha256:22cf1fa29599898a7218c51135d66ed85d22aad584f77db3305dedce4c3d4798\n+\thash05c sha256:2508fd86db980f0508893a1c1571bdf3b2ee113dc25ddb1a3a2fb94bd6cd0d58\n+\thash02c sha256:63bb527e0b4e1c8e1dd0d54dd778ca7c3718689fd6e37c473044cfbcf1cacfdb\n+\thash15d sha256:667acb4e2d5f8df15e5aea4506dfd16d25bc7feca70fdb0d965a7222f983bb88\n+\thash05d sha256:09e6b5a6fe666c4a027674b6611a254b7d2528cd211c6b5288d1b4db6c741dfa\n+\thash15e sha256:e8cbf52f6fcadc6de3c7761e64a89e9fe38d19a03d3e28ef6ca8596d93fc4f3a\n+\thash05e sha256:cdb1e19f7ba1539f95af51a57edeb88a7ecc97d3c2f52da8c4c86af308595607\n+\thash15f sha256:29c14cb92da448a923963b8a43994268b19c2e57913de73f3667421fd2c0eeec\n+\thash05f sha256:14a6e641b2c0a9f398ebac6b4d34afa5efea4c52d2631382f45f8f662266903b\n+\tEOF\n '\n \n commit_sha1=$(git rev-parse 1st^{commit})\n@@ -68,16 +128,16 @@ test_expect_success 'setup merge base (x)' '\n '\n \n cat <<EOF | sort >expect_notes_x\n-457a85d6c814ea208550f15fcc48f804ac8dc023 $commit_sha15\n-b0c95b954301d69da2bc3723f4cb1680d355937c $commit_sha14\n-5d30216a129eeffa97d9694ffe8c74317a560315 $commit_sha13\n-dd161bc149470fd890dd4ab52a4cbd79bbd18c36 $commit_sha12\n-7abbc45126d680336fb24294f013a7cdfa3ed545 $commit_sha11\n-b8d03e173f67f6505a76f6e00cf93440200dd9be $commit_sha10\n-20c613c835011c48a5abe29170a2402ca6354910 $commit_sha9\n-a3daf8a1e4e5dc3409a303ad8481d57bfea7f5d6 $commit_sha8\n-897003322b53bc6ca098e9324ee508362347e734 $commit_sha7\n-11d97fdebfa5ceee540a3da07bce6fa0222bc082 $commit_sha6\n+$(test_oid hash15a) $commit_sha15\n+$(test_oid hash14a) $commit_sha14\n+$(test_oid hash13a) $commit_sha13\n+$(test_oid hash12a) $commit_sha12\n+$(test_oid hash11a) $commit_sha11\n+$(test_oid hash10a) $commit_sha10\n+$(test_oid hash09a) $commit_sha9\n+$(test_oid hash08a) $commit_sha8\n+$(test_oid hash07a) $commit_sha7\n+$(test_oid hash06a) $commit_sha6\n EOF\n \n cat >expect_log_x <<EOF\n@@ -141,16 +201,16 @@ test_expect_success 'setup local branch (y)' '\n '\n \n cat <<EOF | sort >expect_notes_y\n-68b8630d25516028bed862719855b3d6768d7833 $commit_sha15\n-5de7ea7ad4f47e7ff91989fb82234634730f75df $commit_sha14\n-3a631fdb6f41b05b55d8f4baf20728ba8f6fccbc $commit_sha13\n-a66055fa82f7a03fe0c02a6aba3287a85abf7c62 $commit_sha12\n-7abbc45126d680336fb24294f013a7cdfa3ed545 $commit_sha11\n-b8d03e173f67f6505a76f6e00cf93440200dd9be $commit_sha10\n-20c613c835011c48a5abe29170a2402ca6354910 $commit_sha9\n-154508c7a0bcad82b6fe4b472bc4c26b3bf0825b $commit_sha5\n-e2bfd06a37dd2031684a59a6e2b033e212239c78 $commit_sha4\n-5772f42408c0dd6f097a7ca2d24de0e78d1c46b1 $commit_sha3\n+$(test_oid hash15b) $commit_sha15\n+$(test_oid hash14b) $commit_sha14\n+$(test_oid hash13b) $commit_sha13\n+$(test_oid hash12b) $commit_sha12\n+$(test_oid hash11a) $commit_sha11\n+$(test_oid hash10a) $commit_sha10\n+$(test_oid hash09a) $commit_sha9\n+$(test_oid hash05b) $commit_sha5\n+$(test_oid hash04b) $commit_sha4\n+$(test_oid hash03b) $commit_sha3\n EOF\n \n cat >expect_log_y <<EOF\n@@ -214,16 +274,16 @@ test_expect_success 'setup remote branch (z)' '\n '\n \n cat <<EOF | sort >expect_notes_z\n-9b4b2c61f0615412da3c10f98ff85b57c04ec765 $commit_sha15\n-5de7ea7ad4f47e7ff91989fb82234634730f75df $commit_sha14\n-5d30216a129eeffa97d9694ffe8c74317a560315 $commit_sha13\n-7e3c53503a3db8dd996cb62e37c66e070b44b54d $commit_sha11\n-b8d03e173f67f6505a76f6e00cf93440200dd9be $commit_sha10\n-851e1638784a884c7dd26c5d41f3340f6387413a $commit_sha8\n-897003322b53bc6ca098e9324ee508362347e734 $commit_sha7\n-99fc34adfc400b95c67b013115e37e31aa9a6d23 $commit_sha5\n-e2bfd06a37dd2031684a59a6e2b033e212239c78 $commit_sha4\n-283b48219aee9a4105f6cab337e789065c82c2b9 $commit_sha2\n+$(test_oid hash15c) $commit_sha15\n+$(test_oid hash14b) $commit_sha14\n+$(test_oid hash13a) $commit_sha13\n+$(test_oid hash11c) $commit_sha11\n+$(test_oid hash10a) $commit_sha10\n+$(test_oid hash08c) $commit_sha8\n+$(test_oid hash07a) $commit_sha7\n+$(test_oid hash05c) $commit_sha5\n+$(test_oid hash04b) $commit_sha4\n+$(test_oid hash02c) $commit_sha2\n EOF\n \n cat >expect_log_z <<EOF\n@@ -306,16 +366,16 @@ test_expect_success 'merge z into y with invalid configuration option => Fail/No\n '\n \n cat <<EOF | sort >expect_notes_ours\n-68b8630d25516028bed862719855b3d6768d7833 $commit_sha15\n-5de7ea7ad4f47e7ff91989fb82234634730f75df $commit_sha14\n-3a631fdb6f41b05b55d8f4baf20728ba8f6fccbc $commit_sha13\n-a66055fa82f7a03fe0c02a6aba3287a85abf7c62 $commit_sha12\n-7e3c53503a3db8dd996cb62e37c66e070b44b54d $commit_sha11\n-b8d03e173f67f6505a76f6e00cf93440200dd9be $commit_sha10\n-154508c7a0bcad82b6fe4b472bc4c26b3bf0825b $commit_sha5\n-e2bfd06a37dd2031684a59a6e2b033e212239c78 $commit_sha4\n-5772f42408c0dd6f097a7ca2d24de0e78d1c46b1 $commit_sha3\n-283b48219aee9a4105f6cab337e789065c82c2b9 $commit_sha2\n+$(test_oid hash15b) $commit_sha15\n+$(test_oid hash14b) $commit_sha14\n+$(test_oid hash13b) $commit_sha13\n+$(test_oid hash12b) $commit_sha12\n+$(test_oid hash11c) $commit_sha11\n+$(test_oid hash10a) $commit_sha10\n+$(test_oid hash05b) $commit_sha5\n+$(test_oid hash04b) $commit_sha4\n+$(test_oid hash03b) $commit_sha3\n+$(test_oid hash02c) $commit_sha2\n EOF\n \n cat >expect_log_ours <<EOF\n@@ -395,16 +455,16 @@ test_expect_success 'reset to pre-merge state (y)' '\n '\n \n cat <<EOF | sort >expect_notes_theirs\n-9b4b2c61f0615412da3c10f98ff85b57c04ec765 $commit_sha15\n-5de7ea7ad4f47e7ff91989fb82234634730f75df $commit_sha14\n-3a631fdb6f41b05b55d8f4baf20728ba8f6fccbc $commit_sha13\n-7e3c53503a3db8dd996cb62e37c66e070b44b54d $commit_sha11\n-b8d03e173f67f6505a76f6e00cf93440200dd9be $commit_sha10\n-851e1638784a884c7dd26c5d41f3340f6387413a $commit_sha8\n-99fc34adfc400b95c67b013115e37e31aa9a6d23 $commit_sha5\n-e2bfd06a37dd2031684a59a6e2b033e212239c78 $commit_sha4\n-5772f42408c0dd6f097a7ca2d24de0e78d1c46b1 $commit_sha3\n-283b48219aee9a4105f6cab337e789065c82c2b9 $commit_sha2\n+$(test_oid hash15c) $commit_sha15\n+$(test_oid hash14b) $commit_sha14\n+$(test_oid hash13b) $commit_sha13\n+$(test_oid hash11c) $commit_sha11\n+$(test_oid hash10a) $commit_sha10\n+$(test_oid hash08c) $commit_sha8\n+$(test_oid hash05c) $commit_sha5\n+$(test_oid hash04b) $commit_sha4\n+$(test_oid hash03b) $commit_sha3\n+$(test_oid hash02c) $commit_sha2\n EOF\n \n cat >expect_log_theirs <<EOF\n@@ -473,17 +533,17 @@ test_expect_success 'reset to pre-merge state (y)' '\n '\n \n cat <<EOF | sort >expect_notes_union\n-7c4e546efd0fe939f876beb262ece02797880b54 $commit_sha15\n-5de7ea7ad4f47e7ff91989fb82234634730f75df $commit_sha14\n-3a631fdb6f41b05b55d8f4baf20728ba8f6fccbc $commit_sha13\n-a66055fa82f7a03fe0c02a6aba3287a85abf7c62 $commit_sha12\n-7e3c53503a3db8dd996cb62e37c66e070b44b54d $commit_sha11\n-b8d03e173f67f6505a76f6e00cf93440200dd9be $commit_sha10\n-851e1638784a884c7dd26c5d41f3340f6387413a $commit_sha8\n-6c841cc36ea496027290967ca96bd2bef54dbb47 $commit_sha5\n-e2bfd06a37dd2031684a59a6e2b033e212239c78 $commit_sha4\n-5772f42408c0dd6f097a7ca2d24de0e78d1c46b1 $commit_sha3\n-283b48219aee9a4105f6cab337e789065c82c2b9 $commit_sha2\n+$(test_oid hash15d) $commit_sha15\n+$(test_oid hash14b) $commit_sha14\n+$(test_oid hash13b) $commit_sha13\n+$(test_oid hash12b) $commit_sha12\n+$(test_oid hash11c) $commit_sha11\n+$(test_oid hash10a) $commit_sha10\n+$(test_oid hash08c) $commit_sha8\n+$(test_oid hash05d) $commit_sha5\n+$(test_oid hash04b) $commit_sha4\n+$(test_oid hash03b) $commit_sha3\n+$(test_oid hash02c) $commit_sha2\n EOF\n \n cat >expect_log_union <<EOF\n@@ -574,17 +634,17 @@ test_expect_success 'merge z into y with \"manual\" per-ref only checks specific r\n '\n \n cat <<EOF | sort >expect_notes_union2\n-d682107b8bf7a7aea1e537a8d5cb6a12b60135f1 $commit_sha15\n-5de7ea7ad4f47e7ff91989fb82234634730f75df $commit_sha14\n-3a631fdb6f41b05b55d8f4baf20728ba8f6fccbc $commit_sha13\n-a66055fa82f7a03fe0c02a6aba3287a85abf7c62 $commit_sha12\n-7e3c53503a3db8dd996cb62e37c66e070b44b54d $commit_sha11\n-b8d03e173f67f6505a76f6e00cf93440200dd9be $commit_sha10\n-851e1638784a884c7dd26c5d41f3340f6387413a $commit_sha8\n-357b6ca14c7afd59b7f8b8aaaa6b8b723771135b $commit_sha5\n-e2bfd06a37dd2031684a59a6e2b033e212239c78 $commit_sha4\n-5772f42408c0dd6f097a7ca2d24de0e78d1c46b1 $commit_sha3\n-283b48219aee9a4105f6cab337e789065c82c2b9 $commit_sha2\n+$(test_oid hash15e) $commit_sha15\n+$(test_oid hash14b) $commit_sha14\n+$(test_oid hash13b) $commit_sha13\n+$(test_oid hash12b) $commit_sha12\n+$(test_oid hash11c) $commit_sha11\n+$(test_oid hash10a) $commit_sha10\n+$(test_oid hash08c) $commit_sha8\n+$(test_oid hash05e) $commit_sha5\n+$(test_oid hash04b) $commit_sha4\n+$(test_oid hash03b) $commit_sha3\n+$(test_oid hash02c) $commit_sha2\n EOF\n \n cat >expect_log_union2 <<EOF\n@@ -648,17 +708,17 @@ test_expect_success 'reset to pre-merge state (z)' '\n '\n \n cat <<EOF | sort >expect_notes_cat_sort_uniq\n-6be90240b5f54594203e25d9f2f64b7567175aee $commit_sha15\n-5de7ea7ad4f47e7ff91989fb82234634730f75df $commit_sha14\n-3a631fdb6f41b05b55d8f4baf20728ba8f6fccbc $commit_sha13\n-a66055fa82f7a03fe0c02a6aba3287a85abf7c62 $commit_sha12\n-7e3c53503a3db8dd996cb62e37c66e070b44b54d $commit_sha11\n-b8d03e173f67f6505a76f6e00cf93440200dd9be $commit_sha10\n-851e1638784a884c7dd26c5d41f3340f6387413a $commit_sha8\n-660311d7f78dc53db12ac373a43fca7465381a7e $commit_sha5\n-e2bfd06a37dd2031684a59a6e2b033e212239c78 $commit_sha4\n-5772f42408c0dd6f097a7ca2d24de0e78d1c46b1 $commit_sha3\n-283b48219aee9a4105f6cab337e789065c82c2b9 $commit_sha2\n+$(test_oid hash15f) $commit_sha15\n+$(test_oid hash14b) $commit_sha14\n+$(test_oid hash13b) $commit_sha13\n+$(test_oid hash12b) $commit_sha12\n+$(test_oid hash11c) $commit_sha11\n+$(test_oid hash10a) $commit_sha10\n+$(test_oid hash08c) $commit_sha8\n+$(test_oid hash05f) $commit_sha5\n+$(test_oid hash04b) $commit_sha4\n+$(test_oid hash03b) $commit_sha3\n+$(test_oid hash02c) $commit_sha2\n EOF\n \n cat >expect_log_cat_sort_uniq <<EOF\n"},{"id":"391296","messageId":"20200207005254.1495851-7-sandals@crustytoothpaste.net","threadId":"52756","inReplyTo":"20200207005254.1495851-1-sandals@crustytoothpaste.net","subject":"[PATCH v3 06/21] t3311: make test work with SHA-256","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2020-02-07T00:52:39Z","receivedAt":"2020-02-07T00:53:41Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"Replace the hard-coded SHA-1 constants with the use of test_oid to look\nup an appropriate constant for each hash algorithm.  In addition, adjust\nthe fanout checks to look for either zero or one slashes in the filename\nwithout needing to check for an explicit length.\n\nSigned-off-by: brian m. carlson <sandals@crustytoothpaste.net>\n---\n t/t3311-notes-merge-fanout.sh | 60 ++++++++++++++++++++---------------\n 1 file changed, 35 insertions(+), 25 deletions(-)\n\ndiff --git a/t/t3311-notes-merge-fanout.sh b/t/t3311-notes-merge-fanout.sh\nindex 37151a3adc..5b675417e9 100755\n--- a/t/t3311-notes-merge-fanout.sh\n+++ b/t/t3311-notes-merge-fanout.sh\n@@ -29,15 +29,10 @@ verify_fanout () {\n \tgit ls-tree -r --name-only \"refs/notes/$notes_ref\" |\n \twhile read path\n \tdo\n-\t\tcase \"$path\" in\n-\t\t??/??????????????????????????????????????)\n-\t\t\t: true\n-\t\t\t;;\n-\t\t*)\n+\t\techo \"$path\" | grep \"^../[0-9a-f]*$\" || {\n \t\t\techo \"Invalid path \\\"$path\\\"\" &&\n-\t\t\treturn 1\n-\t\t\t;;\n-\t\tesac\n+\t\t\treturn 1;\n+\t\t}\n \tdone\n }\n \n@@ -48,15 +43,10 @@ verify_no_fanout () {\n \tgit ls-tree -r --name-only \"refs/notes/$notes_ref\" |\n \twhile read path\n \tdo\n-\t\tcase \"$path\" in\n-\t\t????????????????????????????????????????)\n-\t\t\t: true\n-\t\t\t;;\n-\t\t*)\n+\t\techo \"$path\" | grep -v \"^../.*\" || {\n \t\t\techo \"Invalid path \\\"$path\\\"\" &&\n-\t\t\treturn 1\n-\t\t\t;;\n-\t\tesac\n+\t\t\treturn 1;\n+\t\t}\n \tdone\n }\n \n@@ -67,7 +57,27 @@ test_expect_success 'setup a few initial commits with notes (notes ref: x)' '\n \tdo\n \t\ttest_commit \"commit$i\" >/dev/null &&\n \t\tgit notes add -m \"notes for commit$i\" || return 1\n-\tdone\n+\tdone &&\n+\n+\tgit log --format=oneline &&\n+\n+\ttest_oid_cache <<-EOF\n+\thash05a sha1:aed91155c7a72c2188e781fdf40e0f3761b299db\n+\thash04a sha1:99fab268f9d7ee7b011e091a436c78def8eeee69\n+\thash03a sha1:953c20ae26c7aa0b428c20693fe38bc687f9d1a9\n+\thash02a sha1:6358796131b8916eaa2dde6902642942a1cb37e1\n+\thash01a sha1:b02d459c32f0e68f2fe0981033bb34f38776ba47\n+\thash03b sha1:9f506ee70e20379d7f78204c77b334f43d77410d\n+\thash02b sha1:23a47d6ea7d589895faf800752054818e1e7627b\n+\n+\thash05a sha256:3aae5d26619d96dba93795f66325716e4cbc486884f95a6adee8fb0615a76d12\n+\thash04a sha256:07e43dd3d89fe634d3252e253b426aacc7285a995dcdbcf94ac284060a1122cf\n+\thash03a sha256:26fb52eaa7f4866bf735254587be7b31209ec10e525912ffd8e8ba549ba892ff\n+\thash02a sha256:b57ebdf23634e750dcbc4b9a37991d70f90830d568a0e4529ce9de0a3f8d605c\n+\thash01a sha256:377903b1572bd5117087a5518fcb1011b5053cccbc59e3c7c823a8615204173b\n+\thash03b sha256:04e7b392fda7c185bfa17c9179b56db732edc2dc2b3bf887308dcaabb717270d\n+\thash02b sha256:66099aaaec49a485ed990acadd9a9b81232ea592079964113d8f581ff69ef50b\n+\tEOF\n '\n \n commit_sha1=$(git rev-parse commit1^{commit})\n@@ -77,11 +87,11 @@ commit_sha4=$(git rev-parse commit4^{commit})\n commit_sha5=$(git rev-parse commit5^{commit})\n \n cat <<EOF | sort >expect_notes_x\n-aed91155c7a72c2188e781fdf40e0f3761b299db $commit_sha5\n-99fab268f9d7ee7b011e091a436c78def8eeee69 $commit_sha4\n-953c20ae26c7aa0b428c20693fe38bc687f9d1a9 $commit_sha3\n-6358796131b8916eaa2dde6902642942a1cb37e1 $commit_sha2\n-b02d459c32f0e68f2fe0981033bb34f38776ba47 $commit_sha1\n+$(test_oid hash05a) $commit_sha5\n+$(test_oid hash04a) $commit_sha4\n+$(test_oid hash03a) $commit_sha3\n+$(test_oid hash02a) $commit_sha2\n+$(test_oid hash01a) $commit_sha1\n EOF\n \n cat >expect_log_x <<EOF\n@@ -145,9 +155,9 @@ test_expect_success 'Fast-forward merge (y => x)' '\n '\n \n cat <<EOF | sort >expect_notes_z\n-9f506ee70e20379d7f78204c77b334f43d77410d $commit_sha3\n-23a47d6ea7d589895faf800752054818e1e7627b $commit_sha2\n-b02d459c32f0e68f2fe0981033bb34f38776ba47 $commit_sha1\n+$(test_oid hash03b) $commit_sha3\n+$(test_oid hash02b) $commit_sha2\n+$(test_oid hash01a) $commit_sha1\n EOF\n \n cat >expect_log_z <<EOF\n"},{"id":"391297","messageId":"20200207005254.1495851-6-sandals@crustytoothpaste.net","threadId":"52756","inReplyTo":"20200207005254.1495851-1-sandals@crustytoothpaste.net","subject":"[PATCH v3 05/21] t3310: make test work with SHA-256","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2020-02-07T00:52:38Z","receivedAt":"2020-02-07T00:53:41Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"Replace the hard-coded SHA-1 constants with the use of test_oid to look\nup an appropriate constant for each hash algorithm.\n\nSigned-off-by: brian m. carlson <sandals@crustytoothpaste.net>\n---\n t/t3310-notes-merge-manual-resolve.sh | 84 ++++++++++++++++++---------\n 1 file changed, 58 insertions(+), 26 deletions(-)\n\ndiff --git a/t/t3310-notes-merge-manual-resolve.sh b/t/t3310-notes-merge-manual-resolve.sh\nindex 2dea846e25..806d812a17 100755\n--- a/t/t3310-notes-merge-manual-resolve.sh\n+++ b/t/t3310-notes-merge-manual-resolve.sh\n@@ -13,7 +13,39 @@ test_expect_success 'setup commits' '\n \ttest_commit 2nd &&\n \ttest_commit 3rd &&\n \ttest_commit 4th &&\n-\ttest_commit 5th\n+\ttest_commit 5th &&\n+\n+\ttest_oid_cache <<-EOF\n+\thash04a sha1:6e8e3febca3c2bb896704335cc4d0c34cb2f8715\n+\thash03a sha1:e5388c10860456ee60673025345fe2e153eb8cf8\n+\thash02a sha1:ceefa674873670e7ecd131814d909723cce2b669\n+\thash04b sha1:e2bfd06a37dd2031684a59a6e2b033e212239c78\n+\thash03b sha1:5772f42408c0dd6f097a7ca2d24de0e78d1c46b1\n+\thash01b sha1:b0a6021ec006d07e80e9b20ec9b444cbd9d560d3\n+\thash04c sha1:cff59c793c20bb49a4e01bc06fb06bad642e0d54\n+\thash02c sha1:283b48219aee9a4105f6cab337e789065c82c2b9\n+\thash01c sha1:0a81da8956346e19bcb27a906f04af327e03e31b\n+\thash04d sha1:00494adecf2d9635a02fa431308d67993f853968\n+\thash01e sha1:f75d1df88cbfe4258d49852f26cfc83f2ad4494b\n+\thash04f sha1:021faa20e931fb48986ffc6282b4bb05553ac946\n+\thash01f sha1:0a59e787e6d688aa6309e56e8c1b89431a0fc1c1\n+\thash05g sha1:304dfb4325cf243025b9957486eb605a9b51c199\n+\n+\thash04a\tsha256:f18a935e65866345098b3b754071dbf9f3aa3520eb27a7b036b278c5e2f1ed7e\n+\thash03a\tsha256:713035dc94067a64e5fa6e4e1821b7c3bde49a77c7cb3f80eaadefa1ca41b3d2\n+\thash02a\tsha256:f160a67e048b6fa75bec3952184154045076692cf5dccd3da21e3fd34b7a3f0f\n+\thash04b sha256:c7fba0d6104917fbf35258f40b9fa4fc697cfa992deecd1570a3b08d0a5587a9\n+\thash03b sha256:7287a2d78a3766c181b08df38951d784b08b72a44f571ed6d855bd0be22c70f6\n+\thash01b sha256:da96cf778c15d0a2bb76f98b2a62f6c9c01730fa7030e8f08ef0191048e7d620\n+\thash04c sha256:cb615d2def4b834d5f55b2351df97dc92bee4f5009d285201427f349081c8aca\n+\thash02c sha256:63bb527e0b4e1c8e1dd0d54dd778ca7c3718689fd6e37c473044cfbcf1cacfdb\n+\thash01c sha256:5b87237ac1fbae0246256fed9f9a1f077c4140fb7e6444925f8dbfa5ae406cd8\n+\thash04d sha256:eeddc9f9f6cb3d6b39b861659853f10891dc373e0b6eecb09e03e39b6ce64714\n+\thash01e sha256:108f521b1a74c2e6d0b52a4eda87e09162bf847f7d190cfce496ee1af0b29a5a\n+\thash04f sha256:901acda0454502b3bbd281f130c419e6c8de78afcf72a8def8d45ad31462bce4\n+\thash01f sha256:a2d99d1b8bf23c8af7d9d91368454adc110dfd5cc068a4cebb486ee8f5a1e16c\n+\thash05g sha256:4fef015b01da8efe929a68e3bb9b8fbad81f53995f097befe8ebc93f12ab98ec\n+\tEOF\n '\n \n commit_sha1=$(git rev-parse 1st^{commit})\n@@ -33,9 +65,9 @@ verify_notes () {\n }\n \n cat <<EOF | sort >expect_notes_x\n-6e8e3febca3c2bb896704335cc4d0c34cb2f8715 $commit_sha4\n-e5388c10860456ee60673025345fe2e153eb8cf8 $commit_sha3\n-ceefa674873670e7ecd131814d909723cce2b669 $commit_sha2\n+$(test_oid hash04a) $commit_sha4\n+$(test_oid hash03a) $commit_sha3\n+$(test_oid hash02a) $commit_sha2\n EOF\n \n cat >expect_log_x <<EOF\n@@ -63,9 +95,9 @@ test_expect_success 'setup merge base (x)' '\n '\n \n cat <<EOF | sort >expect_notes_y\n-e2bfd06a37dd2031684a59a6e2b033e212239c78 $commit_sha4\n-5772f42408c0dd6f097a7ca2d24de0e78d1c46b1 $commit_sha3\n-b0a6021ec006d07e80e9b20ec9b444cbd9d560d3 $commit_sha1\n+$(test_oid hash04b) $commit_sha4\n+$(test_oid hash03b) $commit_sha3\n+$(test_oid hash01b) $commit_sha1\n EOF\n \n cat >expect_log_y <<EOF\n@@ -95,9 +127,9 @@ test_expect_success 'setup local branch (y)' '\n '\n \n cat <<EOF | sort >expect_notes_z\n-cff59c793c20bb49a4e01bc06fb06bad642e0d54 $commit_sha4\n-283b48219aee9a4105f6cab337e789065c82c2b9 $commit_sha2\n-0a81da8956346e19bcb27a906f04af327e03e31b $commit_sha1\n+$(test_oid hash04c) $commit_sha4\n+$(test_oid hash02c) $commit_sha2\n+$(test_oid hash01c) $commit_sha1\n EOF\n \n cat >expect_log_z <<EOF\n@@ -193,9 +225,9 @@ test_expect_success 'merge z into m (== y) with default (\"manual\") resolver => C\n '\n \n cat <<EOF | sort >expect_notes_z\n-00494adecf2d9635a02fa431308d67993f853968 $commit_sha4\n-283b48219aee9a4105f6cab337e789065c82c2b9 $commit_sha2\n-0a81da8956346e19bcb27a906f04af327e03e31b $commit_sha1\n+$(test_oid hash04d) $commit_sha4\n+$(test_oid hash02c) $commit_sha2\n+$(test_oid hash01c) $commit_sha1\n EOF\n \n cat >expect_log_z <<EOF\n@@ -231,8 +263,8 @@ test_expect_success 'cannot do merge w/conflicts when previous merge is unfinish\n # Setup non-conflicting merge between x and new notes ref w\n \n cat <<EOF | sort >expect_notes_w\n-ceefa674873670e7ecd131814d909723cce2b669 $commit_sha2\n-f75d1df88cbfe4258d49852f26cfc83f2ad4494b $commit_sha1\n+$(test_oid hash02a) $commit_sha2\n+$(test_oid hash01e) $commit_sha1\n EOF\n \n cat >expect_log_w <<EOF\n@@ -258,10 +290,10 @@ test_expect_success 'setup unrelated notes ref (w)' '\n '\n \n cat <<EOF | sort >expect_notes_w\n-6e8e3febca3c2bb896704335cc4d0c34cb2f8715 $commit_sha4\n-e5388c10860456ee60673025345fe2e153eb8cf8 $commit_sha3\n-ceefa674873670e7ecd131814d909723cce2b669 $commit_sha2\n-f75d1df88cbfe4258d49852f26cfc83f2ad4494b $commit_sha1\n+$(test_oid hash04a) $commit_sha4\n+$(test_oid hash03a) $commit_sha3\n+$(test_oid hash02a) $commit_sha2\n+$(test_oid hash01e) $commit_sha1\n EOF\n \n cat >expect_log_w <<EOF\n@@ -291,10 +323,10 @@ test_expect_success 'can do merge without conflicts even if previous merge is un\n '\n \n cat <<EOF | sort >expect_notes_m\n-021faa20e931fb48986ffc6282b4bb05553ac946 $commit_sha4\n-5772f42408c0dd6f097a7ca2d24de0e78d1c46b1 $commit_sha3\n-283b48219aee9a4105f6cab337e789065c82c2b9 $commit_sha2\n-0a59e787e6d688aa6309e56e8c1b89431a0fc1c1 $commit_sha1\n+$(test_oid hash04f) $commit_sha4\n+$(test_oid hash03b) $commit_sha3\n+$(test_oid hash02c) $commit_sha2\n+$(test_oid hash01f) $commit_sha1\n EOF\n \n cat >expect_log_m <<EOF\n@@ -430,9 +462,9 @@ test_expect_success 'redo merge of z into m (== y) with default (\"manual\") resol\n '\n \n cat <<EOF | sort >expect_notes_m\n-304dfb4325cf243025b9957486eb605a9b51c199 $commit_sha5\n-283b48219aee9a4105f6cab337e789065c82c2b9 $commit_sha2\n-0a59e787e6d688aa6309e56e8c1b89431a0fc1c1 $commit_sha1\n+$(test_oid hash05g) $commit_sha5\n+$(test_oid hash02c) $commit_sha2\n+$(test_oid hash01f) $commit_sha1\n EOF\n \n cat >expect_log_m <<EOF\n"},{"id":"391298","messageId":"20200207005254.1495851-11-sandals@crustytoothpaste.net","threadId":"52756","inReplyTo":"20200207005254.1495851-1-sandals@crustytoothpaste.net","subject":"[PATCH v3 10/21] t4060: make test work with SHA-256","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2020-02-07T00:52:43Z","receivedAt":"2020-02-07T00:53:42Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"In this test, there are two main types of object IDs we see in the\ndiffs: the ones for the submodules, which we care about, and the ones\nfor the individual files, which are unrelated to what we're testing.\nMuch of the test already computes the former, so extend the rest of the\ntest to do so as well.  Add a diff comparison function that normalizes\nthe differences in the latter, since they're not explicitly what we're\ntesting.\n\nSigned-off-by: brian m. carlson <sandals@crustytoothpaste.net>\n---\n t/t4060-diff-submodule-option-diff-format.sh | 126 ++++++++++---------\n 1 file changed, 70 insertions(+), 56 deletions(-)\n\ndiff --git a/t/t4060-diff-submodule-option-diff-format.sh b/t/t4060-diff-submodule-option-diff-format.sh\nindex 9dcb69df5c..fc8229c726 100755\n--- a/t/t4060-diff-submodule-option-diff-format.sh\n+++ b/t/t4060-diff-submodule-option-diff-format.sh\n@@ -42,6 +42,17 @@ commit_file () {\n \tgit commit \"$@\" -m \"Commit $*\" >/dev/null\n }\n \n+diff_cmp () {\n+       for i in \"$1\" \"$2\"\n+       do\n+\t\tsed -e 's/^index 0000000\\.\\.[0-9a-f]*/index 0000000..1234567/' \\\n+\t\t-e 's/^index [0-9a-f]*\\.\\.[0-9a-f]*/index 1234567..89abcde/' \\\n+\t\t\"$i\" >\"$i.compare\" || return 1\n+       done &&\n+       test_cmp \"$1.compare\" \"$2.compare\" &&\n+       rm -f \"$1.compare\" \"$2.compare\"\n+}\n+\n test_expect_success 'setup repository' '\n \ttest_create_repo sm1 &&\n \tadd_file . foo &&\n@@ -69,7 +80,7 @@ test_expect_success 'added submodule' '\n \t@@ -0,0 +1 @@\n \t+foo2\n \tEOF\n-\ttest_cmp expected actual\n+\tdiff_cmp expected actual\n '\n \n test_expect_success 'added submodule, set diff.submodule' '\n@@ -93,7 +104,7 @@ test_expect_success 'added submodule, set diff.submodule' '\n \t@@ -0,0 +1 @@\n \t+foo2\n \tEOF\n-\ttest_cmp expected actual\n+\tdiff_cmp expected actual\n '\n \n test_expect_success '--submodule=short overrides diff.submodule' '\n@@ -109,7 +120,7 @@ test_expect_success '--submodule=short overrides diff.submodule' '\n \t@@ -0,0 +1 @@\n \t+Subproject commit $fullhead1\n \tEOF\n-\ttest_cmp expected actual\n+\tdiff_cmp expected actual\n '\n \n test_expect_success 'diff.submodule does not affect plumbing' '\n@@ -124,7 +135,7 @@ test_expect_success 'diff.submodule does not affect plumbing' '\n \t@@ -0,0 +1 @@\n \t+Subproject commit $fullhead1\n \tEOF\n-\ttest_cmp expected actual\n+\tdiff_cmp expected actual\n '\n \n commit_file sm1 &&\n@@ -142,7 +153,7 @@ test_expect_success 'modified submodule(forward)' '\n \t@@ -0,0 +1 @@\n \t+foo3\n \tEOF\n-\ttest_cmp expected actual\n+\tdiff_cmp expected actual\n '\n \n test_expect_success 'modified submodule(forward)' '\n@@ -157,7 +168,7 @@ test_expect_success 'modified submodule(forward)' '\n \t@@ -0,0 +1 @@\n \t+foo3\n \tEOF\n-\ttest_cmp expected actual\n+\tdiff_cmp expected actual\n '\n \n test_expect_success 'modified submodule(forward) --submodule' '\n@@ -166,7 +177,7 @@ test_expect_success 'modified submodule(forward) --submodule' '\n \tSubmodule sm1 $head1..$head2:\n \t  > Add foo3 ($added foo3)\n \tEOF\n-\ttest_cmp expected actual\n+\tdiff_cmp expected actual\n '\n \n fullhead2=$(cd sm1; git rev-parse --verify HEAD)\n@@ -181,7 +192,7 @@ test_expect_success 'modified submodule(forward) --submodule=short' '\n \t-Subproject commit $fullhead1\n \t+Subproject commit $fullhead2\n \tEOF\n-\ttest_cmp expected actual\n+\tdiff_cmp expected actual\n '\n \n commit_file sm1 &&\n@@ -210,7 +221,7 @@ test_expect_success 'modified submodule(backward)' '\n \t@@ -1 +0,0 @@\n \t-foo3\n \tEOF\n-\ttest_cmp expected actual\n+\tdiff_cmp expected actual\n '\n \n head4=$(add_file sm1 foo4 foo5)\n@@ -247,7 +258,7 @@ test_expect_success 'modified submodule(backward and forward)' '\n \t@@ -0,0 +1 @@\n \t+foo5\n \tEOF\n-\ttest_cmp expected actual\n+\tdiff_cmp expected actual\n '\n \n commit_file sm1 &&\n@@ -291,7 +302,7 @@ test_expect_success 'typechanged submodule(submodule->blob), --cached' '\n \t@@ -0,0 +1 @@\n \t+sm1\n \tEOF\n-\ttest_cmp expected actual\n+\tdiff_cmp expected actual\n '\n \n test_expect_success 'typechanged submodule(submodule->blob)' '\n@@ -327,7 +338,7 @@ test_expect_success 'typechanged submodule(submodule->blob)' '\n \t@@ -0,0 +1 @@\n \t+foo5\n \tEOF\n-\ttest_cmp expected actual\n+\tdiff_cmp expected actual\n '\n \n rm -rf sm1 &&\n@@ -344,7 +355,7 @@ test_expect_success 'typechanged submodule(submodule->blob)' '\n \t@@ -0,0 +1 @@\n \t+sm1\n \tEOF\n-\ttest_cmp expected actual\n+\tdiff_cmp expected actual\n '\n \n rm -f sm1 &&\n@@ -356,7 +367,7 @@ test_expect_success 'nonexistent commit' '\n \tcat >expected <<-EOF &&\n \tSubmodule sm1 $head4...$head6 (commits not present)\n \tEOF\n-\ttest_cmp expected actual\n+\tdiff_cmp expected actual\n '\n \n commit_file\n@@ -386,11 +397,12 @@ test_expect_success 'typechanged submodule(blob->submodule)' '\n \t@@ -0,0 +1 @@\n \t+foo7\n \tEOF\n-\ttest_cmp expected actual\n+\tdiff_cmp expected actual\n '\n \n commit_file sm1 &&\n test_expect_success 'submodule is up to date' '\n+\thead7=$(git -C sm1 rev-parse --short --verify HEAD) &&\n \tgit diff-index -p --submodule=diff HEAD >actual &&\n \ttest_must_be_empty actual\n '\n@@ -401,7 +413,7 @@ test_expect_success 'submodule contains untracked content' '\n \tcat >expected <<-EOF &&\n \tSubmodule sm1 contains untracked content\n \tEOF\n-\ttest_cmp expected actual\n+\tdiff_cmp expected actual\n '\n \n test_expect_success 'submodule contains untracked content (untracked ignored)' '\n@@ -433,7 +445,7 @@ test_expect_success 'submodule contains untracked and modified content' '\n \t-foo6\n \t+new\n \tEOF\n-\ttest_cmp expected actual\n+\tdiff_cmp expected actual\n '\n \n # NOT OK\n@@ -450,7 +462,7 @@ test_expect_success 'submodule contains untracked and modified content (untracke\n \t-foo6\n \t+new\n \tEOF\n-\ttest_cmp expected actual\n+\tdiff_cmp expected actual\n '\n \n test_expect_success 'submodule contains untracked and modified content (dirty ignored)' '\n@@ -478,7 +490,7 @@ test_expect_success 'submodule contains modified content' '\n \t-foo6\n \t+new\n \tEOF\n-\ttest_cmp expected actual\n+\tdiff_cmp expected actual\n '\n \n (cd sm1; git commit -mchange foo6 >/dev/null) &&\n@@ -486,7 +498,7 @@ head8=$(cd sm1; git rev-parse --short --verify HEAD) &&\n test_expect_success 'submodule is modified' '\n \tgit diff-index -p --submodule=diff HEAD >actual &&\n \tcat >expected <<-EOF &&\n-\tSubmodule sm1 17243c9..$head8:\n+\tSubmodule sm1 $head7..$head8:\n \tdiff --git a/sm1/foo6 b/sm1/foo6\n \tindex 462398b..3e75765 100644\n \t--- a/sm1/foo6\n@@ -495,7 +507,7 @@ test_expect_success 'submodule is modified' '\n \t-foo6\n \t+new\n \tEOF\n-\ttest_cmp expected actual\n+\tdiff_cmp expected actual\n '\n \n test_expect_success 'modified submodule contains untracked content' '\n@@ -503,7 +515,7 @@ test_expect_success 'modified submodule contains untracked content' '\n \tgit diff-index -p --submodule=diff HEAD >actual &&\n \tcat >expected <<-EOF &&\n \tSubmodule sm1 contains untracked content\n-\tSubmodule sm1 17243c9..$head8:\n+\tSubmodule sm1 $head7..$head8:\n \tdiff --git a/sm1/foo6 b/sm1/foo6\n \tindex 462398b..3e75765 100644\n \t--- a/sm1/foo6\n@@ -512,13 +524,13 @@ test_expect_success 'modified submodule contains untracked content' '\n \t-foo6\n \t+new\n \tEOF\n-\ttest_cmp expected actual\n+\tdiff_cmp expected actual\n '\n \n test_expect_success 'modified submodule contains untracked content (untracked ignored)' '\n \tgit diff-index -p --ignore-submodules=untracked --submodule=diff HEAD >actual &&\n \tcat >expected <<-EOF &&\n-\tSubmodule sm1 17243c9..$head8:\n+\tSubmodule sm1 $head7..$head8:\n \tdiff --git a/sm1/foo6 b/sm1/foo6\n \tindex 462398b..3e75765 100644\n \t--- a/sm1/foo6\n@@ -527,13 +539,13 @@ test_expect_success 'modified submodule contains untracked content (untracked ig\n \t-foo6\n \t+new\n \tEOF\n-\ttest_cmp expected actual\n+\tdiff_cmp expected actual\n '\n \n test_expect_success 'modified submodule contains untracked content (dirty ignored)' '\n \tgit diff-index -p --ignore-submodules=dirty --submodule=diff HEAD >actual &&\n \tcat >expected <<-EOF &&\n-\tSubmodule sm1 17243c9..cfce562:\n+\tSubmodule sm1 $head7..$head8:\n \tdiff --git a/sm1/foo6 b/sm1/foo6\n \tindex 462398b..3e75765 100644\n \t--- a/sm1/foo6\n@@ -542,7 +554,7 @@ test_expect_success 'modified submodule contains untracked content (dirty ignore\n \t-foo6\n \t+new\n \tEOF\n-\ttest_cmp expected actual\n+\tdiff_cmp expected actual\n '\n \n test_expect_success 'modified submodule contains untracked content (all ignored)' '\n@@ -556,7 +568,7 @@ test_expect_success 'modified submodule contains untracked and modified content'\n \tcat >expected <<-EOF &&\n \tSubmodule sm1 contains untracked content\n \tSubmodule sm1 contains modified content\n-\tSubmodule sm1 17243c9..cfce562:\n+\tSubmodule sm1 $head7..$head8:\n \tdiff --git a/sm1/foo6 b/sm1/foo6\n \tindex 462398b..dfda541 100644\n \t--- a/sm1/foo6\n@@ -566,7 +578,7 @@ test_expect_success 'modified submodule contains untracked and modified content'\n \t+new\n \t+modification\n \tEOF\n-\ttest_cmp expected actual\n+\tdiff_cmp expected actual\n '\n \n test_expect_success 'modified submodule contains untracked and modified content (untracked ignored)' '\n@@ -574,7 +586,7 @@ test_expect_success 'modified submodule contains untracked and modified content\n \tgit diff-index -p --ignore-submodules=untracked --submodule=diff HEAD >actual &&\n \tcat >expected <<-EOF &&\n \tSubmodule sm1 contains modified content\n-\tSubmodule sm1 17243c9..cfce562:\n+\tSubmodule sm1 $head7..$head8:\n \tdiff --git a/sm1/foo6 b/sm1/foo6\n \tindex 462398b..e20e2d9 100644\n \t--- a/sm1/foo6\n@@ -585,14 +597,14 @@ test_expect_success 'modified submodule contains untracked and modified content\n \t+modification\n \t+modification\n \tEOF\n-\ttest_cmp expected actual\n+\tdiff_cmp expected actual\n '\n \n test_expect_success 'modified submodule contains untracked and modified content (dirty ignored)' '\n \techo modification >> sm1/foo6 &&\n \tgit diff-index -p --ignore-submodules=dirty --submodule=diff HEAD >actual &&\n \tcat >expected <<-EOF &&\n-\tSubmodule sm1 17243c9..cfce562:\n+\tSubmodule sm1 $head7..$head8:\n \tdiff --git a/sm1/foo6 b/sm1/foo6\n \tindex 462398b..3e75765 100644\n \t--- a/sm1/foo6\n@@ -601,7 +613,7 @@ test_expect_success 'modified submodule contains untracked and modified content\n \t-foo6\n \t+new\n \tEOF\n-\ttest_cmp expected actual\n+\tdiff_cmp expected actual\n '\n \n test_expect_success 'modified submodule contains untracked and modified content (all ignored)' '\n@@ -616,7 +628,7 @@ test_expect_success 'modified submodule contains modified content' '\n \tgit diff-index -p --submodule=diff HEAD >actual &&\n \tcat >expected <<-EOF &&\n \tSubmodule sm1 contains modified content\n-\tSubmodule sm1 17243c9..cfce562:\n+\tSubmodule sm1 $head7..$head8:\n \tdiff --git a/sm1/foo6 b/sm1/foo6\n \tindex 462398b..ac466ca 100644\n \t--- a/sm1/foo6\n@@ -629,29 +641,29 @@ test_expect_success 'modified submodule contains modified content' '\n \t+modification\n \t+modification\n \tEOF\n-\ttest_cmp expected actual\n+\tdiff_cmp expected actual\n '\n \n rm -rf sm1\n test_expect_success 'deleted submodule' '\n \tgit diff-index -p --submodule=diff HEAD >actual &&\n \tcat >expected <<-EOF &&\n-\tSubmodule sm1 17243c9...0000000 (submodule deleted)\n+\tSubmodule sm1 $head7...0000000 (submodule deleted)\n \tEOF\n-\ttest_cmp expected actual\n+\tdiff_cmp expected actual\n '\n \n test_expect_success 'create second submodule' '\n \ttest_create_repo sm2 &&\n-\thead7=$(add_file sm2 foo8 foo9) &&\n+\thead9=$(add_file sm2 foo8 foo9) &&\n \tgit add sm2\n '\n \n test_expect_success 'multiple submodules' '\n \tgit diff-index -p --submodule=diff HEAD >actual &&\n \tcat >expected <<-EOF &&\n-\tSubmodule sm1 17243c9...0000000 (submodule deleted)\n-\tSubmodule sm2 0000000...a5a65c9 (new submodule)\n+\tSubmodule sm1 $head7...0000000 (submodule deleted)\n+\tSubmodule sm2 0000000...$head9 (new submodule)\n \tdiff --git a/sm2/foo8 b/sm2/foo8\n \tnew file mode 100644\n \tindex 0000000..db9916b\n@@ -667,13 +679,13 @@ test_expect_success 'multiple submodules' '\n \t@@ -0,0 +1 @@\n \t+foo9\n \tEOF\n-\ttest_cmp expected actual\n+\tdiff_cmp expected actual\n '\n \n test_expect_success 'path filter' '\n \tgit diff-index -p --submodule=diff HEAD sm2 >actual &&\n \tcat >expected <<-EOF &&\n-\tSubmodule sm2 0000000...a5a65c9 (new submodule)\n+\tSubmodule sm2 0000000...$head9 (new submodule)\n \tdiff --git a/sm2/foo8 b/sm2/foo8\n \tnew file mode 100644\n \tindex 0000000..db9916b\n@@ -689,15 +701,15 @@ test_expect_success 'path filter' '\n \t@@ -0,0 +1 @@\n \t+foo9\n \tEOF\n-\ttest_cmp expected actual\n+\tdiff_cmp expected actual\n '\n \n commit_file sm2\n test_expect_success 'given commit' '\n \tgit diff-index -p --submodule=diff HEAD^ >actual &&\n \tcat >expected <<-EOF &&\n-\tSubmodule sm1 17243c9...0000000 (submodule deleted)\n-\tSubmodule sm2 0000000...a5a65c9 (new submodule)\n+\tSubmodule sm1 $head7...0000000 (submodule deleted)\n+\tSubmodule sm2 0000000...$head9 (new submodule)\n \tdiff --git a/sm2/foo8 b/sm2/foo8\n \tnew file mode 100644\n \tindex 0000000..db9916b\n@@ -713,7 +725,7 @@ test_expect_success 'given commit' '\n \t@@ -0,0 +1 @@\n \t+foo9\n \tEOF\n-\ttest_cmp expected actual\n+\tdiff_cmp expected actual\n '\n \n test_expect_success 'setup .git file for sm2' '\n@@ -726,8 +738,8 @@ test_expect_success 'setup .git file for sm2' '\n test_expect_success 'diff --submodule=diff with .git file' '\n \tgit diff --submodule=diff HEAD^ >actual &&\n \tcat >expected <<-EOF &&\n-\tSubmodule sm1 17243c9...0000000 (submodule deleted)\n-\tSubmodule sm2 0000000...a5a65c9 (new submodule)\n+\tSubmodule sm1 $head7...0000000 (submodule deleted)\n+\tSubmodule sm2 0000000...$head9 (new submodule)\n \tdiff --git a/sm2/foo8 b/sm2/foo8\n \tnew file mode 100644\n \tindex 0000000..db9916b\n@@ -743,25 +755,27 @@ test_expect_success 'diff --submodule=diff with .git file' '\n \t@@ -0,0 +1 @@\n \t+foo9\n \tEOF\n-\ttest_cmp expected actual\n+\tdiff_cmp expected actual\n '\n \n test_expect_success 'setup nested submodule' '\n \tgit submodule add -f ./sm2 &&\n \tgit commit -a -m \"add sm2\" &&\n \tgit -C sm2 submodule add ../sm2 nested &&\n-\tgit -C sm2 commit -a -m \"nested sub\"\n+\tgit -C sm2 commit -a -m \"nested sub\" &&\n+\thead10=$(git -C sm2 rev-parse --short --verify HEAD)\n '\n \n test_expect_success 'move nested submodule HEAD' '\n \techo \"nested content\" >sm2/nested/file &&\n \tgit -C sm2/nested add file &&\n-\tgit -C sm2/nested commit --allow-empty -m \"new HEAD\"\n+\tgit -C sm2/nested commit --allow-empty -m \"new HEAD\" &&\n+\thead11=$(git -C sm2/nested rev-parse --short --verify HEAD)\n '\n \n test_expect_success 'diff --submodule=diff with moved nested submodule HEAD' '\n \tcat >expected <<-EOF &&\n-\tSubmodule nested a5a65c9..b55928c:\n+\tSubmodule nested $head9..$head11:\n \tdiff --git a/nested/file b/nested/file\n \tnew file mode 100644\n \tindex 0000000..ca281f5\n@@ -772,13 +786,13 @@ test_expect_success 'diff --submodule=diff with moved nested submodule HEAD' '\n \tEOF\n \tgit -C sm2 diff --submodule=diff >actual 2>err &&\n \ttest_must_be_empty err &&\n-\ttest_cmp expected actual\n+\tdiff_cmp expected actual\n '\n \n test_expect_success 'diff --submodule=diff recurses into nested submodules' '\n \tcat >expected <<-EOF &&\n \tSubmodule sm2 contains modified content\n-\tSubmodule sm2 a5a65c9..280969a:\n+\tSubmodule sm2 $head9..$head10:\n \tdiff --git a/sm2/.gitmodules b/sm2/.gitmodules\n \tnew file mode 100644\n \tindex 0000000..3a816b8\n@@ -788,7 +802,7 @@ test_expect_success 'diff --submodule=diff recurses into nested submodules' '\n \t+[submodule \"nested\"]\n \t+\tpath = nested\n \t+\turl = ../sm2\n-\tSubmodule nested 0000000...b55928c (new submodule)\n+\tSubmodule nested 0000000...$head11 (new submodule)\n \tdiff --git a/sm2/nested/file b/sm2/nested/file\n \tnew file mode 100644\n \tindex 0000000..ca281f5\n@@ -813,7 +827,7 @@ test_expect_success 'diff --submodule=diff recurses into nested submodules' '\n \tEOF\n \tgit diff --submodule=diff >actual 2>err &&\n \ttest_must_be_empty err &&\n-\ttest_cmp expected actual\n+\tdiff_cmp expected actual\n '\n \n test_done\n"},{"id":"391299","messageId":"20200207005254.1495851-12-sandals@crustytoothpaste.net","threadId":"52756","inReplyTo":"20200207005254.1495851-1-sandals@crustytoothpaste.net","subject":"[PATCH v3 11/21] t5302: make hash size independent","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2020-02-07T00:52:44Z","receivedAt":"2020-02-07T00:53:44Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"Compute the length of object IDs and pack offsets instead of hard-coding\nconstants.\n\nSigned-off-by: brian m. carlson <sandals@crustytoothpaste.net>\n---\n t/t5302-pack-index.sh | 21 ++++++++++++---------\n 1 file changed, 12 insertions(+), 9 deletions(-)\n\ndiff --git a/t/t5302-pack-index.sh b/t/t5302-pack-index.sh\nindex 91d51b35f9..ad07f2f7fc 100755\n--- a/t/t5302-pack-index.sh\n+++ b/t/t5302-pack-index.sh\n@@ -6,9 +6,10 @@\n test_description='pack index with 64-bit offsets and object CRC'\n . ./test-lib.sh\n \n-test_expect_success \\\n-    'setup' \\\n-    'rm -rf .git &&\n+test_expect_success 'setup' '\n+     test_oid_init &&\n+     rawsz=$(test_oid rawsz) &&\n+     rm -rf .git &&\n      git init &&\n      git config pack.threads 1 &&\n      i=1 &&\n@@ -32,7 +33,8 @@ test_expect_success \\\n \t echo $tree &&\n \t git ls-tree $tree | sed -e \"s/.* \\\\([0-9a-f]*\\\\)\t.*/\\\\1/\"\n      } >obj-list &&\n-     git update-ref HEAD $commit'\n+     git update-ref HEAD $commit\n+'\n \n test_expect_success \\\n     'pack-objects with index version 1' \\\n@@ -157,10 +159,11 @@ test_expect_success \\\n      offs_101=$(index_obj_offset 1.idx $sha1_101) &&\n      nr_099=$(index_obj_nr 1.idx $sha1_099) &&\n      chmod +w \".git/objects/pack/pack-${pack1}.pack\" &&\n+     recordsz=$((rawsz + 4)) &&\n      dd of=\".git/objects/pack/pack-${pack1}.pack\" seek=$(($offs_101 + 1)) \\\n         if=\".git/objects/pack/pack-${pack1}.idx\" \\\n-        skip=$((4 + 256 * 4 + $nr_099 * 24)) \\\n-        bs=1 count=20 conv=notrunc &&\n+        skip=$((4 + 256 * 4 + $nr_099 * recordsz)) \\\n+        bs=1 count=$rawsz conv=notrunc &&\n      git cat-file blob $sha1_101 > file_101_foo1'\n \n test_expect_success \\\n@@ -200,8 +203,8 @@ test_expect_success \\\n      chmod +w \".git/objects/pack/pack-${pack1}.pack\" &&\n      dd of=\".git/objects/pack/pack-${pack1}.pack\" seek=$(($offs_101 + 1)) \\\n         if=\".git/objects/pack/pack-${pack1}.idx\" \\\n-        skip=$((8 + 256 * 4 + $nr_099 * 20)) \\\n-        bs=1 count=20 conv=notrunc &&\n+        skip=$((8 + 256 * 4 + $nr_099 * rawsz)) \\\n+        bs=1 count=$rawsz conv=notrunc &&\n      git cat-file blob $sha1_101 > file_101_foo2'\n \n test_expect_success \\\n@@ -226,7 +229,7 @@ test_expect_success \\\n      nr=$(index_obj_nr \".git/objects/pack/pack-${pack1}.idx\" $obj) &&\n      chmod +w \".git/objects/pack/pack-${pack1}.idx\" &&\n      printf xxxx | dd of=\".git/objects/pack/pack-${pack1}.idx\" conv=notrunc \\\n-        bs=1 count=4 seek=$((8 + 256 * 4 + $(wc -l <obj-list) * 20 + $nr * 4)) &&\n+        bs=1 count=4 seek=$((8 + 256 * 4 + $(wc -l <obj-list) * rawsz + $nr * 4)) &&\n      ( while read obj\n        do git cat-file -p $obj >/dev/null || exit 1\n        done <obj-list ) &&\n"},{"id":"391300","messageId":"20200207005254.1495851-16-sandals@crustytoothpaste.net","threadId":"52756","inReplyTo":"20200207005254.1495851-1-sandals@crustytoothpaste.net","subject":"[PATCH v3 15/21] t5515: make test hash independent","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2020-02-07T00:52:48Z","receivedAt":"2020-02-07T00:53:46Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"This test contains a large number of data files, mostly using the same\nobject ID values for refs. Instead of producing two separate sets of\ntest files, keep the test files using SHA-1 and translate them on the\nfly by replacing the SHA-1 values with the values for the current hash\nalgorithm in use.\n\nSigned-off-by: brian m. carlson <sandals@crustytoothpaste.net>\n---\n t/t5515-fetch-merge-logic.sh | 59 +++++++++++++++++++++++++++++++++---\n 1 file changed, 54 insertions(+), 5 deletions(-)\n\ndiff --git a/t/t5515-fetch-merge-logic.sh b/t/t5515-fetch-merge-logic.sh\nindex 961eb35c99..b1582a625f 100755\n--- a/t/t5515-fetch-merge-logic.sh\n+++ b/t/t5515-fetch-merge-logic.sh\n@@ -12,11 +12,55 @@ GIT_TEST_PROTOCOL_VERSION=\n \n . ./test-lib.sh\n \n+build_script () {\n+\tscript=\"$1\" &&\n+\tfor i in one three_file master master2 one_tree three two two2 three2\n+\tdo\n+\t\techo \"s/$(test_oid --hash=sha1 \"$i\")/$(test_oid \"$i\")/g\" >>\"$script\"\n+\tdone\n+}\n+\n+convert_expected () {\n+\tfile=\"$1\" &&\n+\tscript=\"$2\" &&\n+\tsed -f \"$script\" \"$file\" >\"$file.tmp\" &&\n+\tmv \"$file.tmp\" \"$file\"\n+}\n+\n test_expect_success setup '\n \tGIT_AUTHOR_DATE=\"2006-06-26 00:00:00 +0000\" &&\n \tGIT_COMMITTER_DATE=\"2006-06-26 00:00:00 +0000\" &&\n \texport GIT_AUTHOR_DATE GIT_COMMITTER_DATE &&\n \n+\ttest_oid_cache <<-EOF &&\n+\tone sha1:8e32a6d901327a23ef831511badce7bf3bf46689\n+\tone sha256:8739546433ab1ac72ee93088dce611210effee072b2b586ceac6dde43ebec9ce\n+\n+\tthree_file sha1:0e3b14047d3ee365f4f2a1b673db059c3972589c\n+\tthree_file sha256:bc4447d50c07497a8bfe6eef817f2364ecca9d471452e43b52756cc1a908bd32\n+\n+\tmaster sha1:6c9dec2b923228c9ff994c6cfe4ae16c12408dc5\n+\tmaster sha256:8521c3072461fcfe8f32d67f95cc6e6b832a2db2fa29769ffc788bce85ebcd75\n+\n+\tone_tree sha1:22feea448b023a2d864ef94b013735af34d238ba\n+\tone_tree sha256:6e4743f4ef2356b881dda5e91f5c7cdffe870faf350bf7b312f80a20935f5d83\n+\n+\tthree sha1:c61a82b60967180544e3c19f819ddbd0c9f89899\n+\tthree sha256:0cc6d1eda617ded715170786e31ba4e2d0185404ec5a3508dd0d73b324860c6a\n+\n+\ttwo sha1:525b7fb068d59950d185a8779dc957c77eed73ba\n+\ttwo sha256:3b21de3440cd38c2a9e9b464adb923f7054949ed4c918e1a0ac4c95cd52774db\n+\n+\tmaster2 sha1:754b754407bf032e9a2f9d5a9ad05ca79a6b228f\n+\tmaster2 sha256:6c7abaea8a6d8ef4d89877e68462758dc6774690fbbbb0e6d7dd57415c9abde0\n+\n+\ttwo2 sha1:6134ee8f857693b96ff1cc98d3e2fd62b199e5a8\n+\ttwo2 sha256:87a2d3ee29c83a3dc7afd41c0606b11f67603120b910a7be7840accdc18344d4\n+\n+\tthree2 sha1:0567da4d5edd2ff4bb292a465ba9e64dcad9536b\n+\tthree2 sha256:cceb3e8eca364fa9a0a39a1efbebecacc664af86cbbd8070571f5faeb5f0e8c3\n+\tEOF\n+\n \techo >file original &&\n \tgit add file &&\n \tgit commit -a -m One &&\n@@ -86,7 +130,8 @@ test_expect_success setup '\n \t\tgit config branch.br-$remote-octopus.remote $remote &&\n \t\tgit config branch.br-$remote-octopus.merge refs/heads/one &&\n \t\tgit config --add branch.br-$remote-octopus.merge two\n-\tdone\n+\tdone &&\n+\tbuild_script sed_script\n '\n \n # Merge logic depends on branch properties and Pull: or .fetch lines\n@@ -137,6 +182,10 @@ do\n \tactual_r=\"$pfx-refs.$test\"\n \n \ttest_expect_success \"$cmd\" '\n+\t\tcp \"$expect_f\" expect_f &&\n+\t\tconvert_expected expect_f sed_script &&\n+\t\tcp \"$expect_r\" expect_r &&\n+\t\tconvert_expected expect_r sed_script &&\n \t\t{\n \t\t\techo \"# $cmd\"\n \t\t\tset x $cmd; shift\n@@ -152,18 +201,18 @@ do\n \t\t\tcat .git/FETCH_HEAD\n \t\t} >\"$actual_f\" &&\n \t\tgit show-ref >\"$actual_r\" &&\n-\t\tif test -f \"$expect_f\"\n+\t\tif test -f \"expect_f\"\n \t\tthen\n-\t\t\ttest_cmp \"$expect_f\" \"$actual_f\" &&\n+\t\t\ttest_cmp \"expect_f\" \"$actual_f\" &&\n \t\t\trm -f \"$actual_f\"\n \t\telse\n \t\t\t# this is to help developing new tests.\n \t\t\tcp \"$actual_f\" \"$expect_f\"\n \t\t\tfalse\n \t\tfi &&\n-\t\tif test -f \"$expect_r\"\n+\t\tif test -f \"expect_r\"\n \t\tthen\n-\t\t\ttest_cmp \"$expect_r\" \"$actual_r\" &&\n+\t\t\ttest_cmp \"expect_r\" \"$actual_r\" &&\n \t\t\trm -f \"$actual_r\"\n \t\telse\n \t\t\t# this is to help developing new tests.\n"},{"id":"391301","messageId":"20200207005254.1495851-21-sandals@crustytoothpaste.net","threadId":"52756","inReplyTo":"20200207005254.1495851-1-sandals@crustytoothpaste.net","subject":"[PATCH v3 20/21] t6006: make hash size independent","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2020-02-07T00:52:53Z","receivedAt":"2020-02-07T00:53:47Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"Instead of hard-coding the length of an object ID when creating a tree,\ncompute it for the hash in use using the translation tables.\n\nSigned-off-by: brian m. carlson <sandals@crustytoothpaste.net>\n---\n t/t6006-rev-list-format.sh | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh\nindex ebdc49c496..7e82e43a63 100755\n--- a/t/t6006-rev-list-format.sh\n+++ b/t/t6006-rev-list-format.sh\n@@ -32,6 +32,7 @@ changed_iso88591=$(echo \"$changed\" | iconv -f utf-8 -t $test_encoding)\n truncate_count=20\n \n test_expect_success 'setup' '\n+\ttest_oid_init &&\n \t: >foo &&\n \tgit add foo &&\n \tgit config i18n.commitEncoding $test_encoding &&\n@@ -463,9 +464,10 @@ test_expect_success '--abbrev' '\n '\n \n test_expect_success '%H is not affected by --abbrev-commit' '\n+\texpected=$(($(test_oid hexsz) + 1)) &&\n \tgit log -1 --format=%H --abbrev-commit --abbrev=20 HEAD >actual &&\n \tlen=$(wc -c <actual) &&\n-\ttest $len = 41\n+\ttest $len = $expected\n '\n \n test_expect_success '%h is not affected by --abbrev-commit' '\n"},{"id":"391302","messageId":"20200207005254.1495851-19-sandals@crustytoothpaste.net","threadId":"52756","inReplyTo":"20200207005254.1495851-1-sandals@crustytoothpaste.net","subject":"[PATCH v3 18/21] t5703: make test work with SHA-256","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2020-02-07T00:52:51Z","receivedAt":"2020-02-07T00:53:48Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"This test used an object ID which was 40 hex characters in length,\ncausing the test not only not to pass, but to hang, when run with\nSHA-256 as the hash.  Change this value to a fixed dummy object ID using\ntest_oid_init and test_oid.\n\nFurthermore, ensure we extract an object ID of the appropriate length\nusing cut with fields instead of a fixed length.\n\nSigned-off-by: brian m. carlson <sandals@crustytoothpaste.net>\n---\n t/t5703-upload-pack-ref-in-want.sh | 7 ++++---\n 1 file changed, 4 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t5703-upload-pack-ref-in-want.sh b/t/t5703-upload-pack-ref-in-want.sh\nindex 1424fabd4a..8aeeaac509 100755\n--- a/t/t5703-upload-pack-ref-in-want.sh\n+++ b/t/t5703-upload-pack-ref-in-want.sh\n@@ -19,7 +19,7 @@ get_actual_commits () {\n \t\t}' <out | test-tool pkt-line unpack-sideband >o.pack &&\n \tgit index-pack o.pack &&\n \tgit verify-pack -v o.idx >objs &&\n-\tgrep commit objs | cut -c-40 | sort >actual_commits\n+\tgrep commit objs | cut -d\" \" -f1 | sort >actual_commits\n }\n \n check_output () {\n@@ -37,6 +37,7 @@ check_output () {\n #             \\ | /\n #               a\n test_expect_success 'setup repository' '\n+\ttest_oid_init &&\n \ttest_commit a &&\n \tgit checkout -b o/foo &&\n \ttest_commit b &&\n@@ -333,7 +334,7 @@ test_expect_success 'server is initially ahead - no ref in want' '\n \tgit -C \"$REPO\" config uploadpack.allowRefInWant false &&\n \trm -rf local &&\n \tcp -r \"$LOCAL_PRISTINE\" local &&\n-\tinconsistency master 1234567890123456789012345678901234567890 &&\n+\tinconsistency master $(test_oid numeric) &&\n \ttest_must_fail git -C local fetch 2>err &&\n \ttest_i18ngrep \"fatal: remote error: upload-pack: not our ref\" err\n '\n@@ -342,7 +343,7 @@ test_expect_success 'server is initially ahead - ref in want' '\n \tgit -C \"$REPO\" config uploadpack.allowRefInWant true &&\n \trm -rf local &&\n \tcp -r \"$LOCAL_PRISTINE\" local &&\n-\tinconsistency master 1234567890123456789012345678901234567890 &&\n+\tinconsistency master $(test_oid numeric) &&\n \tgit -C local fetch &&\n \n \tgit -C \"$REPO\" rev-parse --verify master >expected &&\n"},{"id":"391303","messageId":"20200207005254.1495851-22-sandals@crustytoothpaste.net","threadId":"52756","inReplyTo":"20200207005254.1495851-1-sandals@crustytoothpaste.net","subject":"[PATCH v3 21/21] t6024: update for SHA-256","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2020-02-07T00:52:54Z","receivedAt":"2020-02-07T00:53:49Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"To make this test work with SHA-256, compute two of the items in the\nconflicted index entry.  The other entry is a conflict within a conflict\nand computing it is difficult, so use test_oid_cache to specify the\nproper values for both hash algorithms.\n\nSigned-off-by: brian m. carlson <sandals@crustytoothpaste.net>\n---\n t/t6024-recursive-merge.sh | 15 ++++++++++-----\n 1 file changed, 10 insertions(+), 5 deletions(-)\n\ndiff --git a/t/t6024-recursive-merge.sh b/t/t6024-recursive-merge.sh\nindex 0c9e3c20e8..332cfc53fd 100755\n--- a/t/t6024-recursive-merge.sh\n+++ b/t/t6024-recursive-merge.sh\n@@ -57,7 +57,12 @@ test_expect_success 'setup tests' '\n \tgit rev-parse C >.git/MERGE_HEAD &&\n \techo F >a1 &&\n \tgit update-index a1 &&\n-\tGIT_AUTHOR_DATE=\"2006-12-12 23:00:08\" git commit -m F\n+\tGIT_AUTHOR_DATE=\"2006-12-12 23:00:08\" git commit -m F &&\n+\n+\ttest_oid_cache <<-EOF\n+\tidxstage1 sha1:ec3fe2a791706733f2d8fa7ad45d9a9672031f5e\n+\tidxstage1 sha256:b3c8488929903aaebdeb22270cb6d36e5b8724b01ae0d4da24632f158c99676f\n+\tEOF\n '\n \n test_expect_success 'combined merge conflicts' '\n@@ -79,10 +84,10 @@ test_expect_success 'result contains a conflict' '\n test_expect_success 'virtual trees were processed' '\n \tgit ls-files --stage >out &&\n \n-\tcat >expect <<-\\EOF &&\n-\t100644 ec3fe2a791706733f2d8fa7ad45d9a9672031f5e 1\ta1\n-\t100644 cf84443e49e1b366fac938711ddf4be2d4d1d9e9 2\ta1\n-\t100644 fd7923529855d0b274795ae3349c5e0438333979 3\ta1\n+\tcat >expect <<-EOF &&\n+\t100644 $(test_oid idxstage1) 1\ta1\n+\t100644 $(git rev-parse F:a1) 2\ta1\n+\t100644 $(git rev-parse G:a1) 3\ta1\n \tEOF\n \n \ttest_cmp expect out\n"},{"id":"391304","messageId":"20200207005254.1495851-15-sandals@crustytoothpaste.net","threadId":"52756","inReplyTo":"20200207005254.1495851-1-sandals@crustytoothpaste.net","subject":"[PATCH v3 14/21] t5321: make test hash independent","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2020-02-07T00:52:47Z","receivedAt":"2020-02-07T00:53:50Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"Use the proper pack constants defined in lib-pack.sh to make this test\nwork with SHA-256.\n\nSigned-off-by: brian m. carlson <sandals@crustytoothpaste.net>\n---\n t/t5321-pack-large-objects.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t5321-pack-large-objects.sh b/t/t5321-pack-large-objects.sh\nindex a75eab87d3..8a56d98a0e 100755\n--- a/t/t5321-pack-large-objects.sh\n+++ b/t/t5321-pack-large-objects.sh\n@@ -10,8 +10,8 @@ test_description='git pack-object with \"large\" deltas\n . \"$TEST_DIRECTORY\"/lib-pack.sh\n \n # Two similar-ish objects that we have computed deltas between.\n-A=01d7713666f4de822776c7622c10f1b07de280dc\n-B=e68fe8129b546b101aee9510c5328e7f21ca1d18\n+A=$(test_oid packlib_7_0)\n+B=$(test_oid packlib_7_76)\n \n test_expect_success 'setup' '\n \tclear_packs &&\n"},{"id":"391305","messageId":"20200207005254.1495851-20-sandals@crustytoothpaste.net","threadId":"52756","inReplyTo":"20200207005254.1495851-1-sandals@crustytoothpaste.net","subject":"[PATCH v3 19/21] t6000: abstract away SHA-1-specific constants","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2020-02-07T00:52:52Z","receivedAt":"2020-02-07T00:53:52Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"Adjust the test so that it computes variables for object IDs instead of\nusing hard-coded hashes.\n\nSigned-off-by: brian m. carlson <sandals@crustytoothpaste.net>\n---\n t/t6000-rev-list-misc.sh | 13 ++++++++-----\n 1 file changed, 8 insertions(+), 5 deletions(-)\n\ndiff --git a/t/t6000-rev-list-misc.sh b/t/t6000-rev-list-misc.sh\nindex b8cf82349b..a0baf9ee43 100755\n--- a/t/t6000-rev-list-misc.sh\n+++ b/t/t6000-rev-list-misc.sh\n@@ -104,13 +104,16 @@ test_expect_success 'rev-list can show index objects' '\n \t#   - we do not show the root tree; since we updated the index, it\n \t#     does not have a valid cache tree\n \t#\n-\tcat >expect <<-\\EOF &&\n-\t8e4020bb5a8d8c873b25de15933e75cc0fc275df one\n-\td9d3a7417b9605cfd88ee6306b28dadc29e6ab08 only-in-index\n-\t9200b628cf9dc883a85a7abc8d6e6730baee589c two\n-\tEOF\n \techo only-in-index >only-in-index &&\n \ttest_when_finished \"git reset --hard\" &&\n+\trev1=$(git rev-parse HEAD:one) &&\n+\trev2=$(git rev-parse HEAD:two) &&\n+\trevi=$(git hash-object only-in-index) &&\n+\tcat >expect <<-EOF &&\n+\t$rev1 one\n+\t$revi only-in-index\n+\t$rev2 two\n+\tEOF\n \tgit add only-in-index &&\n \tgit rev-list --objects --indexed-objects >actual &&\n \ttest_cmp expect actual\n"},{"id":"391306","messageId":"20200207005254.1495851-18-sandals@crustytoothpaste.net","threadId":"52756","inReplyTo":"20200207005254.1495851-1-sandals@crustytoothpaste.net","subject":"[PATCH v3 17/21] t5607: make hash size independent","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2020-02-07T00:52:50Z","receivedAt":"2020-02-07T00:53:52Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"Use $OID_REGEX instead of a hard-coded regular expression.\n\nSigned-off-by: brian m. carlson <sandals@crustytoothpaste.net>\n---\n t/t5607-clone-bundle.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t5607-clone-bundle.sh b/t/t5607-clone-bundle.sh\nindex b7a3fdf02d..9108ff6fbd 100755\n--- a/t/t5607-clone-bundle.sh\n+++ b/t/t5607-clone-bundle.sh\n@@ -64,7 +64,7 @@ test_expect_success 'ridiculously long subject in boundary' '\n \ttest -s heads &&\n \tgit fetch long-subject-bundle.bdl &&\n \tsed -n \"/^-/{p;q;}\" long-subject-bundle.bdl >boundary &&\n-\tgrep \"^-[0-9a-f]\\\\{40\\\\} \" boundary\n+\tgrep \"^-$OID_REGEX \" boundary\n '\n \n test_expect_success 'prerequisites with an empty commit message' '\n"},{"id":"391307","messageId":"20200207005254.1495851-14-sandals@crustytoothpaste.net","threadId":"52756","inReplyTo":"20200207005254.1495851-1-sandals@crustytoothpaste.net","subject":"[PATCH v3 13/21] t5313: make test hash independent","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2020-02-07T00:52:46Z","receivedAt":"2020-02-07T00:53:54Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"Make this test hash independent by computing the length of the object\noffsets and looking up values which will hash to object IDs with the\nright properties.\n\nSigned-off-by: brian m. carlson <sandals@crustytoothpaste.net>\n---\n t/t5313-pack-bounds-checks.sh | 19 +++++++++++++++----\n 1 file changed, 15 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t5313-pack-bounds-checks.sh b/t/t5313-pack-bounds-checks.sh\nindex f1708d415e..2a4557efc2 100755\n--- a/t/t5313-pack-bounds-checks.sh\n+++ b/t/t5313-pack-bounds-checks.sh\n@@ -38,16 +38,27 @@ munge () {\n # for the initial, and another ofs(4*nr) past that for the extended.\n #\n ofs_table () {\n-\techo $((4 + 4 + 4*256 + 20*$1 + 4*$1))\n+\techo $((4 + 4 + 4*256 + $(test_oid rawsz)*$1 + 4*$1))\n }\n extended_table () {\n \techo $(($(ofs_table \"$1\") + 4*$1))\n }\n \n+test_expect_success 'setup' '\n+\ttest_oid_init &&\n+\ttest_oid_cache <<-EOF\n+\toid000 sha1:1485\n+\toid000 sha256:4222\n+\n+\toidfff sha1:74\n+\toidfff sha256:1350\n+\tEOF\n+'\n+\n test_expect_success 'set up base packfile and variables' '\n \t# the hash of this content starts with ff, which\n \t# makes some later computations much simpler\n-\techo 74 >file &&\n+\techo $(test_oid oidfff) >file &&\n \tgit add file &&\n \tgit commit -m base &&\n \tgit repack -ad &&\n@@ -140,10 +151,10 @@ test_expect_success 'bogus offset inside v2 extended table' '\n \t# an extended table (if the first object were larger than 2^31).\n \t#\n \t# Note that the value is important here. We want $object as\n-\t# the second entry in sorted-sha1 order. The sha1 of 1485 starts\n+\t# the second entry in sorted-hash order. The hash of this object starts\n \t# with \"000\", which sorts before that of $object (which starts\n \t# with \"fff\").\n-\tsecond=$(echo 1485 | git hash-object -w --stdin) &&\n+\tsecond=$(test_oid oid000 | git hash-object -w --stdin) &&\n \tdo_pack \"$object $second\" --index-version=2 &&\n \n \t# We have to make extra room for the table, so we cannot\n"},{"id":"391308","messageId":"20200207005254.1495851-17-sandals@crustytoothpaste.net","threadId":"52756","inReplyTo":"20200207005254.1495851-1-sandals@crustytoothpaste.net","subject":"[PATCH v3 16/21] t5318: update for SHA-256","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2020-02-07T00:52:49Z","receivedAt":"2020-02-07T00:53:54Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"Switch two tests to use $ZERO_OID to represent the all-zeros object ID.\n\nSigned-off-by: brian m. carlson <sandals@crustytoothpaste.net>\n---\n t/t5318-commit-graph.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t5318-commit-graph.sh b/t/t5318-commit-graph.sh\nindex 81cf118cb6..bc95db9e08 100755\n--- a/t/t5318-commit-graph.sh\n+++ b/t/t5318-commit-graph.sh\n@@ -629,7 +629,7 @@ test_expect_success 'corrupt commit-graph write (broken parent)' '\n \t\tempty=\"$(git mktree </dev/null)\" &&\n \t\tcat >broken <<-EOF &&\n \t\ttree $empty\n-\t\tparent 0000000000000000000000000000000000000000\n+\t\tparent $ZERO_OID\n \t\tauthor whatever <whatever@example.com> 1234 -0000\n \t\tcommitter whatever <whatever@example.com> 1234 -0000\n \n@@ -650,7 +650,7 @@ test_expect_success 'corrupt commit-graph write (missing tree)' '\n \t\tcd repo &&\n \t\ttree=\"$(git mktree </dev/null)\" &&\n \t\tcat >broken <<-EOF &&\n-\t\tparent 0000000000000000000000000000000000000000\n+\t\tparent $ZERO_OID\n \t\tauthor whatever <whatever@example.com> 1234 -0000\n \t\tcommitter whatever <whatever@example.com> 1234 -0000\n \n"},{"id":"391309","messageId":"20200207005254.1495851-13-sandals@crustytoothpaste.net","threadId":"52756","inReplyTo":"20200207005254.1495851-1-sandals@crustytoothpaste.net","subject":"[PATCH v3 12/21] t5309: make test hash independent","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2020-02-07T00:52:45Z","receivedAt":"2020-02-07T00:53:55Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"Use the proper pack constants defined in lib-pack.sh to make this test\nwork with SHA-256.\n\nSigned-off-by: brian m. carlson <sandals@crustytoothpaste.net>\n---\n t/t5309-pack-delta-cycles.sh | 10 ++--------\n 1 file changed, 2 insertions(+), 8 deletions(-)\n\ndiff --git a/t/t5309-pack-delta-cycles.sh b/t/t5309-pack-delta-cycles.sh\nindex 491556dad9..b6b9792913 100755\n--- a/t/t5309-pack-delta-cycles.sh\n+++ b/t/t5309-pack-delta-cycles.sh\n@@ -4,15 +4,9 @@ test_description='test index-pack handling of delta cycles in packfiles'\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-pack.sh\n \n-if ! test_have_prereq SHA1\n-then\n-       skip_all='not using SHA-1 for objects'\n-       test_done\n-fi\n-\n # Two similar-ish objects that we have computed deltas between.\n-A=01d7713666f4de822776c7622c10f1b07de280dc\n-B=e68fe8129b546b101aee9510c5328e7f21ca1d18\n+A=$(test_oid packlib_7_0)\n+B=$(test_oid packlib_7_76)\n \n # double-check our hand-constucted packs\n test_expect_success 'index-pack works with a single delta (A->B)' '\n"},{"id":"391311","messageId":"20200207005254.1495851-10-sandals@crustytoothpaste.net","threadId":"52756","inReplyTo":"20200207005254.1495851-1-sandals@crustytoothpaste.net","subject":"[PATCH v3 09/21] t4211: add test cases for SHA-256","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2020-02-07T00:52:42Z","receivedAt":"2020-02-07T00:53:58Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"There are already files containing example output for SHA-1.  Add test\nfiles providing example output for SHA-256 as well and adjust the test\nto look up the appropriate ones based on the algorithm in use.\n\nSigned-off-by: brian m. carlson <sandals@crustytoothpaste.net>\n---\n t/t4211-line-log.sh                           |   3 +-\n t/t4211/sha256/expect.beginning-of-file       |  43 ++++\n t/t4211/sha256/expect.end-of-file             |  62 ++++++\n t/t4211/sha256/expect.move-support-f          |  80 ++++++++\n t/t4211/sha256/expect.multiple                | 104 ++++++++++\n t/t4211/sha256/expect.multiple-overlapping    | 187 ++++++++++++++++++\n t/t4211/sha256/expect.multiple-superset       | 187 ++++++++++++++++++\n .../sha256/expect.parallel-change-f-to-main   | 160 +++++++++++++++\n t/t4211/sha256/expect.simple-f                |  59 ++++++\n t/t4211/sha256/expect.simple-f-to-main        | 100 ++++++++++\n t/t4211/sha256/expect.simple-main             |  68 +++++++\n t/t4211/sha256/expect.simple-main-to-end      |  70 +++++++\n t/t4211/sha256/expect.two-ranges              | 102 ++++++++++\n t/t4211/sha256/expect.vanishes-early          |  39 ++++\n 14 files changed, 1263 insertions(+), 1 deletion(-)\n create mode 100644 t/t4211/sha256/expect.beginning-of-file\n create mode 100644 t/t4211/sha256/expect.end-of-file\n create mode 100644 t/t4211/sha256/expect.move-support-f\n create mode 100644 t/t4211/sha256/expect.multiple\n create mode 100644 t/t4211/sha256/expect.multiple-overlapping\n create mode 100644 t/t4211/sha256/expect.multiple-superset\n create mode 100644 t/t4211/sha256/expect.parallel-change-f-to-main\n create mode 100644 t/t4211/sha256/expect.simple-f\n create mode 100644 t/t4211/sha256/expect.simple-f-to-main\n create mode 100644 t/t4211/sha256/expect.simple-main\n create mode 100644 t/t4211/sha256/expect.simple-main-to-end\n create mode 100644 t/t4211/sha256/expect.two-ranges\n create mode 100644 t/t4211/sha256/expect.vanishes-early\n\ndiff --git a/t/t4211-line-log.sh b/t/t4211-line-log.sh\nindex 63a3bf28a5..cda58186c2 100755\n--- a/t/t4211-line-log.sh\n+++ b/t/t4211-line-log.sh\n@@ -4,6 +4,7 @@ test_description='test log -L'\n . ./test-lib.sh\n \n test_expect_success 'setup (import history)' '\n+\ttest_oid_init &&\n \tgit fast-import < \"$TEST_DIRECTORY\"/t4211/history.export &&\n \tgit reset --hard\n '\n@@ -11,7 +12,7 @@ test_expect_success 'setup (import history)' '\n canned_test_1 () {\n \ttest_expect_$1 \"$2\" \"\n \t\tgit log $2 >actual &&\n-\t\ttest_cmp \\\"\\$TEST_DIRECTORY\\\"/t4211/sha1/expect.$3 actual\n+\t\ttest_cmp \\\"\\$TEST_DIRECTORY\\\"/t4211/$(test_oid algo)/expect.$3 actual\n \t\"\n }\n \ndiff --git a/t/t4211/sha256/expect.beginning-of-file b/t/t4211/sha256/expect.beginning-of-file\nnew file mode 100644\nindex 0000000000..5adfdfc1a1\n--- /dev/null\n+++ b/t/t4211/sha256/expect.beginning-of-file\n@@ -0,0 +1,43 @@\n+commit 62a40b38fa4f00800004aee81ef287b7201317594ebcb990f38cbe493b01d200\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:47:40 2013 +0100\n+\n+    change at very beginning\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -1,3 +1,4 @@\n++#include <unistd.h>\n+ #include <stdio.h>\n+ \n+ long f(long x)\n+\n+commit ccf97b9878189c40a981da50b15713bb80a35755326320ec80900caf22ced46f\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:45:16 2013 +0100\n+\n+    touch both functions\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -1,3 +1,3 @@\n+ #include <stdio.h>\n+ \n+-int f(int x)\n++long f(long x)\n+\n+commit 1dd7e9b2b1699324b53b341e728653b913bc192a14dfea168c5b51f2b3d03592\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:44:48 2013 +0100\n+\n+    initial\n+\n+diff --git a/a.c b/a.c\n+--- /dev/null\n++++ b/a.c\n+@@ -0,0 +1,3 @@\n++#include <stdio.h>\n++\n++int f(int x)\ndiff --git a/t/t4211/sha256/expect.end-of-file b/t/t4211/sha256/expect.end-of-file\nnew file mode 100644\nindex 0000000000..03ab5c1784\n--- /dev/null\n+++ b/t/t4211/sha256/expect.end-of-file\n@@ -0,0 +1,62 @@\n+commit 5526ed05c2476b56af8b7be499e8f78bd50f490740733a9ca7e1f55878fa90a9\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:48:43 2013 +0100\n+\n+    change back to complete line\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -20,3 +20,5 @@\n+ \tprintf(\"%ld\\n\", f(15));\n+ \treturn 0;\n+-}\n+\\ No newline at end of file\n++}\n++\n++/* incomplete lines are bad! */\n+\n+commit 29f32ac3141c48b22803e5c4127b719917b67d0f8ca8c5248bebfa2a19f7da10\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:48:10 2013 +0100\n+\n+    change to an incomplete line at end\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -20,3 +20,3 @@\n+ \tprintf(\"%ld\\n\", f(15));\n+ \treturn 0;\n+-}\n++}\n+\\ No newline at end of file\n+\n+commit ccf97b9878189c40a981da50b15713bb80a35755326320ec80900caf22ced46f\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:45:16 2013 +0100\n+\n+    touch both functions\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -19,3 +19,3 @@\n+-\tprintf(\"%d\\n\", f(15));\n++\tprintf(\"%ld\\n\", f(15));\n+ \treturn 0;\n+ }\n+\n+commit 1dd7e9b2b1699324b53b341e728653b913bc192a14dfea168c5b51f2b3d03592\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:44:48 2013 +0100\n+\n+    initial\n+\n+diff --git a/a.c b/a.c\n+--- /dev/null\n++++ b/a.c\n+@@ -0,0 +18,3 @@\n++\tprintf(\"%d\\n\", f(15));\n++\treturn 0;\n++}\ndiff --git a/t/t4211/sha256/expect.move-support-f b/t/t4211/sha256/expect.move-support-f\nnew file mode 100644\nindex 0000000000..223b4ed2a0\n--- /dev/null\n+++ b/t/t4211/sha256/expect.move-support-f\n@@ -0,0 +1,80 @@\n+commit 4f7a58195a92c400e28a2354328587f1ff14fb77f5cf894536f17ccbc72931b9\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:49:50 2013 +0100\n+\n+    another simple change\n+\n+diff --git a/b.c b/b.c\n+--- a/b.c\n++++ b/b.c\n+@@ -4,9 +4,9 @@\n+ long f(long x)\n+ {\n+ \tint s = 0;\n+ \twhile (x) {\n+-\t\tx >>= 1;\n++\t\tx /= 2;\n+ \t\ts++;\n+ \t}\n+ \treturn s;\n+ }\n+\n+commit ccf97b9878189c40a981da50b15713bb80a35755326320ec80900caf22ced46f\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:45:16 2013 +0100\n+\n+    touch both functions\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -3,9 +3,9 @@\n+-int f(int x)\n++long f(long x)\n+ {\n+ \tint s = 0;\n+ \twhile (x) {\n+ \t\tx >>= 1;\n+ \t\ts++;\n+ \t}\n+ \treturn s;\n+ }\n+\n+commit f6434acd34260a6c9f61e96d96bf9a323d330561df5b1ca2631104f82026dfed\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:44:55 2013 +0100\n+\n+    change f()\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -3,8 +3,9 @@\n+ int f(int x)\n+ {\n+ \tint s = 0;\n+ \twhile (x) {\n+ \t\tx >>= 1;\n+ \t\ts++;\n+ \t}\n++\treturn s;\n+ }\n+\n+commit 1dd7e9b2b1699324b53b341e728653b913bc192a14dfea168c5b51f2b3d03592\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:44:48 2013 +0100\n+\n+    initial\n+\n+diff --git a/a.c b/a.c\n+--- /dev/null\n++++ b/a.c\n+@@ -0,0 +3,8 @@\n++int f(int x)\n++{\n++\tint s = 0;\n++\twhile (x) {\n++\t\tx >>= 1;\n++\t\ts++;\n++\t}\n++}\ndiff --git a/t/t4211/sha256/expect.multiple b/t/t4211/sha256/expect.multiple\nnew file mode 100644\nindex 0000000000..ca00409b9a\n--- /dev/null\n+++ b/t/t4211/sha256/expect.multiple\n@@ -0,0 +1,104 @@\n+commit 5526ed05c2476b56af8b7be499e8f78bd50f490740733a9ca7e1f55878fa90a9\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:48:43 2013 +0100\n+\n+    change back to complete line\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -18,5 +18,7 @@\n+ int main ()\n+ {\n+ \tprintf(\"%ld\\n\", f(15));\n+ \treturn 0;\n+-}\n+\\ No newline at end of file\n++}\n++\n++/* incomplete lines are bad! */\n+\n+commit 29f32ac3141c48b22803e5c4127b719917b67d0f8ca8c5248bebfa2a19f7da10\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:48:10 2013 +0100\n+\n+    change to an incomplete line at end\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -18,5 +18,5 @@\n+ int main ()\n+ {\n+ \tprintf(\"%ld\\n\", f(15));\n+ \treturn 0;\n+-}\n++}\n+\\ No newline at end of file\n+\n+commit ccf97b9878189c40a981da50b15713bb80a35755326320ec80900caf22ced46f\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:45:16 2013 +0100\n+\n+    touch both functions\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -3,9 +3,9 @@\n+-int f(int x)\n++long f(long x)\n+ {\n+ \tint s = 0;\n+ \twhile (x) {\n+ \t\tx >>= 1;\n+ \t\ts++;\n+ \t}\n+ \treturn s;\n+ }\n+@@ -17,5 +17,5 @@\n+ int main ()\n+ {\n+-\tprintf(\"%d\\n\", f(15));\n++\tprintf(\"%ld\\n\", f(15));\n+ \treturn 0;\n+ }\n+\n+commit f6434acd34260a6c9f61e96d96bf9a323d330561df5b1ca2631104f82026dfed\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:44:55 2013 +0100\n+\n+    change f()\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -3,8 +3,9 @@\n+ int f(int x)\n+ {\n+ \tint s = 0;\n+ \twhile (x) {\n+ \t\tx >>= 1;\n+ \t\ts++;\n+ \t}\n++\treturn s;\n+ }\n+\n+commit 1dd7e9b2b1699324b53b341e728653b913bc192a14dfea168c5b51f2b3d03592\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:44:48 2013 +0100\n+\n+    initial\n+\n+diff --git a/a.c b/a.c\n+--- /dev/null\n++++ b/a.c\n+@@ -0,0 +3,8 @@\n++int f(int x)\n++{\n++\tint s = 0;\n++\twhile (x) {\n++\t\tx >>= 1;\n++\t\ts++;\n++\t}\n++}\ndiff --git a/t/t4211/sha256/expect.multiple-overlapping b/t/t4211/sha256/expect.multiple-overlapping\nnew file mode 100644\nindex 0000000000..9015a45a25\n--- /dev/null\n+++ b/t/t4211/sha256/expect.multiple-overlapping\n@@ -0,0 +1,187 @@\n+commit 5526ed05c2476b56af8b7be499e8f78bd50f490740733a9ca7e1f55878fa90a9\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:48:43 2013 +0100\n+\n+    change back to complete line\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -4,19 +4,21 @@\n+ long f(long x)\n+ {\n+ \tint s = 0;\n+ \twhile (x) {\n+ \t\tx >>= 1;\n+ \t\ts++;\n+ \t}\n+ \treturn s;\n+ }\n+ \n+ /*\n+  * This is only an example!\n+  */\n+ \n+ int main ()\n+ {\n+ \tprintf(\"%ld\\n\", f(15));\n+ \treturn 0;\n+-}\n+\\ No newline at end of file\n++}\n++\n++/* incomplete lines are bad! */\n+\n+commit 29f32ac3141c48b22803e5c4127b719917b67d0f8ca8c5248bebfa2a19f7da10\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:48:10 2013 +0100\n+\n+    change to an incomplete line at end\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -4,19 +4,19 @@\n+ long f(long x)\n+ {\n+ \tint s = 0;\n+ \twhile (x) {\n+ \t\tx >>= 1;\n+ \t\ts++;\n+ \t}\n+ \treturn s;\n+ }\n+ \n+ /*\n+  * This is only an example!\n+  */\n+ \n+ int main ()\n+ {\n+ \tprintf(\"%ld\\n\", f(15));\n+ \treturn 0;\n+-}\n++}\n+\\ No newline at end of file\n+\n+commit 5a1b3989063d55e71e7685efa3392f133385b4034bddde530dcb5090d8b8b8ca\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:45:41 2013 +0100\n+\n+    touch comment\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -3,19 +3,19 @@\n+ long f(long x)\n+ {\n+ \tint s = 0;\n+ \twhile (x) {\n+ \t\tx >>= 1;\n+ \t\ts++;\n+ \t}\n+ \treturn s;\n+ }\n+ \n+ /*\n+- * A comment.\n++ * This is only an example!\n+  */\n+ \n+ int main ()\n+ {\n+ \tprintf(\"%ld\\n\", f(15));\n+ \treturn 0;\n+ }\n+\n+commit ccf97b9878189c40a981da50b15713bb80a35755326320ec80900caf22ced46f\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:45:16 2013 +0100\n+\n+    touch both functions\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -3,19 +3,19 @@\n+-int f(int x)\n++long f(long x)\n+ {\n+ \tint s = 0;\n+ \twhile (x) {\n+ \t\tx >>= 1;\n+ \t\ts++;\n+ \t}\n+ \treturn s;\n+ }\n+ \n+ /*\n+  * A comment.\n+  */\n+ \n+ int main ()\n+ {\n+-\tprintf(\"%d\\n\", f(15));\n++\tprintf(\"%ld\\n\", f(15));\n+ \treturn 0;\n+ }\n+\n+commit f6434acd34260a6c9f61e96d96bf9a323d330561df5b1ca2631104f82026dfed\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:44:55 2013 +0100\n+\n+    change f()\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -3,18 +3,19 @@\n+ int f(int x)\n+ {\n+ \tint s = 0;\n+ \twhile (x) {\n+ \t\tx >>= 1;\n+ \t\ts++;\n+ \t}\n++\treturn s;\n+ }\n+ \n+ /*\n+  * A comment.\n+  */\n+ \n+ int main ()\n+ {\n+ \tprintf(\"%d\\n\", f(15));\n+ \treturn 0;\n+ }\n+\n+commit 1dd7e9b2b1699324b53b341e728653b913bc192a14dfea168c5b51f2b3d03592\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:44:48 2013 +0100\n+\n+    initial\n+\n+diff --git a/a.c b/a.c\n+--- /dev/null\n++++ b/a.c\n+@@ -0,0 +3,18 @@\n++int f(int x)\n++{\n++\tint s = 0;\n++\twhile (x) {\n++\t\tx >>= 1;\n++\t\ts++;\n++\t}\n++}\n++\n++/*\n++ * A comment.\n++ */\n++\n++int main ()\n++{\n++\tprintf(\"%d\\n\", f(15));\n++\treturn 0;\n++}\ndiff --git a/t/t4211/sha256/expect.multiple-superset b/t/t4211/sha256/expect.multiple-superset\nnew file mode 100644\nindex 0000000000..9015a45a25\n--- /dev/null\n+++ b/t/t4211/sha256/expect.multiple-superset\n@@ -0,0 +1,187 @@\n+commit 5526ed05c2476b56af8b7be499e8f78bd50f490740733a9ca7e1f55878fa90a9\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:48:43 2013 +0100\n+\n+    change back to complete line\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -4,19 +4,21 @@\n+ long f(long x)\n+ {\n+ \tint s = 0;\n+ \twhile (x) {\n+ \t\tx >>= 1;\n+ \t\ts++;\n+ \t}\n+ \treturn s;\n+ }\n+ \n+ /*\n+  * This is only an example!\n+  */\n+ \n+ int main ()\n+ {\n+ \tprintf(\"%ld\\n\", f(15));\n+ \treturn 0;\n+-}\n+\\ No newline at end of file\n++}\n++\n++/* incomplete lines are bad! */\n+\n+commit 29f32ac3141c48b22803e5c4127b719917b67d0f8ca8c5248bebfa2a19f7da10\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:48:10 2013 +0100\n+\n+    change to an incomplete line at end\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -4,19 +4,19 @@\n+ long f(long x)\n+ {\n+ \tint s = 0;\n+ \twhile (x) {\n+ \t\tx >>= 1;\n+ \t\ts++;\n+ \t}\n+ \treturn s;\n+ }\n+ \n+ /*\n+  * This is only an example!\n+  */\n+ \n+ int main ()\n+ {\n+ \tprintf(\"%ld\\n\", f(15));\n+ \treturn 0;\n+-}\n++}\n+\\ No newline at end of file\n+\n+commit 5a1b3989063d55e71e7685efa3392f133385b4034bddde530dcb5090d8b8b8ca\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:45:41 2013 +0100\n+\n+    touch comment\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -3,19 +3,19 @@\n+ long f(long x)\n+ {\n+ \tint s = 0;\n+ \twhile (x) {\n+ \t\tx >>= 1;\n+ \t\ts++;\n+ \t}\n+ \treturn s;\n+ }\n+ \n+ /*\n+- * A comment.\n++ * This is only an example!\n+  */\n+ \n+ int main ()\n+ {\n+ \tprintf(\"%ld\\n\", f(15));\n+ \treturn 0;\n+ }\n+\n+commit ccf97b9878189c40a981da50b15713bb80a35755326320ec80900caf22ced46f\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:45:16 2013 +0100\n+\n+    touch both functions\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -3,19 +3,19 @@\n+-int f(int x)\n++long f(long x)\n+ {\n+ \tint s = 0;\n+ \twhile (x) {\n+ \t\tx >>= 1;\n+ \t\ts++;\n+ \t}\n+ \treturn s;\n+ }\n+ \n+ /*\n+  * A comment.\n+  */\n+ \n+ int main ()\n+ {\n+-\tprintf(\"%d\\n\", f(15));\n++\tprintf(\"%ld\\n\", f(15));\n+ \treturn 0;\n+ }\n+\n+commit f6434acd34260a6c9f61e96d96bf9a323d330561df5b1ca2631104f82026dfed\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:44:55 2013 +0100\n+\n+    change f()\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -3,18 +3,19 @@\n+ int f(int x)\n+ {\n+ \tint s = 0;\n+ \twhile (x) {\n+ \t\tx >>= 1;\n+ \t\ts++;\n+ \t}\n++\treturn s;\n+ }\n+ \n+ /*\n+  * A comment.\n+  */\n+ \n+ int main ()\n+ {\n+ \tprintf(\"%d\\n\", f(15));\n+ \treturn 0;\n+ }\n+\n+commit 1dd7e9b2b1699324b53b341e728653b913bc192a14dfea168c5b51f2b3d03592\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:44:48 2013 +0100\n+\n+    initial\n+\n+diff --git a/a.c b/a.c\n+--- /dev/null\n++++ b/a.c\n+@@ -0,0 +3,18 @@\n++int f(int x)\n++{\n++\tint s = 0;\n++\twhile (x) {\n++\t\tx >>= 1;\n++\t\ts++;\n++\t}\n++}\n++\n++/*\n++ * A comment.\n++ */\n++\n++int main ()\n++{\n++\tprintf(\"%d\\n\", f(15));\n++\treturn 0;\n++}\ndiff --git a/t/t4211/sha256/expect.parallel-change-f-to-main b/t/t4211/sha256/expect.parallel-change-f-to-main\nnew file mode 100644\nindex 0000000000..e68f8928ea\n--- /dev/null\n+++ b/t/t4211/sha256/expect.parallel-change-f-to-main\n@@ -0,0 +1,160 @@\n+commit 98117c2059b76c36995748fb97b02542aef477fe26379e94c18fd70f7790bc67\n+Merge: b511694 4f7a581\n+Author: Thomas Rast <trast@inf.ethz.ch>\n+Date:   Fri Apr 12 16:16:24 2013 +0200\n+\n+    Merge across the rename\n+\n+\n+commit 4f7a58195a92c400e28a2354328587f1ff14fb77f5cf894536f17ccbc72931b9\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:49:50 2013 +0100\n+\n+    another simple change\n+\n+diff --git a/b.c b/b.c\n+--- a/b.c\n++++ b/b.c\n+@@ -4,14 +4,14 @@\n+ long f(long x)\n+ {\n+ \tint s = 0;\n+ \twhile (x) {\n+-\t\tx >>= 1;\n++\t\tx /= 2;\n+ \t\ts++;\n+ \t}\n+ \treturn s;\n+ }\n+ \n+ /*\n+  * This is only an example!\n+  */\n+ \n+\n+commit b511694f5337663fbd697622993a5f8e1099eca84be4df313f2b3ee94a098b42\n+Author: Thomas Rast <trast@inf.ethz.ch>\n+Date:   Fri Apr 12 16:15:57 2013 +0200\n+\n+    change on another line of history while rename happens\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -4,14 +4,14 @@\n+ long f(long x)\n+ {\n+ \tint s = 0;\n+ \twhile (x) {\n+ \t\tx >>= 1;\n+ \t\ts++;\n+ \t}\n+ \treturn s;\n+ }\n+ \n+ /*\n+- * This is only an example!\n++ * This is only a short example!\n+  */\n+ \n+\n+commit 5a1b3989063d55e71e7685efa3392f133385b4034bddde530dcb5090d8b8b8ca\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:45:41 2013 +0100\n+\n+    touch comment\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -3,14 +3,14 @@\n+ long f(long x)\n+ {\n+ \tint s = 0;\n+ \twhile (x) {\n+ \t\tx >>= 1;\n+ \t\ts++;\n+ \t}\n+ \treturn s;\n+ }\n+ \n+ /*\n+- * A comment.\n++ * This is only an example!\n+  */\n+ \n+\n+commit ccf97b9878189c40a981da50b15713bb80a35755326320ec80900caf22ced46f\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:45:16 2013 +0100\n+\n+    touch both functions\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -3,14 +3,14 @@\n+-int f(int x)\n++long f(long x)\n+ {\n+ \tint s = 0;\n+ \twhile (x) {\n+ \t\tx >>= 1;\n+ \t\ts++;\n+ \t}\n+ \treturn s;\n+ }\n+ \n+ /*\n+  * A comment.\n+  */\n+ \n+\n+commit f6434acd34260a6c9f61e96d96bf9a323d330561df5b1ca2631104f82026dfed\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:44:55 2013 +0100\n+\n+    change f()\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -3,13 +3,14 @@\n+ int f(int x)\n+ {\n+ \tint s = 0;\n+ \twhile (x) {\n+ \t\tx >>= 1;\n+ \t\ts++;\n+ \t}\n++\treturn s;\n+ }\n+ \n+ /*\n+  * A comment.\n+  */\n+ \n+\n+commit 1dd7e9b2b1699324b53b341e728653b913bc192a14dfea168c5b51f2b3d03592\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:44:48 2013 +0100\n+\n+    initial\n+\n+diff --git a/a.c b/a.c\n+--- /dev/null\n++++ b/a.c\n+@@ -0,0 +3,13 @@\n++int f(int x)\n++{\n++\tint s = 0;\n++\twhile (x) {\n++\t\tx >>= 1;\n++\t\ts++;\n++\t}\n++}\n++\n++/*\n++ * A comment.\n++ */\n++\ndiff --git a/t/t4211/sha256/expect.simple-f b/t/t4211/sha256/expect.simple-f\nnew file mode 100644\nindex 0000000000..65508d7c0b\n--- /dev/null\n+++ b/t/t4211/sha256/expect.simple-f\n@@ -0,0 +1,59 @@\n+commit ccf97b9878189c40a981da50b15713bb80a35755326320ec80900caf22ced46f\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:45:16 2013 +0100\n+\n+    touch both functions\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -3,9 +3,9 @@\n+-int f(int x)\n++long f(long x)\n+ {\n+ \tint s = 0;\n+ \twhile (x) {\n+ \t\tx >>= 1;\n+ \t\ts++;\n+ \t}\n+ \treturn s;\n+ }\n+\n+commit f6434acd34260a6c9f61e96d96bf9a323d330561df5b1ca2631104f82026dfed\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:44:55 2013 +0100\n+\n+    change f()\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -3,8 +3,9 @@\n+ int f(int x)\n+ {\n+ \tint s = 0;\n+ \twhile (x) {\n+ \t\tx >>= 1;\n+ \t\ts++;\n+ \t}\n++\treturn s;\n+ }\n+\n+commit 1dd7e9b2b1699324b53b341e728653b913bc192a14dfea168c5b51f2b3d03592\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:44:48 2013 +0100\n+\n+    initial\n+\n+diff --git a/a.c b/a.c\n+--- /dev/null\n++++ b/a.c\n+@@ -0,0 +3,8 @@\n++int f(int x)\n++{\n++\tint s = 0;\n++\twhile (x) {\n++\t\tx >>= 1;\n++\t\ts++;\n++\t}\n++}\ndiff --git a/t/t4211/sha256/expect.simple-f-to-main b/t/t4211/sha256/expect.simple-f-to-main\nnew file mode 100644\nindex 0000000000..77b721c196\n--- /dev/null\n+++ b/t/t4211/sha256/expect.simple-f-to-main\n@@ -0,0 +1,100 @@\n+commit 5a1b3989063d55e71e7685efa3392f133385b4034bddde530dcb5090d8b8b8ca\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:45:41 2013 +0100\n+\n+    touch comment\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -3,14 +3,14 @@\n+ long f(long x)\n+ {\n+ \tint s = 0;\n+ \twhile (x) {\n+ \t\tx >>= 1;\n+ \t\ts++;\n+ \t}\n+ \treturn s;\n+ }\n+ \n+ /*\n+- * A comment.\n++ * This is only an example!\n+  */\n+ \n+\n+commit ccf97b9878189c40a981da50b15713bb80a35755326320ec80900caf22ced46f\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:45:16 2013 +0100\n+\n+    touch both functions\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -3,14 +3,14 @@\n+-int f(int x)\n++long f(long x)\n+ {\n+ \tint s = 0;\n+ \twhile (x) {\n+ \t\tx >>= 1;\n+ \t\ts++;\n+ \t}\n+ \treturn s;\n+ }\n+ \n+ /*\n+  * A comment.\n+  */\n+ \n+\n+commit f6434acd34260a6c9f61e96d96bf9a323d330561df5b1ca2631104f82026dfed\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:44:55 2013 +0100\n+\n+    change f()\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -3,13 +3,14 @@\n+ int f(int x)\n+ {\n+ \tint s = 0;\n+ \twhile (x) {\n+ \t\tx >>= 1;\n+ \t\ts++;\n+ \t}\n++\treturn s;\n+ }\n+ \n+ /*\n+  * A comment.\n+  */\n+ \n+\n+commit 1dd7e9b2b1699324b53b341e728653b913bc192a14dfea168c5b51f2b3d03592\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:44:48 2013 +0100\n+\n+    initial\n+\n+diff --git a/a.c b/a.c\n+--- /dev/null\n++++ b/a.c\n+@@ -0,0 +3,13 @@\n++int f(int x)\n++{\n++\tint s = 0;\n++\twhile (x) {\n++\t\tx >>= 1;\n++\t\ts++;\n++\t}\n++}\n++\n++/*\n++ * A comment.\n++ */\n++\ndiff --git a/t/t4211/sha256/expect.simple-main b/t/t4211/sha256/expect.simple-main\nnew file mode 100644\nindex 0000000000..d20708c9f9\n--- /dev/null\n+++ b/t/t4211/sha256/expect.simple-main\n@@ -0,0 +1,68 @@\n+commit 5526ed05c2476b56af8b7be499e8f78bd50f490740733a9ca7e1f55878fa90a9\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:48:43 2013 +0100\n+\n+    change back to complete line\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -18,5 +18,5 @@\n+ int main ()\n+ {\n+ \tprintf(\"%ld\\n\", f(15));\n+ \treturn 0;\n+-}\n+\\ No newline at end of file\n++}\n+\n+commit 29f32ac3141c48b22803e5c4127b719917b67d0f8ca8c5248bebfa2a19f7da10\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:48:10 2013 +0100\n+\n+    change to an incomplete line at end\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -18,5 +18,5 @@\n+ int main ()\n+ {\n+ \tprintf(\"%ld\\n\", f(15));\n+ \treturn 0;\n+-}\n++}\n+\\ No newline at end of file\n+\n+commit ccf97b9878189c40a981da50b15713bb80a35755326320ec80900caf22ced46f\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:45:16 2013 +0100\n+\n+    touch both functions\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -17,5 +17,5 @@\n+ int main ()\n+ {\n+-\tprintf(\"%d\\n\", f(15));\n++\tprintf(\"%ld\\n\", f(15));\n+ \treturn 0;\n+ }\n+\n+commit 1dd7e9b2b1699324b53b341e728653b913bc192a14dfea168c5b51f2b3d03592\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:44:48 2013 +0100\n+\n+    initial\n+\n+diff --git a/a.c b/a.c\n+--- /dev/null\n++++ b/a.c\n+@@ -0,0 +16,5 @@\n++int main ()\n++{\n++\tprintf(\"%d\\n\", f(15));\n++\treturn 0;\n++}\ndiff --git a/t/t4211/sha256/expect.simple-main-to-end b/t/t4211/sha256/expect.simple-main-to-end\nnew file mode 100644\nindex 0000000000..617cdf3481\n--- /dev/null\n+++ b/t/t4211/sha256/expect.simple-main-to-end\n@@ -0,0 +1,70 @@\n+commit 5526ed05c2476b56af8b7be499e8f78bd50f490740733a9ca7e1f55878fa90a9\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:48:43 2013 +0100\n+\n+    change back to complete line\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -18,5 +18,7 @@\n+ int main ()\n+ {\n+ \tprintf(\"%ld\\n\", f(15));\n+ \treturn 0;\n+-}\n+\\ No newline at end of file\n++}\n++\n++/* incomplete lines are bad! */\n+\n+commit 29f32ac3141c48b22803e5c4127b719917b67d0f8ca8c5248bebfa2a19f7da10\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:48:10 2013 +0100\n+\n+    change to an incomplete line at end\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -18,5 +18,5 @@\n+ int main ()\n+ {\n+ \tprintf(\"%ld\\n\", f(15));\n+ \treturn 0;\n+-}\n++}\n+\\ No newline at end of file\n+\n+commit ccf97b9878189c40a981da50b15713bb80a35755326320ec80900caf22ced46f\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:45:16 2013 +0100\n+\n+    touch both functions\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -17,5 +17,5 @@\n+ int main ()\n+ {\n+-\tprintf(\"%d\\n\", f(15));\n++\tprintf(\"%ld\\n\", f(15));\n+ \treturn 0;\n+ }\n+\n+commit 1dd7e9b2b1699324b53b341e728653b913bc192a14dfea168c5b51f2b3d03592\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:44:48 2013 +0100\n+\n+    initial\n+\n+diff --git a/a.c b/a.c\n+--- /dev/null\n++++ b/a.c\n+@@ -0,0 +16,5 @@\n++int main ()\n++{\n++\tprintf(\"%d\\n\", f(15));\n++\treturn 0;\n++}\ndiff --git a/t/t4211/sha256/expect.two-ranges b/t/t4211/sha256/expect.two-ranges\nnew file mode 100644\nindex 0000000000..af57c8b997\n--- /dev/null\n+++ b/t/t4211/sha256/expect.two-ranges\n@@ -0,0 +1,102 @@\n+commit 5526ed05c2476b56af8b7be499e8f78bd50f490740733a9ca7e1f55878fa90a9\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:48:43 2013 +0100\n+\n+    change back to complete line\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -18,5 +18,5 @@\n+ int main ()\n+ {\n+ \tprintf(\"%ld\\n\", f(15));\n+ \treturn 0;\n+-}\n+\\ No newline at end of file\n++}\n+\n+commit 29f32ac3141c48b22803e5c4127b719917b67d0f8ca8c5248bebfa2a19f7da10\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:48:10 2013 +0100\n+\n+    change to an incomplete line at end\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -18,5 +18,5 @@\n+ int main ()\n+ {\n+ \tprintf(\"%ld\\n\", f(15));\n+ \treturn 0;\n+-}\n++}\n+\\ No newline at end of file\n+\n+commit ccf97b9878189c40a981da50b15713bb80a35755326320ec80900caf22ced46f\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:45:16 2013 +0100\n+\n+    touch both functions\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -3,9 +3,9 @@\n+-int f(int x)\n++long f(long x)\n+ {\n+ \tint s = 0;\n+ \twhile (x) {\n+ \t\tx >>= 1;\n+ \t\ts++;\n+ \t}\n+ \treturn s;\n+ }\n+@@ -17,5 +17,5 @@\n+ int main ()\n+ {\n+-\tprintf(\"%d\\n\", f(15));\n++\tprintf(\"%ld\\n\", f(15));\n+ \treturn 0;\n+ }\n+\n+commit f6434acd34260a6c9f61e96d96bf9a323d330561df5b1ca2631104f82026dfed\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:44:55 2013 +0100\n+\n+    change f()\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -3,8 +3,9 @@\n+ int f(int x)\n+ {\n+ \tint s = 0;\n+ \twhile (x) {\n+ \t\tx >>= 1;\n+ \t\ts++;\n+ \t}\n++\treturn s;\n+ }\n+\n+commit 1dd7e9b2b1699324b53b341e728653b913bc192a14dfea168c5b51f2b3d03592\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:44:48 2013 +0100\n+\n+    initial\n+\n+diff --git a/a.c b/a.c\n+--- /dev/null\n++++ b/a.c\n+@@ -0,0 +3,8 @@\n++int f(int x)\n++{\n++\tint s = 0;\n++\twhile (x) {\n++\t\tx >>= 1;\n++\t\ts++;\n++\t}\n++}\ndiff --git a/t/t4211/sha256/expect.vanishes-early b/t/t4211/sha256/expect.vanishes-early\nnew file mode 100644\nindex 0000000000..11ec9bdecf\n--- /dev/null\n+++ b/t/t4211/sha256/expect.vanishes-early\n@@ -0,0 +1,39 @@\n+commit 5526ed05c2476b56af8b7be499e8f78bd50f490740733a9ca7e1f55878fa90a9\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:48:43 2013 +0100\n+\n+    change back to complete line\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -22,1 +24,1 @@\n+-}\n+\\ No newline at end of file\n++/* incomplete lines are bad! */\n+\n+commit 29f32ac3141c48b22803e5c4127b719917b67d0f8ca8c5248bebfa2a19f7da10\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:48:10 2013 +0100\n+\n+    change to an incomplete line at end\n+\n+diff --git a/a.c b/a.c\n+--- a/a.c\n++++ b/a.c\n+@@ -22,1 +22,1 @@\n+-}\n++}\n+\\ No newline at end of file\n+\n+commit 1dd7e9b2b1699324b53b341e728653b913bc192a14dfea168c5b51f2b3d03592\n+Author: Thomas Rast <trast@student.ethz.ch>\n+Date:   Thu Feb 28 10:44:48 2013 +0100\n+\n+    initial\n+\n+diff --git a/a.c b/a.c\n+--- /dev/null\n++++ b/a.c\n+@@ -0,0 +20,1 @@\n++}\n"},{"id":"391310","messageId":"20200207005254.1495851-9-sandals@crustytoothpaste.net","threadId":"52756","inReplyTo":"20200207005254.1495851-1-sandals@crustytoothpaste.net","subject":"[PATCH v3 08/21] t4211: move SHA-1-specific test cases into a directory","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2020-02-07T00:52:41Z","receivedAt":"2020-02-07T00:53:59Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"In preparation for adding SHA-256 support to this test, let's move the\nSHA-1-specific expected output into a directory called \"sha1\".  This\nwill allow us to add a similar directory for SHA-256 as well.\n\nSigned-off-by: brian m. carlson <sandals@crustytoothpaste.net>\n---\n t/t4211-line-log.sh                                 | 2 +-\n t/t4211/{ => sha1}/expect.beginning-of-file         | 0\n t/t4211/{ => sha1}/expect.end-of-file               | 0\n t/t4211/{ => sha1}/expect.move-support-f            | 0\n t/t4211/{ => sha1}/expect.multiple                  | 0\n t/t4211/{ => sha1}/expect.multiple-overlapping      | 0\n t/t4211/{ => sha1}/expect.multiple-superset         | 0\n t/t4211/{ => sha1}/expect.parallel-change-f-to-main | 0\n t/t4211/{ => sha1}/expect.simple-f                  | 0\n t/t4211/{ => sha1}/expect.simple-f-to-main          | 0\n t/t4211/{ => sha1}/expect.simple-main               | 0\n t/t4211/{ => sha1}/expect.simple-main-to-end        | 0\n t/t4211/{ => sha1}/expect.two-ranges                | 0\n t/t4211/{ => sha1}/expect.vanishes-early            | 0\n 14 files changed, 1 insertion(+), 1 deletion(-)\n rename t/t4211/{ => sha1}/expect.beginning-of-file (100%)\n rename t/t4211/{ => sha1}/expect.end-of-file (100%)\n rename t/t4211/{ => sha1}/expect.move-support-f (100%)\n rename t/t4211/{ => sha1}/expect.multiple (100%)\n rename t/t4211/{ => sha1}/expect.multiple-overlapping (100%)\n rename t/t4211/{ => sha1}/expect.multiple-superset (100%)\n rename t/t4211/{ => sha1}/expect.parallel-change-f-to-main (100%)\n rename t/t4211/{ => sha1}/expect.simple-f (100%)\n rename t/t4211/{ => sha1}/expect.simple-f-to-main (100%)\n rename t/t4211/{ => sha1}/expect.simple-main (100%)\n rename t/t4211/{ => sha1}/expect.simple-main-to-end (100%)\n rename t/t4211/{ => sha1}/expect.two-ranges (100%)\n rename t/t4211/{ => sha1}/expect.vanishes-early (100%)\n\ndiff --git a/t/t4211-line-log.sh b/t/t4211-line-log.sh\nindex 8319163744..63a3bf28a5 100755\n--- a/t/t4211-line-log.sh\n+++ b/t/t4211-line-log.sh\n@@ -11,7 +11,7 @@ test_expect_success 'setup (import history)' '\n canned_test_1 () {\n \ttest_expect_$1 \"$2\" \"\n \t\tgit log $2 >actual &&\n-\t\ttest_cmp \\\"\\$TEST_DIRECTORY\\\"/t4211/expect.$3 actual\n+\t\ttest_cmp \\\"\\$TEST_DIRECTORY\\\"/t4211/sha1/expect.$3 actual\n \t\"\n }\n \ndiff --git a/t/t4211/expect.beginning-of-file b/t/t4211/sha1/expect.beginning-of-file\nsimilarity index 100%\nrename from t/t4211/expect.beginning-of-file\nrename to t/t4211/sha1/expect.beginning-of-file\ndiff --git a/t/t4211/expect.end-of-file b/t/t4211/sha1/expect.end-of-file\nsimilarity index 100%\nrename from t/t4211/expect.end-of-file\nrename to t/t4211/sha1/expect.end-of-file\ndiff --git a/t/t4211/expect.move-support-f b/t/t4211/sha1/expect.move-support-f\nsimilarity index 100%\nrename from t/t4211/expect.move-support-f\nrename to t/t4211/sha1/expect.move-support-f\ndiff --git a/t/t4211/expect.multiple b/t/t4211/sha1/expect.multiple\nsimilarity index 100%\nrename from t/t4211/expect.multiple\nrename to t/t4211/sha1/expect.multiple\ndiff --git a/t/t4211/expect.multiple-overlapping b/t/t4211/sha1/expect.multiple-overlapping\nsimilarity index 100%\nrename from t/t4211/expect.multiple-overlapping\nrename to t/t4211/sha1/expect.multiple-overlapping\ndiff --git a/t/t4211/expect.multiple-superset b/t/t4211/sha1/expect.multiple-superset\nsimilarity index 100%\nrename from t/t4211/expect.multiple-superset\nrename to t/t4211/sha1/expect.multiple-superset\ndiff --git a/t/t4211/expect.parallel-change-f-to-main b/t/t4211/sha1/expect.parallel-change-f-to-main\nsimilarity index 100%\nrename from t/t4211/expect.parallel-change-f-to-main\nrename to t/t4211/sha1/expect.parallel-change-f-to-main\ndiff --git a/t/t4211/expect.simple-f b/t/t4211/sha1/expect.simple-f\nsimilarity index 100%\nrename from t/t4211/expect.simple-f\nrename to t/t4211/sha1/expect.simple-f\ndiff --git a/t/t4211/expect.simple-f-to-main b/t/t4211/sha1/expect.simple-f-to-main\nsimilarity index 100%\nrename from t/t4211/expect.simple-f-to-main\nrename to t/t4211/sha1/expect.simple-f-to-main\ndiff --git a/t/t4211/expect.simple-main b/t/t4211/sha1/expect.simple-main\nsimilarity index 100%\nrename from t/t4211/expect.simple-main\nrename to t/t4211/sha1/expect.simple-main\ndiff --git a/t/t4211/expect.simple-main-to-end b/t/t4211/sha1/expect.simple-main-to-end\nsimilarity index 100%\nrename from t/t4211/expect.simple-main-to-end\nrename to t/t4211/sha1/expect.simple-main-to-end\ndiff --git a/t/t4211/expect.two-ranges b/t/t4211/sha1/expect.two-ranges\nsimilarity index 100%\nrename from t/t4211/expect.two-ranges\nrename to t/t4211/sha1/expect.two-ranges\ndiff --git a/t/t4211/expect.vanishes-early b/t/t4211/sha1/expect.vanishes-early\nsimilarity index 100%\nrename from t/t4211/expect.vanishes-early\nrename to t/t4211/sha1/expect.vanishes-early\n"}]}