summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlmcglash <lmcglash@mathworks.com>2023-03-10 08:51:43 +0000
committerlmcglash <lmcglash@mathworks.com>2023-03-10 08:51:43 +0000
commit570ef74a07f80d8890a2bf0125d72ee42f83187e (patch)
treec3106ddd08967e3f071f1eec872a1d6db01dec37
parenta9793ac643a0cd82b00970d0d6e0b67681ec3112 (diff)
parentd066d0d95c43e97df6624292f3f527f9372ca8fe (diff)
downloadlibgit2-570ef74a07f80d8890a2bf0125d72ee42f83187e.tar.gz
Merge commit 'd066d0d95c43e97df6624292f3f527f9372ca8fe'
-rw-r--r--.github/workflows/benchmark.yml8
-rw-r--r--.github/workflows/main.yml31
-rw-r--r--.github/workflows/nightly.yml44
-rw-r--r--CMakeLists.txt2
-rw-r--r--COPYING30
-rw-r--r--README.md11
-rwxr-xr-xci/build.sh20
-rw-r--r--ci/docker/xenial16
-rwxr-xr-xci/setup-mingw-build.sh4
-rwxr-xr-xci/setup-win32-build.sh27
-rwxr-xr-xci/test.sh134
-rw-r--r--cmake/ExperimentalFeatures.cmake11
-rw-r--r--deps/ntlmclient/CMakeLists.txt2
-rw-r--r--docs/changelog.md119
-rw-r--r--examples/index-pack.c9
-rw-r--r--fuzzers/objects_fuzzer.c2
-rw-r--r--fuzzers/packfile_fuzzer.c9
-rw-r--r--include/git2/common.h12
-rw-r--r--include/git2/experimental.h20
-rw-r--r--include/git2/indexer.h29
-rw-r--r--include/git2/object.h30
-rw-r--r--include/git2/odb_backend.h68
-rw-r--r--include/git2/repository.h21
-rw-r--r--include/git2/stash.h66
-rw-r--r--include/git2/strarray.h13
-rw-r--r--include/git2/sys/transport.h12
-rw-r--r--include/git2/version.h6
-rw-r--r--package.json2
-rw-r--r--src/cli/CMakeLists.txt3
-rw-r--r--src/cli/cmd_hash_object.c32
-rw-r--r--src/cli/opt.c2
-rw-r--r--src/libgit2/CMakeLists.txt16
-rw-r--r--src/libgit2/attrcache.c2
-rw-r--r--src/libgit2/blob.c6
-rw-r--r--src/libgit2/blob.h4
-rw-r--r--src/libgit2/clone.c34
-rw-r--r--src/libgit2/commit.c60
-rw-r--r--src/libgit2/commit.h32
-rw-r--r--src/libgit2/commit_graph.c39
-rw-r--r--src/libgit2/commit_graph.h3
-rw-r--r--src/libgit2/commit_list.c6
-rw-r--r--src/libgit2/config.c2
-rw-r--r--src/libgit2/config_file.c4
-rw-r--r--src/libgit2/describe.c2
-rw-r--r--src/libgit2/diff_file.c7
-rw-r--r--src/libgit2/experimental.h.in7
-rw-r--r--src/libgit2/fetch.c4
-rw-r--r--src/libgit2/index.c5
-rw-r--r--src/libgit2/indexer.c148
-rw-r--r--src/libgit2/libgit2.c19
-rw-r--r--src/libgit2/midx.c5
-rw-r--r--src/libgit2/mwindow.c7
-rw-r--r--src/libgit2/mwindow.h5
-rw-r--r--src/libgit2/object.c45
-rw-r--r--src/libgit2/object.h3
-rw-r--r--src/libgit2/odb.c36
-rw-r--r--src/libgit2/odb_loose.c34
-rw-r--r--src/libgit2/odb_pack.c138
-rw-r--r--src/libgit2/oid.h41
-rw-r--r--src/libgit2/pack-objects.c13
-rw-r--r--src/libgit2/pack.c156
-rw-r--r--src/libgit2/pack.h44
-rw-r--r--src/libgit2/push.c13
-rw-r--r--src/libgit2/refdb_fs.c109
-rw-r--r--src/libgit2/reflog.c14
-rw-r--r--src/libgit2/reflog.h3
-rw-r--r--src/libgit2/remote.c67
-rw-r--r--src/libgit2/remote.h40
-rw-r--r--src/libgit2/repository.c246
-rw-r--r--src/libgit2/repository.h9
-rw-r--r--src/libgit2/revparse.c30
-rw-r--r--src/libgit2/revwalk.c6
-rw-r--r--src/libgit2/stash.c227
-rw-r--r--src/libgit2/strarray.c1
-rw-r--r--src/libgit2/strarray.h25
-rw-r--r--src/libgit2/streams/openssl.c2
-rw-r--r--src/libgit2/streams/openssl_dynamic.c10
-rw-r--r--src/libgit2/streams/socket.c5
-rw-r--r--src/libgit2/submodule.c8
-rw-r--r--src/libgit2/sysdir.c301
-rw-r--r--src/libgit2/sysdir.h50
-rw-r--r--src/libgit2/tag.c34
-rw-r--r--src/libgit2/tag.h4
-rw-r--r--src/libgit2/transports/http.c15
-rw-r--r--src/libgit2/transports/httpclient.c9
-rw-r--r--src/libgit2/transports/httpclient.h10
-rw-r--r--src/libgit2/transports/local.c14
-rw-r--r--src/libgit2/transports/smart.c35
-rw-r--r--src/libgit2/transports/smart.h11
-rw-r--r--src/libgit2/transports/smart_pkt.c187
-rw-r--r--src/libgit2/transports/smart_protocol.c49
-rw-r--r--src/libgit2/transports/ssh.c434
-rw-r--r--src/libgit2/transports/winhttp.c13
-rw-r--r--src/libgit2/tree.c38
-rw-r--r--src/libgit2/tree.h4
-rw-r--r--src/libgit2/worktree.c5
-rw-r--r--src/util/CMakeLists.txt2
-rw-r--r--src/util/fs_path.c2
-rw-r--r--src/util/futils.c3
-rw-r--r--src/util/hash.h13
-rw-r--r--src/util/hash/openssl.c7
-rw-r--r--src/util/hash/rfc6234/sha.h112
-rw-r--r--src/util/net.c422
-rw-r--r--src/util/net.h7
-rw-r--r--src/util/posix.h2
-rw-r--r--src/util/rand.c4
-rw-r--r--src/util/regexp.c6
-rw-r--r--src/util/thread.h39
-rw-r--r--src/util/util.h1
-rw-r--r--src/util/win32/findfile.c286
-rw-r--r--src/util/win32/findfile.h22
-rw-r--r--tests/clar/clar.c70
-rw-r--r--tests/clar/clar.h6
-rw-r--r--tests/clar/clar/print.h41
-rw-r--r--tests/clar/clar/summary.h29
-rw-r--r--tests/clar/clar_libgit2.c108
-rw-r--r--tests/clar/clar_libgit2.h24
-rw-r--r--tests/clar/main.c1
-rw-r--r--tests/libgit2/CMakeLists.txt4
-rw-r--r--tests/libgit2/commit/parse.c2
-rw-r--r--tests/libgit2/config/include.c12
-rw-r--r--tests/libgit2/config/read.c9
-rw-r--r--tests/libgit2/core/oid.c31
-rw-r--r--tests/libgit2/core/opts.c15
-rw-r--r--tests/libgit2/core/structinit.c5
-rw-r--r--tests/libgit2/diff/workdir.c36
-rw-r--r--tests/libgit2/email/create.c.bak386
-rw-r--r--tests/libgit2/graph/commitgraph.c41
-rw-r--r--tests/libgit2/ignore/path.c10
-rw-r--r--tests/libgit2/ignore/status.c8
-rw-r--r--tests/libgit2/index/addall.c46
-rw-r--r--tests/libgit2/object/commit/parse.c298
-rw-r--r--tests/libgit2/object/lookup256.c153
-rw-r--r--tests/libgit2/object/tag/parse.c4
-rw-r--r--tests/libgit2/object/tree/parse.c4
-rw-r--r--tests/libgit2/object/validate.c154
-rw-r--r--tests/libgit2/odb/backend/loose.c43
-rw-r--r--tests/libgit2/odb/foreach.c11
-rw-r--r--tests/libgit2/odb/loose.c16
-rw-r--r--tests/libgit2/odb/open.c34
-rw-r--r--tests/libgit2/odb/pack_data_256.h154
-rw-r--r--tests/libgit2/odb/pack_data_one256.h21
-rw-r--r--tests/libgit2/odb/packed256.c98
-rw-r--r--tests/libgit2/odb/packedone.c (renamed from tests/libgit2/odb/packed_one.c)17
-rw-r--r--tests/libgit2/odb/packedone256.c78
-rw-r--r--tests/libgit2/odb/sorting.c6
-rw-r--r--tests/libgit2/online/clone.c234
-rw-r--r--tests/libgit2/online/push.c25
-rw-r--r--tests/libgit2/pack/indexer.c53
-rw-r--r--tests/libgit2/pack/packbuilder.c17
-rw-r--r--tests/libgit2/refs/revparse.c3
-rw-r--r--tests/libgit2/remote/httpproxy.c40
-rw-r--r--tests/libgit2/repo/extensions.c2
-rw-r--r--tests/libgit2/repo/init.c35
-rw-r--r--tests/libgit2/repo/objectformat.c69
-rw-r--r--tests/libgit2/repo/open.c95
-rw-r--r--tests/libgit2/revwalk/basic.c17
-rw-r--r--tests/libgit2/stash/save.c37
-rw-r--r--tests/libgit2/submodule/update.c20
-rw-r--r--tests/libgit2/transports/smart/packet.c37
-rw-r--r--tests/libgit2/win32/systemdir.c1
-rw-r--r--tests/libgit2/worktree/worktree.c2
-rw-r--r--tests/resources/namespace.git/COMMIT_EDITMSG1
-rw-r--r--tests/resources/namespace.git/HEAD1
-rw-r--r--tests/resources/namespace.git/config7
-rw-r--r--tests/resources/namespace.git/description1
-rw-r--r--tests/resources/namespace.git/indexbin0 -> 321 bytes
-rw-r--r--tests/resources/namespace.git/info/exclude6
-rw-r--r--tests/resources/namespace.git/logs/HEAD9
-rw-r--r--tests/resources/namespace.git/logs/refs/heads/branch3
-rw-r--r--tests/resources/namespace.git/logs/refs/heads/four2
-rw-r--r--tests/resources/namespace.git/logs/refs/heads/main2
-rw-r--r--tests/resources/namespace.git/logs/refs/heads/one1
-rw-r--r--tests/resources/namespace.git/objects/04/433ff5b52d6ad534fd6288de4a57b81cc12188bin0 -> 160 bytes
-rw-r--r--tests/resources/namespace.git/objects/0a/890bd10328d68f6d85efd2535e3a4c588ee8e6bin0 -> 54 bytes
-rw-r--r--tests/resources/namespace.git/objects/10/fcb1c85bd6b3bc6f43e0a3932ff5859121a84ebin0 -> 54 bytes
-rw-r--r--tests/resources/namespace.git/objects/24/bbdca8b223aaa3384d78312f730c58492aa30abin0 -> 54 bytes
-rw-r--r--tests/resources/namespace.git/objects/27/0c611ee72c567bc1b2abec4cbc345bab9f15babin0 -> 30 bytes
-rw-r--r--tests/resources/namespace.git/objects/2b/df67abb163a4ffb2d7f3f0880c9fe5068ce782bin0 -> 21 bytes
-rw-r--r--tests/resources/namespace.git/objects/3d/669d1b33ec8add4609d8043d025527db4989eb2
-rw-r--r--tests/resources/namespace.git/objects/42/0d51ce75a87909e29659da2072ffd3d5daf5b7bin0 -> 128 bytes
-rw-r--r--tests/resources/namespace.git/objects/56/26abf0f72e58d7a153368ba57db4c673c0e171bin0 -> 19 bytes
-rw-r--r--tests/resources/namespace.git/objects/56/300b5eae653453102ac1213e921973c066425bbin0 -> 95 bytes
-rw-r--r--tests/resources/namespace.git/objects/7e/eaa70d7c5592db920a2e107ce3918bd4c8a4252
-rw-r--r--tests/resources/namespace.git/objects/85/10665149157c2bc901848c3e0b746954e9cbd9bin0 -> 20 bytes
-rw-r--r--tests/resources/namespace.git/objects/9e/bfa6bdc9d38075d29d26aa5df89b1cf635b269bin0 -> 137 bytes
-rw-r--r--tests/resources/namespace.git/objects/9e/f15e3c5c0c8c6913936f843ad967cbe5541f0dbin0 -> 121 bytes
-rw-r--r--tests/resources/namespace.git/objects/af/5626b4a114abcb82d63db7c8082c3c4756e51bbin0 -> 30 bytes
-rw-r--r--tests/resources/namespace.git/objects/af/81e4bd99cbfe6f05a501f1e4c82db2bf803e02bin0 -> 30 bytes
-rw-r--r--tests/resources/namespace.git/objects/bf/d17f429f4e2d121769213171ad57ca2e5173f92
-rw-r--r--tests/resources/namespace.git/objects/ec/947e3dd7a7752d078f1ed0cfde7457b21fef58bin0 -> 54 bytes
-rw-r--r--tests/resources/namespace.git/objects/f7/19efd430d52bcfc8566a43b2eb655688d38871bin0 -> 19 bytes
-rw-r--r--tests/resources/namespace.git/objects/f7/5ba05f340c51065cbea2e1fdbfe5fe13144c97bin0 -> 30 bytes
-rw-r--r--tests/resources/namespace.git/refs/heads/branch1
-rw-r--r--tests/resources/namespace.git/refs/heads/main1
-rw-r--r--tests/resources/namespace.git/refs/namespaces/name1/refs/heads/four1
-rw-r--r--tests/resources/namespace.git/refs/namespaces/name1/refs/heads/one1
-rw-r--r--tests/resources/packfile-sha256/pack-b4a043c0ec5e079e8ac67d823776d752efc71661592db317474a0cf292915f31.idxbin0 -> 1376 bytes
-rw-r--r--tests/resources/packfile-sha256/pack-b4a043c0ec5e079e8ac67d823776d752efc71661592db317474a0cf292915f31.packbin0 -> 1406 bytes
-rw-r--r--tests/resources/testrepo_256.git/FETCH_HEAD2
-rw-r--r--tests/resources/testrepo_256.git/HEAD1
-rw-r--r--tests/resources/testrepo_256.git/HEAD_TRACKER1
-rw-r--r--tests/resources/testrepo_256.git/config8
-rw-r--r--tests/resources/testrepo_256.git/description1
-rwxr-xr-xtests/resources/testrepo_256.git/hooks/applypatch-msg.sample15
-rwxr-xr-xtests/resources/testrepo_256.git/hooks/commit-msg.sample24
-rwxr-xr-xtests/resources/testrepo_256.git/hooks/fsmonitor-watchman.sample173
-rwxr-xr-xtests/resources/testrepo_256.git/hooks/post-update.sample8
-rwxr-xr-xtests/resources/testrepo_256.git/hooks/pre-applypatch.sample14
-rwxr-xr-xtests/resources/testrepo_256.git/hooks/pre-commit.sample49
-rwxr-xr-xtests/resources/testrepo_256.git/hooks/pre-merge-commit.sample13
-rwxr-xr-xtests/resources/testrepo_256.git/hooks/pre-push.sample53
-rwxr-xr-xtests/resources/testrepo_256.git/hooks/pre-rebase.sample169
-rwxr-xr-xtests/resources/testrepo_256.git/hooks/pre-receive.sample24
-rwxr-xr-xtests/resources/testrepo_256.git/hooks/prepare-commit-msg.sample42
-rwxr-xr-xtests/resources/testrepo_256.git/hooks/push-to-checkout.sample78
-rwxr-xr-xtests/resources/testrepo_256.git/hooks/update.sample128
-rw-r--r--tests/resources/testrepo_256.git/indexbin0 -> 11148 bytes
-rw-r--r--tests/resources/testrepo_256.git/info/exclude6
-rw-r--r--tests/resources/testrepo_256.git/logs/HEAD7
-rw-r--r--tests/resources/testrepo_256.git/logs/refs/heads/br22
-rw-r--r--tests/resources/testrepo_256.git/logs/refs/heads/master2
-rw-r--r--tests/resources/testrepo_256.git/logs/refs/heads/not-good1
-rw-r--r--tests/resources/testrepo_256.git/logs/refs/heads/with-empty-log0
-rw-r--r--tests/resources/testrepo_256.git/logs/refs/remotes/origin/HEAD1
-rw-r--r--tests/resources/testrepo_256.git/logs/refs/remotes/test/master2
-rw-r--r--tests/resources/testrepo_256.git/object-idx1700
-rw-r--r--tests/resources/testrepo_256.git/objects/00/404e6179d86039bbc01a925bdc34ccdab778bd1d824f5562aaa319c6c8f045bin0 -> 267 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/01/18010feb81fe41b9df646d13866742a9070b56fd0ba9ab8dff828fc36c1f781
-rw-r--r--tests/resources/testrepo_256.git/objects/02/df938cfb169b0b6ba0dd16acdd727ea9364f7d48c55afed2f7dd889804065bbin0 -> 103 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/05/f7b70a01b0ade8afa5a5fcd19f12cc38faf337d10ec03ef4363d1a86f63750bin0 -> 21 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/14/bd335f9d7188c778d44eba8801fe9bda46b66593291f5b9f7cd5f8888af12f1
-rw-r--r--tests/resources/testrepo_256.git/objects/17/9496410f66032c03bd2b7e8ddfc9c8c47820fab5615cc04d904989ce800498bin0 -> 64 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/19/0a1349522cc11f8682e34acca4ce4e1ea8508dfd77c24cefd461b65cead09ebin0 -> 92 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/1b/4b74772bd83ff28bf44cda9be93f4afc2279623bb5b36c9194a660b7623c24bin0 -> 236 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/21/e1e1ebe45b2c1ef79ab050334e36a8015a546f0740bea4505e10d81a946f61bin0 -> 162 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/23/8a501cf11a036f2f248008d88e14af624bb07fced6390997a0fa6abdad950abin0 -> 143 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/26/149bf1ac4612f24b532ae50a12b15f26aace3718749624f008bde68670352abin0 -> 202 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/2d/b6069c27ca4c08b784048644c307e17d0afe29b55f6488398cb59f13feb2f2bin0 -> 238 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/33/e415b835a670bb5c3c760efa0433ac0cbd2d44679f68f2df3a9ae7014cf2a8bin0 -> 19 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/34/f79ad1c813b93d2ee11c830c2134815a31d9629e6aa9773338fedaab90976b1
-rw-r--r--tests/resources/testrepo_256.git/objects/36/eac24505d4c4405864ccf2f30d79af178374166daeceefbf11e2f058d30d60bin0 -> 21 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/39/bf1ac28cc3f8432ba7cfeeca6bfffd9a0fe641784db85de2eb0f57b7553869bin0 -> 106 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/3b/58565ee067f13349cd4f89aa396d10f71c69e168d5c48ea23de59734ec3ab1bin0 -> 38 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/43/e084a4599ca42c476919917e3db8fde0045ee66305fd5e634b0c793c536a1b1
-rw-r--r--tests/resources/testrepo_256.git/objects/47/3a0f4c3be8a93681a267e3b1e9a7dcda1185436fe141f7749120a303721813bin0 -> 15 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/4b/c142808884e472ee6cc331b132e66ef18f564d41efb055804ec1dd28efb3f5bin0 -> 28 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/4d/f8ed86acaac5dc82b5652170996ce459d39e3a441e9759b635b0bc4ecc43fdbin0 -> 57 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/5a/2d5699fea33657b42ba98c22b7898baaa0eda205a21cafdcb7e0f94b07bb9bbin0 -> 64 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/5c/a8959deb2b8327458e0344523eb1ddeeef4bce03e35864640b452f84d268481
-rw-r--r--tests/resources/testrepo_256.git/objects/5d/bb1fff5c0094b31b25b4635ab9fbee66d65fe5dda47dd0ac5f01dd69a84c6f3
-rw-r--r--tests/resources/testrepo_256.git/objects/61/489e9e831f1d9001084d39b79f964c293db8620d679ea3596673c8a326446ebin0 -> 157 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/6d/5fd291bb0f67444e99ab492f1bf1fcdf5dca09dab24cf331e05111b4cfc1a3bin0 -> 24 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/70/30f925768d9beb65654ab8f436e3ca0a82b25eddefd237bf5a26a0441c2aa7bin0 -> 107 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/73/8ff86401dbc5af692c83e660a4d510603c3f36e782a1a32ebd0388db6411edbin0 -> 181 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/73/b4f3c4f3182e6c8dd2c98aeb2c7811556538e7673e4b325307c71685fbf5b6bin0 -> 108 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/7e/4633ae1b0e83503dbea4417f9d5ccaf22b877c5a4522b6d1d2b16090ee2f6fbin0 -> 141 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/7e/9424c06052ca33bfc599bccadee60065d8664a9af7648a1455100c4f772e1c2
-rw-r--r--tests/resources/testrepo_256.git/objects/80/91b686de8bf697ef632dda9b3179f2419717275e3bfd2055b303489dbbfa471
-rw-r--r--tests/resources/testrepo_256.git/objects/81/55958bbda08eed88c8ac908dc44452ed38911cffa54ccc06076f30a1ffb1bfbin0 -> 108 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/90/1505c3355518bee35475c5d3f23bac1dded688b2bd314cc32b7f157e1007241
-rw-r--r--tests/resources/testrepo_256.git/objects/93/1093620e5f050e2127fb0b96786ebaa9ee6535fb698ec01b5f7a800fa27cbebin0 -> 137 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/94/ed253efa9e86fc636805c294c441d08b89b455903c0c14e9b16587fec081f5bin0 -> 188 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/96/c18f0297e38d01f4b2dacddea4259aea6b2961eb0822bd2c0c3f6029030045bin0 -> 18 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/9c/cfa556cd7f73b426a7bedb7fc3a850e94f8c5ac1d71b9afa365a89005aff54bin0 -> 221 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/9d/aab17c25f647d652c72c8cc3cf4602c270a369beebc7d0b67238897bbc426b1
-rw-r--r--tests/resources/testrepo_256.git/objects/a4/813ef6708e6011e8187224297e83e4a285f58bf5eabb1db270351388603c95bin0 -> 244 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/ab/ee32b3339d1566d75613ea61f40c14bdfc5b101b60fde4f44b58dd06667640bin0 -> 63 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/ae/a29dc305d40e362df25c3fdeed5502fd56b182af01b7740d297a24459333c5bin0 -> 26 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/b1/95873b48c824d995c974a3497ade7f62d2cd818bf388775cfa721de4068ebdbin0 -> 54 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/b2/1c8c27a05a3f0bf9f0f44ebf05e11d9c591b04cfdaff7cc860310356d718271
-rw-r--r--tests/resources/testrepo_256.git/objects/b6/1b940a8cd979a32e005682c5c09c22053675e2db24ea6b4b28cc75e9c10890bin0 -> 37 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/b8/3624f6ac0995273c0034a7ab8c68929bdc91b69ad54ef94979b93eba3f6022bin0 -> 190 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/bd/f2066a28e11603a1af04157ee4aad97814279fe500340eb3465797cbd3be23bin0 -> 23 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/bf/a3b3b9a161d354e2254a444b12c412210e9689c17e51bfc318ce4bb4360f19bin0 -> 57 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/bf/cc4074ac517ed24d61b0aaa96359f304c3dc97e95f336269ed474ea846ada5bin0 -> 198 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/c2/58f010a08328a29cde33411d955520e0375fcbbcc14b7636a70f7536c32ef62
-rw-r--r--tests/resources/testrepo_256.git/objects/ca/31f7336e882a233a2943787c5e94ba024ac9a4f763cb1d9bfd8e63aa7f7269bin0 -> 182 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/cb/282e7c15fd8aeb2265cd621f5a228cb33dc84192980ca426cf9ab2a48cb9f0bin0 -> 187 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/cc/b5a03da85607c230d111abfa899655d1b00e6529101a40d42f6acb059dff9fbin0 -> 21 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/cf/84e5be57f8d5d51f136d3d137b654c602721c469c1b0a58e7e95647a9cf1c03
-rw-r--r--tests/resources/testrepo_256.git/objects/d8/8b60d2641df3656381dc8e201abb820a414de03eb63c065b06a2ab37d3f5ca1
-rw-r--r--tests/resources/testrepo_256.git/objects/de/caff3051968d1f3a2defd3d4a80ced03101555e1fd8913b3544026c0717d4fbin0 -> 181 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/eb/ead5965196dfaeab52b1a5d92b78e54493fdaa78f72268d4cc69b61d5feee1bin0 -> 21 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/f2/a108f86a3b4fd9ad75ed55e9cb3cb46e348fca3b9dba3db64f7c9f64b8a736bin0 -> 157 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/f2/c8da1a7c2eb49ff25c47441f0b3f387faeddde1b37d0ad2f3f6a63f5327978bin0 -> 192 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/f3/1459efb9367c5a19c9dd24c75107423d5773066922ea5e55eaeb6490979562bin0 -> 157 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/pack/pack-b87f1f214098b19ce092afb9ef6e7643653c03e7f91faa27b767e3eb8225f0f6.idxbin0 -> 1336 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/pack/pack-b87f1f214098b19ce092afb9ef6e7643653c03e7f91faa27b767e3eb8225f0f6.packbin0 -> 569 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/pack/pack-e2f07f30db7e480ea84a0e64ee791b9b270067124b2609019b74f33f256f33fa.idxbin0 -> 66216 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/pack/pack-e2f07f30db7e480ea84a0e64ee791b9b270067124b2609019b74f33f256f33fa.packbin0 -> 562646 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/pack/pack-f72bbfa35af982c2a60735152c80b24ee981cf102db76764c383f9b87935d0d3.idxbin0 -> 1336 bytes
-rw-r--r--tests/resources/testrepo_256.git/objects/pack/pack-f72bbfa35af982c2a60735152c80b24ee981cf102db76764c383f9b87935d0d3.packbin0 -> 612 bytes
-rw-r--r--tests/resources/testrepo_256.git/packed-refs3
-rw-r--r--tests/resources/testrepo_256.git/refs/blobs/annotated_tag_to_blob1
-rw-r--r--tests/resources/testrepo_256.git/refs/heads/br21
-rw-r--r--tests/resources/testrepo_256.git/refs/heads/cannot-fetch1
-rw-r--r--tests/resources/testrepo_256.git/refs/heads/chomped1
-rw-r--r--tests/resources/testrepo_256.git/refs/heads/haacked1
-rw-r--r--tests/resources/testrepo_256.git/refs/heads/master1
-rw-r--r--tests/resources/testrepo_256.git/refs/heads/not-good1
-rw-r--r--tests/resources/testrepo_256.git/refs/heads/packed-test1
-rw-r--r--tests/resources/testrepo_256.git/refs/heads/subtrees1
-rw-r--r--tests/resources/testrepo_256.git/refs/heads/test1
-rw-r--r--tests/resources/testrepo_256.git/refs/heads/track-local1
-rw-r--r--tests/resources/testrepo_256.git/refs/heads/trailing1
-rw-r--r--tests/resources/testrepo_256.git/refs/heads/with-empty-log1
-rw-r--r--tests/resources/testrepo_256.git/refs/notes/fanout1
-rw-r--r--tests/resources/testrepo_256.git/refs/remotes/test/master1
-rw-r--r--tests/resources/testrepo_256.git/refs/tags/annotated_tag_to_blob1
-rw-r--r--tests/resources/testrepo_256.git/refs/tags/e90810b1
-rw-r--r--tests/resources/testrepo_256.git/refs/tags/hard_tag1
-rw-r--r--tests/resources/testrepo_256.git/refs/tags/point_to_blob1
-rw-r--r--tests/resources/testrepo_256.git/refs/tags/taggerless1
-rw-r--r--tests/resources/testrepo_256.git/refs/tags/test1
-rw-r--r--tests/resources/testrepo_256.git/refs/tags/wrapped_tag1
-rw-r--r--tests/util/path.c6
-rw-r--r--tests/util/url/joinpath.c (renamed from tests/libgit2/network/url/joinpath.c)16
-rw-r--r--tests/util/url/parse.c (renamed from tests/libgit2/network/url/parse.c)312
-rw-r--r--tests/util/url/pattern.c (renamed from tests/libgit2/network/url/pattern.c)4
-rw-r--r--tests/util/url/redirect.c (renamed from tests/libgit2/network/url/redirect.c)26
-rw-r--r--tests/util/url/scp.c (renamed from tests/libgit2/network/url/scp.c)50
-rw-r--r--tests/util/url/valid.c (renamed from tests/libgit2/network/url/valid.c)2
323 files changed, 8392 insertions, 1976 deletions
diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml
index 285c273b1..bf2167464 100644
--- a/.github/workflows/benchmark.yml
+++ b/.github/workflows/benchmark.yml
@@ -27,7 +27,7 @@ jobs:
os: ubuntu-latest
setup-script: ubuntu
- name: "macOS"
- os: macos-10.15
+ os: macos-11
env:
CC: clang
CMAKE_OPTIONS: -DREGEX_BACKEND=regcomp_l -DDEPRECATE_HARD=ON -DUSE_GSSAPI=ON -DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_CLI=ON -DCMAKE_BUILD_TYPE=Release
@@ -50,7 +50,7 @@ jobs:
runs-on: ${{ matrix.platform.os }}
steps:
- name: Check out repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
path: source
fetch-depth: 0
@@ -66,9 +66,9 @@ jobs:
- name: Benchmark
run: |
if [[ "$(uname -s)" == MINGW* ]]; then
- GIT2_CLI="$(cygpath -w $(pwd))\\build\\Release\\git2_cli"
+ GIT2_CLI="$(cygpath -w $(pwd))\\build\\Release\\git2"
else
- GIT2_CLI="$(pwd)/build/git2_cli"
+ GIT2_CLI="$(pwd)/build/git2"
fi
mkdir benchmark && cd benchmark
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index ce14dd0fb..0eedab87a 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -48,7 +48,7 @@ jobs:
name: "Create container: ${{ matrix.container.name }}"
steps:
- name: Check out repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
path: source
fetch-depth: 0
@@ -122,7 +122,7 @@ jobs:
os: ubuntu-latest
- name: "macOS"
id: macos
- os: macos-10.15
+ os: macos-11
env:
CC: clang
CMAKE_OPTIONS: -DREGEX_BACKEND=regcomp_l -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=leaks -DUSE_GSSAPI=ON
@@ -133,19 +133,25 @@ jobs:
- name: "Windows (amd64, Visual Studio)"
id: windows-amd64-vs
os: windows-2019
+ setup-script: win32
env:
ARCH: amd64
CMAKE_GENERATOR: Visual Studio 16 2019
- CMAKE_OPTIONS: -A x64 -DWIN32_LEAKCHECK=ON -DDEPRECATE_HARD=ON
+ CMAKE_OPTIONS: -A x64 -DWIN32_LEAKCHECK=ON -DDEPRECATE_HARD=ON -DUSE_SSH=ON -DCMAKE_PREFIX_PATH=D:\Temp\libssh2
+ BUILD_PATH: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\CMake\bin;D:\Temp\libssh2\bin
+ BUILD_TEMP: D:\Temp
SKIP_SSH_TESTS: true
SKIP_NEGOTIATE_TESTS: true
- name: "Windows (x86, Visual Studio)"
id: windows-x86-vs
os: windows-2019
+ setup-script: win32
env:
ARCH: x86
CMAKE_GENERATOR: Visual Studio 16 2019
- CMAKE_OPTIONS: -A Win32 -DWIN32_LEAKCHECK=ON -DDEPRECATE_HARD=ON -DUSE_SHA1=HTTPS -DUSE_BUNDLED_ZLIB=ON
+ CMAKE_OPTIONS: -A Win32 -DWIN32_LEAKCHECK=ON -DDEPRECATE_HARD=ON -DUSE_SHA1=HTTPS -DUSE_BUNDLED_ZLIB=ON -DUSE_SSH=ON -DCMAKE_PREFIX_PATH=D:\Temp\libssh2
+ BUILD_PATH: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\CMake\bin;D:\Temp\libssh2\bin
+ BUILD_TEMP: D:\Temp
SKIP_SSH_TESTS: true
SKIP_NEGOTIATE_TESTS: true
- name: "Windows (amd64, mingw)"
@@ -226,11 +232,11 @@ jobs:
env:
CC: clang
CMAKE_GENERATOR: Ninja
- CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=ON
+ CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=ON -DEXPERIMENTAL_SHA256=ON
os: ubuntu-latest
- name: "macOS (SHA256)"
id: macos
- os: macos-10.15
+ os: macos-11
env:
CC: clang
CMAKE_OPTIONS: -DREGEX_BACKEND=regcomp_l -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=leaks -DUSE_GSSAPI=ON -DEXPERIMENTAL_SHA256=ON
@@ -253,7 +259,7 @@ jobs:
name: "Build: ${{ matrix.platform.name }}"
steps:
- name: Check out repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
path: source
fetch-depth: 0
@@ -283,6 +289,10 @@ jobs:
- name: Build and test
run: |
export GITTEST_NEGOTIATE_PASSWORD="${{ secrets.GITTEST_NEGOTIATE_PASSWORD }}"
+ export GITTEST_GITHUB_SSH_KEY="${{ secrets.GITTEST_GITHUB_SSH_KEY }}"
+ export GITTEST_GITHUB_SSH_PUBKEY="${{ secrets.GITTEST_GITHUB_SSH_PUBKEY }}"
+ export GITTEST_GITHUB_SSH_PASSPHRASE="${{ secrets.GITTEST_GITHUB_SSH_PASSPHRASE }}"
+ export GITTEST_GITHUB_SSH_REMOTE_HOSTKEY="${{ secrets.GITTEST_GITHUB_SSH_REMOTE_HOSTKEY }}"
if [ -n "${{ matrix.platform.container.name }}" ]; then
mkdir build
@@ -323,12 +333,13 @@ jobs:
test_results:
name: Test results
needs: [ build ]
+ if: always()
runs-on: ubuntu-latest
steps:
- name: Download test results
uses: actions/download-artifact@v3
- name: Generate test summary
- uses: test-summary/action@v1
+ uses: test-summary/action@v2
with:
paths: 'test-results-*/*.xml'
@@ -345,7 +356,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
path: source
fetch-depth: 0
@@ -364,7 +375,7 @@ jobs:
cm doc api.docurium
git checkout gh-pages
zip --exclude .git/\* --exclude .gitignore --exclude .gitattributes -r api-documentation.zip .
- - uses: actions/upload-artifact@v2
+ - uses: actions/upload-artifact@v3
name: Upload artifact
with:
name: api-documentation
diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml
index 856da28a3..5a0b7d12b 100644
--- a/.github/workflows/nightly.yml
+++ b/.github/workflows/nightly.yml
@@ -154,7 +154,7 @@ jobs:
SKIP_SSH_TESTS: true
os: ubuntu-latest
- name: "macOS"
- os: macos-10.15
+ os: macos-11
env:
CC: clang
CMAKE_OPTIONS: -DREGEX_BACKEND=regcomp_l -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=leaks -DUSE_GSSAPI=ON
@@ -265,13 +265,43 @@ jobs:
RUN_INVASIVE_TESTS: true
SKIP_PROXY_TESTS: true
os: ubuntu-latest
+
+ # Experimental: SHA256 support
+ - name: "Linux (SHA256, Xenial, Clang, OpenSSL)"
+ id: xenial-clang-openssl
+ container:
+ name: xenial
+ env:
+ CC: clang
+ CMAKE_GENERATOR: Ninja
+ CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=ON
+ os: ubuntu-latest
+ - name: "macOS (SHA256)"
+ id: macos
+ os: macos-10.15
+ env:
+ CC: clang
+ CMAKE_OPTIONS: -DREGEX_BACKEND=regcomp_l -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=leaks -DUSE_GSSAPI=ON -DEXPERIMENTAL_SHA256=ON
+ PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig
+ SKIP_SSH_TESTS: true
+ SKIP_NEGOTIATE_TESTS: true
+ setup-script: osx
+ - name: "Windows (SHA256, amd64, Visual Studio)"
+ id: windows-amd64-vs
+ os: windows-2019
+ env:
+ ARCH: amd64
+ CMAKE_GENERATOR: Visual Studio 16 2019
+ CMAKE_OPTIONS: -A x64 -DWIN32_LEAKCHECK=ON -DDEPRECATE_HARD=ON -DEXPERIMENTAL_SHA256=ON
+ SKIP_SSH_TESTS: true
+ SKIP_NEGOTIATE_TESTS: true
fail-fast: false
- name: "Build ${{ matrix.platform.name }}"
env: ${{ matrix.platform.env }}
runs-on: ${{ matrix.platform.os }}
+ name: "Build ${{ matrix.platform.name }}"
steps:
- name: Check out repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
path: source
fetch-depth: 0
@@ -333,7 +363,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
path: source
fetch-depth: 0
@@ -358,13 +388,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
fetch-depth: 0
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@v1
+ uses: github/codeql-action/init@v2
with:
languages: 'cpp'
@@ -376,4 +406,4 @@ jobs:
cmake --build .
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v1
+ uses: github/codeql-action/analyze@v2
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cf3b62246..710915da1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,7 +6,7 @@
cmake_minimum_required(VERSION 3.5.1)
-project(libgit2 VERSION "1.5.0" LANGUAGES C)
+project(libgit2 VERSION "1.6.2" LANGUAGES C)
# Add find modules to the path
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake")
diff --git a/COPYING b/COPYING
index 28226696d..25c8d8c6b 100644
--- a/COPYING
+++ b/COPYING
@@ -1184,3 +1184,33 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+----------------------------------------------------------------------
+
+The built-in git_fs_path_basename_r() function is based on the
+Android implementation, BSD licensed:
+
+Copyright (C) 2008 The Android Open Source Project
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+* Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
diff --git a/README.md b/README.md
index a9deaa01d..93476f9c0 100644
--- a/README.md
+++ b/README.md
@@ -4,8 +4,8 @@ libgit2 - the Git linkable library
| Build Status | |
| ------------ | - |
| **main** branch CI builds | [![CI Build](https://github.com/libgit2/libgit2/workflows/CI%20Build/badge.svg?event=push)](https://github.com/libgit2/libgit2/actions?query=workflow%3A%22CI+Build%22+event%3Apush) |
-| **v1.4 branch** CI builds | [![CI Build](https://github.com/libgit2/libgit2/workflows/CI%20Build/badge.svg?branch=maint%2Fv1.4&event=push)](https://github.com/libgit2/libgit2/actions?query=workflow%3A%22CI+Build%22+event%3Apush+branch%3Amaint%2Fv1.4) |
-| **v1.3 branch** CI builds | [![CI Build](https://github.com/libgit2/libgit2/workflows/CI%20Build/badge.svg?branch=maint%2Fv1.3&event=push)](https://github.com/libgit2/libgit2/actions?query=workflow%3A%22CI+Build%22+event%3Apush+branch%3Amaint%2Fv1.3) |
+| **v1.6 branch** CI builds | [![CI Build](https://github.com/libgit2/libgit2/workflows/CI%20Build/badge.svg?branch=maint%2Fv1.6&event=push)](https://github.com/libgit2/libgit2/actions?query=workflow%3A%22CI+Build%22+event%3Apush+branch%3Amaint%2Fv1.6) |
+| **v1.5 branch** CI builds | [![CI Build](https://github.com/libgit2/libgit2/workflows/CI%20Build/badge.svg?branch=maint%2Fv1.5&event=push)](https://github.com/libgit2/libgit2/actions?query=workflow%3A%22CI+Build%22+event%3Apush+branch%3Amaint%2Fv1.5) |
| **Nightly** builds | [![Nightly Build](https://github.com/libgit2/libgit2/workflows/Nightly%20Build/badge.svg)](https://github.com/libgit2/libgit2/actions?query=workflow%3A%22Nightly+Build%22) [![Coverity Scan Status](https://scan.coverity.com/projects/639/badge.svg)](https://scan.coverity.com/projects/639) |
`libgit2` is a portable, pure C implementation of the Git core methods
@@ -25,8 +25,9 @@ and on Git hosting providers like [GitHub](https://github.com/),
We perform the merge every time you click "merge pull request".
`libgit2` is licensed under a **very permissive license** (GPLv2 with a special
-Linking Exception). This basically means that you can link it (unmodified)
-with any kind of software without having to release its source code.
+Linking Exception). This means that you can link against the library with any
+kind of software without making that software fall under the GPL.
+Changes to libgit2 would still be covered under its GPL license.
Additionally, the example code has been released to the public domain (see the
[separate license](examples/COPYING) for more information).
@@ -395,7 +396,7 @@ Here are the bindings to libgit2 that are currently available:
* Pharo Smalltalk
* libgit2-pharo-bindings <https://github.com/pharo-vcs/libgit2-pharo-bindings>
* PHP
- * php-git <https://github.com/libgit2/php-git>
+ * php-git2 <https://github.com/RogerGee/php-git2>
* Python
* pygit2 <https://github.com/libgit2/pygit2>
* R
diff --git a/ci/build.sh b/ci/build.sh
index 21a45af5f..80e7a61ae 100755
--- a/ci/build.sh
+++ b/ci/build.sh
@@ -13,16 +13,30 @@ BUILD_PATH=${BUILD_PATH:=$PATH}
CMAKE=$(which cmake)
CMAKE_GENERATOR=${CMAKE_GENERATOR:-Unix Makefiles}
+indent() { sed "s/^/ /"; }
+
+cygfullpath() {
+ result=$(echo "${1}" | tr \; \\n | while read -r element; do
+ if [ "${last}" != "" ]; then echo -n ":"; fi
+ echo -n $(cygpath "${element}")
+ last="${element}"
+ done)
+ if [ "${result}" = "" ]; then exit 1; fi
+ echo "${result}"
+}
+
if [[ "$(uname -s)" == MINGW* ]]; then
- BUILD_PATH=$(cygpath "$BUILD_PATH")
+ BUILD_PATH=$(cygfullpath "${BUILD_PATH}")
fi
-indent() { sed "s/^/ /"; }
echo "Source directory: ${SOURCE_DIR}"
echo "Build directory: ${BUILD_DIR}"
echo ""
+echo "Platform:"
+uname -s | indent
+
if [ "$(uname -s)" = "Darwin" ]; then
echo "macOS version:"
sw_vers | indent
@@ -40,7 +54,7 @@ echo "Kernel version:"
uname -a 2>&1 | indent
echo "CMake version:"
-env PATH="${BUILD_PATH}" "${CMAKE}" --version 2>&1 | indent
+env PATH="${BUILD_PATH}" "${CMAKE}" --version | head -1 2>&1 | indent
if test -n "${CC}"; then
echo "Compiler version:"
diff --git a/ci/docker/xenial b/ci/docker/xenial
index f5fa5a315..578f0a962 100644
--- a/ci/docker/xenial
+++ b/ci/docker/xenial
@@ -7,11 +7,13 @@ RUN apt-get update && \
clang \
cmake \
curl \
+ gettext \
gcc \
- git \
krb5-user \
libcurl4-gnutls-dev \
+ libexpat1-dev \
libgcrypt20-dev \
+ libintl-perl \
libkrb5-dev \
libpcre3-dev \
libssl-dev \
@@ -28,7 +30,17 @@ RUN apt-get update && \
&& \
rm -rf /var/lib/apt/lists/*
-FROM apt AS mbedtls
+FROM apt AS git
+RUN cd /tmp && \
+ curl --location --silent --show-error https://github.com/git/git/archive/refs/tags/v2.39.1.tar.gz | \
+ tar -xz && \
+ cd git-2.39.1 && \
+ make && \
+ make prefix=/usr install && \
+ cd .. && \
+ rm -rf git-2.39.1
+
+FROM git AS mbedtls
RUN cd /tmp && \
curl --location --silent --show-error https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/mbedtls-2.16.2.tar.gz | \
tar -xz && \
diff --git a/ci/setup-mingw-build.sh b/ci/setup-mingw-build.sh
index 3d72b24eb..6c444f584 100755
--- a/ci/setup-mingw-build.sh
+++ b/ci/setup-mingw-build.sh
@@ -11,9 +11,9 @@ BUILD_TEMP=$(cygpath $BUILD_TEMP)
case "$ARCH" in
amd64)
- MINGW_URI="https://github.com/libgit2/ci-dependencies/releases/download/2021-05-04/mingw-x86_64-8.1.0-release-win32-sjlj-rt_v6-rev0.zip";;
+ MINGW_URI="https://github.com/libgit2/ci-dependencies/releases/download/2023-01-23/mingw-x86_64-8.1.0-release-win32-sjlj-rt_v6-rev0.zip";;
x86)
- MINGW_URI="https://github.com/libgit2/ci-dependencies/releases/download/2021-05-04/mingw-i686-8.1.0-release-win32-sjlj-rt_v6-rev0.zip";;
+ MINGW_URI="https://github.com/libgit2/ci-dependencies/releases/download/2023-01-23/mingw-i686-8.1.0-release-win32-sjlj-rt_v6-rev0.zip";;
esac
if [ -z "$MINGW_URI" ]; then
diff --git a/ci/setup-win32-build.sh b/ci/setup-win32-build.sh
new file mode 100755
index 000000000..a8b81e5ef
--- /dev/null
+++ b/ci/setup-win32-build.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+set -ex
+
+echo "##############################################################################"
+echo "## Downloading libssh2"
+echo "##############################################################################"
+
+BUILD_TEMP=${BUILD_TEMP:=$TEMP}
+BUILD_TEMP=$(cygpath $BUILD_TEMP)
+
+case "$ARCH" in
+ amd64)
+ LIBSSH2_URI="https://github.com/libgit2/ci-dependencies/releases/download/2023-02-01/libssh2-20230201-amd64.zip";;
+ x86)
+ LIBSSH2_URI="https://github.com/libgit2/ci-dependencies/releases/download/2023-02-01-v2/libssh2-20230201-x86.zip";;
+esac
+
+if [ -z "$LIBSSH2_URI" ]; then
+ echo "No URL"
+ exit 1
+fi
+
+mkdir -p "$BUILD_TEMP"
+
+curl -s -L "$LIBSSH2_URI" -o "$BUILD_TEMP"/libssh2-"$ARCH".zip
+unzip -q "$BUILD_TEMP"/libssh2-"$ARCH".zip -d "$BUILD_TEMP"
diff --git a/ci/test.sh b/ci/test.sh
index 0815522a9..c46cf0dc4 100755
--- a/ci/test.sh
+++ b/ci/test.sh
@@ -13,22 +13,52 @@ fi
SOURCE_DIR=${SOURCE_DIR:-$( cd "$( dirname "${BASH_SOURCE[0]}" )" && dirname $( pwd ) )}
BUILD_DIR=$(pwd)
+BUILD_PATH=${BUILD_PATH:=$PATH}
+CTEST=$(which ctest)
TMPDIR=${TMPDIR:-/tmp}
USER=${USER:-$(whoami)}
+HOME=`mktemp -d ${TMPDIR}/home.XXXXXXXX`
+export CLAR_HOMEDIR=${HOME}
+
SUCCESS=1
CONTINUE_ON_FAILURE=0
cleanup() {
echo "Cleaning up..."
- if [ ! -z "$GITDAEMON_PID" ]; then
- echo "Stopping git daemon..."
- kill $GITDAEMON_PID
+ if [ ! -z "$GIT_STANDARD_PID" ]; then
+ echo "Stopping git daemon (standard)..."
+ kill $GIT_STANDARD_PID
+ fi
+
+ if [ ! -z "$GIT_NAMESPACE_PID" ]; then
+ echo "Stopping git daemon (namespace)..."
+ kill $GIT_NAMESPACE_PID
+ fi
+
+ if [ ! -z "$GIT_SHA256_PID" ]; then
+ echo "Stopping git daemon (sha256)..."
+ kill $GIT_SHA256_PID
+ fi
+
+ if [ ! -z "$PROXY_BASIC_PID" ]; then
+ echo "Stopping proxy (Basic)..."
+ kill $PROXY_BASIC_PID
+ fi
+
+ if [ ! -z "$PROXY_NTLM_PID" ]; then
+ echo "Stopping proxy (NTLM)..."
+ kill $PROXY_NTLM_PID
+ fi
+
+ if [ ! -z "$HTTP_PID" ]; then
+ echo "Stopping HTTP server..."
+ kill $HTTP_PID
fi
if [ ! -z "$SSHD_DIR" -a -f "${SSHD_DIR}/pid" ]; then
- echo "Stopping SSH..."
+ echo "Stopping SSH server..."
kill $(cat "${SSHD_DIR}/pid")
fi
@@ -52,7 +82,11 @@ run_test() {
RETURN_CODE=0
- CLAR_SUMMARY="${BUILD_DIR}/results_${1}.xml" ctest -V -R "^${1}$" || RETURN_CODE=$? && true
+ (
+ export PATH="${BUILD_PATH}"
+ export CLAR_SUMMARY="${BUILD_DIR}/results_${1}.xml"
+ "${CTEST}" -V -R "^${1}$"
+ ) || RETURN_CODE=$? && true
if [ "$RETURN_CODE" -eq 0 ]; then
FAILED=0
@@ -73,48 +107,81 @@ run_test() {
fi
}
+indent() { sed "s/^/ /"; }
+
+cygfullpath() {
+ result=$(echo "${1}" | tr \; \\n | while read -r element; do
+ if [ "${last}" != "" ]; then echo -n ":"; fi
+ echo -n $(cygpath "${element}")
+ last="${element}"
+ done)
+ if [ "${result}" = "" ]; then exit 1; fi
+ echo "${result}"
+}
+
+if [[ "$(uname -s)" == MINGW* ]]; then
+ BUILD_PATH=$(cygfullpath "$BUILD_PATH")
+fi
+
+
# Configure the test environment; run them early so that we're certain
# that they're started by the time we need them.
+echo "CTest version:"
+env PATH="${BUILD_PATH}" "${CTEST}" --version | head -1 2>&1 | indent
+
+echo ""
+
echo "##############################################################################"
echo "## Configuring test environment"
echo "##############################################################################"
+echo ""
+
if [ -z "$SKIP_GITDAEMON_TESTS" ]; then
- echo "Starting git daemon..."
- GITDAEMON_DIR=`mktemp -d ${TMPDIR}/gitdaemon.XXXXXXXX`
- git init --bare "${GITDAEMON_DIR}/test.git" >/dev/null
- git daemon --listen=localhost --export-all --enable=receive-pack --base-path="${GITDAEMON_DIR}" "${GITDAEMON_DIR}" 2>/dev/null &
- GITDAEMON_PID=$!
- disown $GITDAEMON_PID
+ echo "Starting git daemon (standard)..."
+ GIT_STANDARD_DIR=`mktemp -d ${TMPDIR}/git_standard.XXXXXXXX`
+ git init --bare "${GIT_STANDARD_DIR}/test.git" >/dev/null
+ git daemon --listen=localhost --export-all --enable=receive-pack --base-path="${GIT_STANDARD_DIR}" "${GIT_STANDARD_DIR}" 2>/dev/null &
+ GIT_STANDARD_PID=$!
+
+ echo "Starting git daemon (namespace)..."
+ GIT_NAMESPACE_DIR=`mktemp -d ${TMPDIR}/git_namespace.XXXXXXXX`
+ cp -R "${SOURCE_DIR}/tests/resources/namespace.git" "${GIT_NAMESPACE_DIR}/namespace.git"
+ GIT_NAMESPACE="name1" git daemon --listen=localhost --port=9419 --export-all --enable=receive-pack --base-path="${GIT_NAMESPACE_DIR}" "${GIT_NAMESPACE_DIR}" &
+ GIT_NAMESPACE_PID=$!
+
+ echo "Starting git daemon (sha256)..."
+ GIT_SHA256_DIR=`mktemp -d ${TMPDIR}/git_sha256.XXXXXXXX`
+ cp -R "${SOURCE_DIR}/tests/resources/testrepo_256.git" "${GIT_SHA256_DIR}/testrepo_256.git"
+ git daemon --listen=localhost --port=9420 --export-all --enable=receive-pack --base-path="${GIT_SHA256_DIR}" "${GIT_SHA256_DIR}" &
+ GIT_SHA256_PID=$!
fi
if [ -z "$SKIP_PROXY_TESTS" ]; then
curl --location --silent --show-error https://github.com/ethomson/poxyproxy/releases/download/v0.7.0/poxyproxy-0.7.0.jar >poxyproxy.jar
- echo ""
echo "Starting HTTP proxy (Basic)..."
java -jar poxyproxy.jar --address 127.0.0.1 --port 8080 --credentials foo:bar --auth-type basic --quiet &
+ PROXY_BASIC_PID=$!
- echo ""
echo "Starting HTTP proxy (NTLM)..."
java -jar poxyproxy.jar --address 127.0.0.1 --port 8090 --credentials foo:bar --auth-type ntlm --quiet &
+ PROXY_NTLM_PID=$!
fi
if [ -z "$SKIP_NTLM_TESTS" -o -z "$SKIP_ONLINE_TESTS" ]; then
curl --location --silent --show-error https://github.com/ethomson/poxygit/releases/download/v0.5.1/poxygit-0.5.1.jar >poxygit.jar
- echo ""
echo "Starting HTTP server..."
- NTLM_DIR=`mktemp -d ${TMPDIR}/ntlm.XXXXXXXX`
- git init --bare "${NTLM_DIR}/test.git"
- java -jar poxygit.jar --address 127.0.0.1 --port 9000 --credentials foo:baz --quiet "${NTLM_DIR}" &
+ HTTP_DIR=`mktemp -d ${TMPDIR}/http.XXXXXXXX`
+ git init --bare "${HTTP_DIR}/test.git"
+ java -jar poxygit.jar --address 127.0.0.1 --port 9000 --credentials foo:baz --quiet "${HTTP_DIR}" &
+ HTTP_PID=$!
fi
if [ -z "$SKIP_SSH_TESTS" ]; then
- echo ""
- echo "Starting ssh daemon..."
- HOME=`mktemp -d ${TMPDIR}/home.XXXXXXXX`
+ echo "Starting SSH server..."
SSHD_DIR=`mktemp -d ${TMPDIR}/sshd.XXXXXXXX`
git init --bare "${SSHD_DIR}/test.git" >/dev/null
cat >"${SSHD_DIR}/sshd_config" <<-EOF
@@ -144,6 +211,11 @@ if [ -z "$SKIP_SSH_TESTS" ]; then
echo "[localhost]:2222 $algorithm $key" >>"${HOME}/.ssh/known_hosts"
done <"${SSHD_DIR}/id_rsa.pub"
+ # Append the github.com keys for the tests that don't override checks.
+ # We ask for ssh-rsa to test that the selection based off of known_hosts
+ # is working.
+ ssh-keyscan -t ssh-rsa github.com >>"${HOME}/.ssh/known_hosts"
+
# Get the fingerprint for localhost and remove the colons so we can
# parse it as a hex number. Older versions have a different output
# format.
@@ -214,12 +286,30 @@ fi
if [ -z "$SKIP_GITDAEMON_TESTS" ]; then
echo ""
- echo "Running gitdaemon tests"
+ echo "Running gitdaemon (standard) tests"
echo ""
export GITTEST_REMOTE_URL="git://localhost/test.git"
run_test gitdaemon
unset GITTEST_REMOTE_URL
+
+ echo ""
+ echo "Running gitdaemon (namespace) tests"
+ echo ""
+
+ export GITTEST_REMOTE_URL="git://localhost:9419/namespace.git"
+ export GITTEST_REMOTE_BRANCH="four"
+ run_test gitdaemon_namespace
+ unset GITTEST_REMOTE_URL
+ unset GITTEST_REMOTE_BRANCH
+
+ echo ""
+ echo "Running gitdaemon (sha256) tests"
+ echo ""
+
+ export GITTEST_REMOTE_URL="git://localhost:9420/testrepo_256.git"
+ run_test gitdaemon_sha256
+ unset GITTEST_REMOTE_URL
fi
if [ -z "$SKIP_PROXY_TESTS" ]; then
@@ -343,7 +433,7 @@ if [ -z "$SKIP_FUZZERS" ]; then
echo "## Running fuzzers"
echo "##############################################################################"
- ctest -V -R 'fuzzer'
+ env PATH="${BUILD_PATH}" "${CTEST}" -V -R 'fuzzer'
fi
cleanup
diff --git a/cmake/ExperimentalFeatures.cmake b/cmake/ExperimentalFeatures.cmake
index f23bfe376..7eff40bdb 100644
--- a/cmake/ExperimentalFeatures.cmake
+++ b/cmake/ExperimentalFeatures.cmake
@@ -1,8 +1,19 @@
+# Experimental feature support for libgit2 - developers can opt in to
+# experimental functionality, like sha256 support. When experimental
+# functionality is enabled, we set both a cmake flag *and* a compile
+# definition. The cmake flag is used to generate `experimental.h`,
+# which will be installed by a `make install`. But the compile definition
+# is used by the libgit2 sources to detect the functionality at library
+# build time. This allows us to have an in-tree `experimental.h` with
+# *no* experiments enabled. This lets us support users who build without
+# cmake and cannot generate the `experimental.h` file.
+
if(EXPERIMENTAL_SHA256)
add_feature_info("SHA256 API" ON "experimental SHA256 APIs")
set(EXPERIMENTAL 1)
set(GIT_EXPERIMENTAL_SHA256 1)
+ add_definitions(-DGIT_EXPERIMENTAL_SHA256=1)
else()
add_feature_info("SHA256 API" OFF "experimental SHA256 APIs")
endif()
diff --git a/deps/ntlmclient/CMakeLists.txt b/deps/ntlmclient/CMakeLists.txt
index 9c5e23d60..8356d4723 100644
--- a/deps/ntlmclient/CMakeLists.txt
+++ b/deps/ntlmclient/CMakeLists.txt
@@ -20,11 +20,13 @@ if(USE_HTTPS STREQUAL "SecureTransport")
set_source_files_properties("crypt_commoncrypto.c" COMPILE_FLAGS "-Wno-deprecated")
elseif(USE_HTTPS STREQUAL "OpenSSL")
add_definitions(-DCRYPT_OPENSSL)
+ add_definitions(-DOPENSSL_API_COMPAT=0x10100000L)
include_directories(${OPENSSL_INCLUDE_DIR})
set(SRC_NTLMCLIENT_CRYPTO "crypt_openssl.c" "crypt_openssl.h")
elseif(USE_HTTPS STREQUAL "OpenSSL-Dynamic")
add_definitions(-DCRYPT_OPENSSL)
add_definitions(-DCRYPT_OPENSSL_DYNAMIC)
+ add_definitions(-DOPENSSL_API_COMPAT=0x10100000L)
set(SRC_NTLMCLIENT_CRYPTO "crypt_openssl.c" "crypt_openssl.h")
elseif(USE_HTTPS STREQUAL "mbedTLS")
add_definitions(-DCRYPT_MBEDTLS)
diff --git a/docs/changelog.md b/docs/changelog.md
index 989800a11..f685234aa 100644
--- a/docs/changelog.md
+++ b/docs/changelog.md
@@ -1,3 +1,122 @@
+v1.6.2
+------
+
+## What's Changed
+### Bug fixes
+
+* remote: always populate old id in update tips by @ethomson in https://github.com/libgit2/libgit2/pull/6506
+ The update tips callback would not always be properly provided with an empty (`0000000...`) OID for new refs.
+
+* Revert #6503 by @ethomson in https://github.com/libgit2/libgit2/pull/6511
+ The certificate callback added port information for callbacks in #6503, but the format was ambiguous with IPv6 addresses. Revert this change temporarily.
+
+* Add `git_odb_backend_loose` back by @ethomson in https://github.com/libgit2/libgit2/pull/6512
+ During SHA256 refactoring, the `git_odb_backend_loose` API was accidentally removed. Add it back.
+
+* meta: configure pkg-config .pc correctly by @ethomson in https://github.com/libgit2/libgit2/pull/6514
+ During SHA256 refactoring, the pkg-config `.pc` file was erroneously renamed to `git2` instead of `libgit2`. Repair this.
+
+**Full Changelog**: https://github.com/libgit2/libgit2/compare/v1.6.1...v1.6.2
+
+v1.6
+----
+
+This is release v1.6.1, "Hubbeliges Krokodil". This release adds experimental SHA256 support and includes many new features and bugfixes. This release replaces libgit2 v1.6.0, which did not correctly update its version number(s).
+
+## What's Changed
+
+### New features
+
+* **Support for bare repositories with SHA256 support (experimental)** by @ethomson in https://github.com/libgit2/libgit2/pull/6191
+ You can configure experimental SHA256 support in libgit2 with `cmake -DEXPERIMENTAL_SHA256=ON` during project setup. This is useful for considering future integrations, work on clients, and work on language bindings. At present, working with bare repositories should largely work, including remote operations. But many pieces of functionality - including working with the index - are not yet supported. As a result, **libgit2 with SHA256 support should not be used in production or released with package distribution.**
+
+* **Support the notion of a home directory separately from global configuration directory** by @ethomson in https://github.com/libgit2/libgit2/pull/6455 and https://github.com/libgit2/libgit2/pull/6456
+ Callers and language bindings can now configure the home directory that libgit2 uses for file lookups (eg, the `.ssh` directory). This configuration is separate from the git global configuration path.
+
+* **stash: partial stash specific files** by @gitkraken-jacobw in https://github.com/libgit2/libgit2/pull/6330
+ A stash can be created with only specific files, using a pathspec. This is similar to the `git stash push` command.
+
+* **push: revparse refspec source, so you can push things that are not refs** by @sven-of-cord in https://github.com/libgit2/libgit2/pull/6362
+ Pushes can be performed using refspecs instead of only references.
+
+* **Support OpenSSL3** by @ethomson in https://github.com/libgit2/libgit2/pull/6464 and https://github.com/libgit2/libgit2/pull/6471
+ OpenSSL 3 is now supported, both when compiled directly and dynamically loaded.
+
+### Bug fixes
+* winhttp: support long custom headers by @kcsaul in https://github.com/libgit2/libgit2/pull/6363
+* Fix memory leak by @csware in https://github.com/libgit2/libgit2/pull/6382
+* Don't fail the whole clone if you can't find a default branch by @torvalds in https://github.com/libgit2/libgit2/pull/6369
+* #6366: When a worktree is missing, return `GIT_ENOTFOUND`. by @arroz in https://github.com/libgit2/libgit2/pull/6395
+* commit-graph: only verify csum on `git_commit_graph_open()`. by @derrickstolee in https://github.com/libgit2/libgit2/pull/6420
+* Ignore missing 'safe.directory' config during ownership checks by @kcsaul in https://github.com/libgit2/libgit2/pull/6408
+* Fix leak in `git_tag_create_from_buffer` by @julianmesa-gitkraken in https://github.com/libgit2/libgit2/pull/6421
+* http: Update httpclient options when reusing an existing connection. by @slackner in https://github.com/libgit2/libgit2/pull/6416
+* Add support for `safe.directory *` by @csware in https://github.com/libgit2/libgit2/pull/6429
+* URL parsing for google-compatible URLs by @ethomson in https://github.com/libgit2/libgit2/pull/6326
+* Fixes #6433: `git_submodule_update` fails to update configured but missing submodule by @tagesuhu in https://github.com/libgit2/libgit2/pull/6434
+* transport: fix capabilities calculation by @russell in https://github.com/libgit2/libgit2/pull/6435
+* push: use resolved oid as the source by @ethomson in https://github.com/libgit2/libgit2/pull/6452
+* Use `git_clone__submodule` to avoid file checks in workdir by @abizjak in https://github.com/libgit2/libgit2/pull/6444
+* #6422: handle dangling symbolic refs gracefully by @arroz in https://github.com/libgit2/libgit2/pull/6423
+* `diff_file`: Fix crash when freeing a patch representing an empty untracked file by @jorio in https://github.com/libgit2/libgit2/pull/6475
+* clone: clean up options on failure by @ethomson in https://github.com/libgit2/libgit2/pull/6479
+* stash: update strarray usage by @ethomson in https://github.com/libgit2/libgit2/pull/6487
+* #6491: Sets `oid_type` on repos open with `git_repository_open_bare` by @arroz in https://github.com/libgit2/libgit2/pull/6492
+* Handle Win32 shares by @ethomson in https://github.com/libgit2/libgit2/pull/6493
+* Make failure to connect to ssh-agent non-fatal by @fxcoudert in https://github.com/libgit2/libgit2/pull/6497
+* odb: don't unconditionally add `oid_type` to stream by @ethomson in https://github.com/libgit2/libgit2/pull/6499
+* Pass hostkey & port to host verify callback by @fxcoudert in https://github.com/libgit2/libgit2/pull/6503
+
+### Code cleanups
+* meta: update version number to v1.6.0-alpha by @ethomson in https://github.com/libgit2/libgit2/pull/6352
+* sha256: indirection for experimental functions by @ethomson in https://github.com/libgit2/libgit2/pull/6354
+* Delete `create.c.bak` by @lrm29 in https://github.com/libgit2/libgit2/pull/6398
+* Support non-cmake builds with an in-tree `experimental.h` by @ethomson in https://github.com/libgit2/libgit2/pull/6405
+
+### Build and CI improvements
+* tests: skip flaky-ass googlesource tests by @ethomson in https://github.com/libgit2/libgit2/pull/6353
+* clar: remove ftrunacte from libgit2 tests by @boretrk in https://github.com/libgit2/libgit2/pull/6357
+* CI Improvements by @ethomson in https://github.com/libgit2/libgit2/pull/6403
+* fix compile on Windows with `-DWIN32_LEAN_AND_MEAN` by @christoph-cullmann in https://github.com/libgit2/libgit2/pull/6373
+* Fixes #6365 : Uppercase windows.h include fails build in case-sensitive OS by @Vinz2008 in https://github.com/libgit2/libgit2/pull/6377
+* ci: update version numbers of actions by @ethomson in https://github.com/libgit2/libgit2/pull/6448
+* thread: avoid warnings when building without threads by @ethomson in https://github.com/libgit2/libgit2/pull/6432
+* src: hide unused hmac() prototype by @0-wiz-0 in https://github.com/libgit2/libgit2/pull/6458
+* tests: update clar test runner by @ethomson in https://github.com/libgit2/libgit2/pull/6459
+* ci: always create test summaries, even on failure by @ethomson in https://github.com/libgit2/libgit2/pull/6460
+* Fix build failure with `-DEMBED_SSH_PATH` by @vicr123 in https://github.com/libgit2/libgit2/pull/6374
+* Define correct `off64_t` for AIX by @bzEq in https://github.com/libgit2/libgit2/pull/6376
+* Fix some warnings in main by @ethomson in https://github.com/libgit2/libgit2/pull/6480
+* strarray: remove deprecated declaration by @ethomson in https://github.com/libgit2/libgit2/pull/6486
+* tests: always unset `HTTP_PROXY` before starting tests by @ethomson in https://github.com/libgit2/libgit2/pull/6498
+
+### Documentation improvements
+* add 2-clause BSD license to COPYING by @martinvonz in https://github.com/libgit2/libgit2/pull/6413
+* Add new PHP bindings project to language bindings section of README.md by @RogerGee in https://github.com/libgit2/libgit2/pull/6473
+* README: clarify the linking exception by @ethomson in https://github.com/libgit2/libgit2/pull/6494
+* Correct the definition of "empty" in the docs for `git_repository_is_empty` by @timrogers in https://github.com/libgit2/libgit2/pull/6500
+
+## New Contributors
+* @christoph-cullmann made their first contribution in https://github.com/libgit2/libgit2/pull/6373
+* @Vinz2008 made their first contribution in https://github.com/libgit2/libgit2/pull/6377
+* @torvalds made their first contribution in https://github.com/libgit2/libgit2/pull/6369
+* @derrickstolee made their first contribution in https://github.com/libgit2/libgit2/pull/6420
+* @julianmesa-gitkraken made their first contribution in https://github.com/libgit2/libgit2/pull/6421
+* @slackner made their first contribution in https://github.com/libgit2/libgit2/pull/6416
+* @martinvonz made their first contribution in https://github.com/libgit2/libgit2/pull/6413
+* @tagesuhu made their first contribution in https://github.com/libgit2/libgit2/pull/6434
+* @russell made their first contribution in https://github.com/libgit2/libgit2/pull/6435
+* @sven-of-cord made their first contribution in https://github.com/libgit2/libgit2/pull/6362
+* @0-wiz-0 made their first contribution in https://github.com/libgit2/libgit2/pull/6458
+* @abizjak made their first contribution in https://github.com/libgit2/libgit2/pull/6444
+* @vicr123 made their first contribution in https://github.com/libgit2/libgit2/pull/6374
+* @bzEq made their first contribution in https://github.com/libgit2/libgit2/pull/6376
+* @gitkraken-jacobw made their first contribution in https://github.com/libgit2/libgit2/pull/6330
+* @fxcoudert made their first contribution in https://github.com/libgit2/libgit2/pull/6497
+* @timrogers made their first contribution in https://github.com/libgit2/libgit2/pull/6500
+
+**Full Changelog**: https://github.com/libgit2/libgit2/compare/v1.5.0...v1.6.0
+
v1.5
----
diff --git a/examples/index-pack.c b/examples/index-pack.c
index df37dd0c4..0f8234c75 100644
--- a/examples/index-pack.c
+++ b/examples/index-pack.c
@@ -28,11 +28,18 @@ int lg2_index_pack(git_repository *repo, int argc, char **argv)
return EXIT_FAILURE;
}
- if (git_indexer_new(&idx, ".", 0, NULL, NULL) < 0) {
+#ifdef GIT_EXPERIMENTAL_SHA256
+ error = git_indexer_new(&idx, ".", git_repository_oid_type(repo), NULL);
+#else
+ error = git_indexer_new(&idx, ".", 0, NULL, NULL);
+#endif
+
+ if (error < 0) {
puts("bad idx");
return -1;
}
+
if ((fd = open(argv[1], 0)) < 0) {
perror("open");
return -1;
diff --git a/fuzzers/objects_fuzzer.c b/fuzzers/objects_fuzzer.c
index 51b4a1ed4..7294e9b35 100644
--- a/fuzzers/objects_fuzzer.c
+++ b/fuzzers/objects_fuzzer.c
@@ -39,7 +39,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
* to do.
*/
for (i = 0; i < ARRAY_SIZE(types); i++) {
- if (git_object__from_raw(&object, (const char *) data, size, types[i]) < 0)
+ if (git_object__from_raw(&object, (const char *) data, size, types[i], GIT_OID_SHA1) < 0)
continue;
git_object_free(object);
object = NULL;
diff --git a/fuzzers/packfile_fuzzer.c b/fuzzers/packfile_fuzzer.c
index 52a813760..aeba9575c 100644
--- a/fuzzers/packfile_fuzzer.c
+++ b/fuzzers/packfile_fuzzer.c
@@ -67,6 +67,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
git_str path = GIT_STR_INIT;
git_oid oid;
bool append_hash = false;
+ int error;
if (size == 0)
return 0;
@@ -82,7 +83,13 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
abort();
}
- if (git_indexer_new(&indexer, ".", 0, odb, NULL) < 0) {
+#ifdef GIT_EXPERIMENTAL_SHA256
+ error = git_indexer_new(&indexer, ".", GIT_OID_SHA1, NULL);
+#else
+ error = git_indexer_new(&indexer, ".", 0, odb, NULL);
+#endif
+
+ if (error < 0) {
fprintf(stderr, "Failed to create the indexer: %s\n",
git_error_last()->message);
abort();
diff --git a/include/git2/common.h b/include/git2/common.h
index defa24a6a..b09b078a1 100644
--- a/include/git2/common.h
+++ b/include/git2/common.h
@@ -223,6 +223,8 @@ typedef enum {
GIT_OPT_SET_EXTENSIONS,
GIT_OPT_GET_OWNER_VALIDATION,
GIT_OPT_SET_OWNER_VALIDATION,
+ GIT_OPT_GET_HOMEDIR,
+ GIT_OPT_SET_HOMEDIR,
GIT_OPT_ENABLE_SHALLOW
} git_libgit2_opt_t;
@@ -472,6 +474,16 @@ typedef enum {
* > Set that repository directories should be owned by the current
* > user. The default is to validate ownership.
*
+ * opts(GIT_OPT_GET_HOMEDIR, git_buf *out)
+ * > Gets the current user's home directory, as it will be used
+ * > for file lookups. The path is written to the `out` buffer.
+ *
+ * opts(GIT_OPT_SET_HOMEDIR, const char *path)
+ * > Sets the directory used as the current user's home directory,
+ * > for file lookups.
+ * >
+ * > - `path` directory of home directory.
+ *
* @param option Option key
* @param ... value to set the option
* @return 0 on success, <0 on failure
diff --git a/include/git2/experimental.h b/include/git2/experimental.h
new file mode 100644
index 000000000..06435f9a7
--- /dev/null
+++ b/include/git2/experimental.h
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) the libgit2 contributors. All rights reserved.
+ *
+ * This file is part of libgit2, distributed under the GNU GPL v2 with
+ * a Linking Exception. For full terms see the included COPYING file.
+ */
+
+#ifndef INCLUDE_experimental_h__
+#define INCLUDE_experimental_h__
+
+/*
+ * This file exists to support users who build libgit2 with a bespoke
+ * build system and do not use our cmake configuration. Normally, cmake
+ * will create `experimental.h` from the `experimental.h.in` file and
+ * will include the generated file instead of this one. For non-cmake
+ * users, we bundle this `experimental.h` file which will be used
+ * instead.
+ */
+
+#endif
diff --git a/include/git2/indexer.h b/include/git2/indexer.h
index ffe9bf366..630eef934 100644
--- a/include/git2/indexer.h
+++ b/include/git2/indexer.h
@@ -62,6 +62,19 @@ typedef int GIT_CALLBACK(git_indexer_progress_cb)(const git_indexer_progress *st
typedef struct git_indexer_options {
unsigned int version;
+#ifdef GIT_EXPERIMENTAL_SHA256
+ /** permissions to use creating packfile or 0 for defaults */
+ unsigned int mode;
+
+ /**
+ * object database from which to read base objects when
+ * fixing thin packs. This can be NULL if there are no thin
+ * packs; if a thin pack is encountered, an error will be
+ * returned if there are bases missing.
+ */
+ git_odb *odb;
+#endif
+
/** progress_cb function to call with progress information */
git_indexer_progress_cb progress_cb;
@@ -87,6 +100,21 @@ GIT_EXTERN(int) git_indexer_options_init(
git_indexer_options *opts,
unsigned int version);
+#ifdef GIT_EXPERIMENTAL_SHA256
+/**
+ * Create a new indexer instance
+ *
+ * @param out where to store the indexer instance
+ * @param path to the directory where the packfile should be stored
+ * @param oid_type the oid type to use for objects
+ * @return 0 or an error code.
+ */
+GIT_EXTERN(int) git_indexer_new(
+ git_indexer **out,
+ const char *path,
+ git_oid_t oid_type,
+ git_indexer_options *opts);
+#else
/**
* Create a new indexer instance
*
@@ -106,6 +134,7 @@ GIT_EXTERN(int) git_indexer_new(
unsigned int mode,
git_odb *odb,
git_indexer_options *opts);
+#endif
/**
* Add data to the indexer
diff --git a/include/git2/object.h b/include/git2/object.h
index 5610a476f..6384aaa6e 100644
--- a/include/git2/object.h
+++ b/include/git2/object.h
@@ -225,6 +225,7 @@ GIT_EXTERN(int) git_object_peel(
*/
GIT_EXTERN(int) git_object_dup(git_object **dest, git_object *source);
+#ifdef GIT_EXPERIMENTAL_SHA256
/**
* Analyzes a buffer of raw object content and determines its validity.
* Tree, commit, and tag objects will be parsed and ensured that they
@@ -238,14 +239,39 @@ GIT_EXTERN(int) git_object_dup(git_object **dest, git_object *source);
* @param valid Output pointer to set with validity of the object content
* @param buf The contents to validate
* @param len The length of the buffer
- * @param type The type of the object in the buffer
+ * @param object_type The type of the object in the buffer
+ * @param oid_type The object ID type for the OIDs in the given buffer
* @return 0 on success or an error code
*/
GIT_EXTERN(int) git_object_rawcontent_is_valid(
int *valid,
const char *buf,
size_t len,
- git_object_t type);
+ git_object_t object_type,
+ git_oid_t oid_type);
+#else
+/**
+ * Analyzes a buffer of raw object content and determines its validity.
+ * Tree, commit, and tag objects will be parsed and ensured that they
+ * are valid, parseable content. (Blobs are always valid by definition.)
+ * An error message will be set with an informative message if the object
+ * is not valid.
+ *
+ * @warning This function is experimental and its signature may change in
+ * the future.
+ *
+ * @param valid Output pointer to set with validity of the object content
+ * @param buf The contents to validate
+ * @param len The length of the buffer
+ * @param object_type The type of the object in the buffer
+ * @return 0 on success or an error code
+ */
+GIT_EXTERN(int) git_object_rawcontent_is_valid(
+ int *valid,
+ const char *buf,
+ size_t len,
+ git_object_t object_type);
+#endif
/** @} */
GIT_END_DECL
diff --git a/include/git2/odb_backend.h b/include/git2/odb_backend.h
index a31d1b782..12dd0fd38 100644
--- a/include/git2/odb_backend.h
+++ b/include/git2/odb_backend.h
@@ -24,6 +24,26 @@ GIT_BEGIN_DECL
* Constructors for in-box ODB backends.
*/
+/** Options for configuring a packfile object backend. */
+typedef struct {
+ unsigned int version; /**< version for the struct */
+
+ /**
+ * Type of object IDs to use for this object database, or
+ * 0 for default (currently SHA1).
+ */
+ git_oid_t oid_type;
+} git_odb_backend_pack_options;
+
+/* The current version of the diff options structure */
+#define GIT_ODB_BACKEND_PACK_OPTIONS_VERSION 1
+
+/* Stack initializer for odb pack backend options. Alternatively use
+ * `git_odb_backend_pack_options_init` programmatic initialization.
+ */
+#define GIT_ODB_BACKEND_PACK_OPTIONS_INIT \
+ { GIT_ODB_BACKEND_PACK_OPTIONS_VERSION }
+
/**
* Create a backend for the packfiles.
*
@@ -32,7 +52,38 @@ GIT_BEGIN_DECL
*
* @return 0 or an error code
*/
-GIT_EXTERN(int) git_odb_backend_pack(git_odb_backend **out, const char *objects_dir);
+#ifdef GIT_EXPERIMENTAL_SHA256
+GIT_EXTERN(int) git_odb_backend_pack(
+ git_odb_backend **out,
+ const char *objects_dir,
+ const git_odb_backend_pack_options *opts);
+#else
+GIT_EXTERN(int) git_odb_backend_pack(
+ git_odb_backend **out,
+ const char *objects_dir);
+#endif
+
+/**
+ * Create a backend out of a single packfile
+ *
+ * This can be useful for inspecting the contents of a single
+ * packfile.
+ *
+ * @param out location to store the odb backend pointer
+ * @param index_file path to the packfile's .idx file
+ *
+ * @return 0 or an error code
+ */
+#ifdef GIT_EXPERIMENTAL_SHA256
+GIT_EXTERN(int) git_odb_backend_one_pack(
+ git_odb_backend **out,
+ const char *index_file,
+ const git_odb_backend_pack_options *opts);
+#else
+GIT_EXTERN(int) git_odb_backend_one_pack(
+ git_odb_backend **out,
+ const char *index_file);
+#endif
typedef enum {
GIT_ODB_BACKEND_LOOSE_FSYNC = (1 << 0)
@@ -100,19 +151,6 @@ GIT_EXTERN(int) git_odb_backend_loose(
unsigned int file_mode);
#endif
-/**
- * Create a backend out of a single packfile
- *
- * This can be useful for inspecting the contents of a single
- * packfile.
- *
- * @param out location to store the odb backend pointer
- * @param index_file path to the packfile's .idx file
- *
- * @return 0 or an error code
- */
-GIT_EXTERN(int) git_odb_backend_one_pack(git_odb_backend **out, const char *index_file);
-
/** Streaming mode */
typedef enum {
GIT_STREAM_RDONLY = (1 << 1),
@@ -133,7 +171,9 @@ struct git_odb_stream {
unsigned int mode;
void *hash_ctx;
+#ifdef GIT_EXPERIMENTAL_SHA256
git_oid_t oid_type;
+#endif
git_object_size_t declared_size;
git_object_size_t received_bytes;
diff --git a/include/git2/repository.h b/include/git2/repository.h
index 258b9ac00..0de4d7557 100644
--- a/include/git2/repository.h
+++ b/include/git2/repository.h
@@ -352,6 +352,15 @@ typedef struct {
* pointing to this URL.
*/
const char *origin_url;
+
+#ifdef GIT_EXPERIMENTAL_SHA256
+ /**
+ *
+ * Type of object IDs to use for this repository, or 0 for
+ * default (currently SHA1).
+ */
+ git_oid_t oid_type;
+#endif
} git_repository_init_options;
#define GIT_REPOSITORY_INIT_OPTIONS_VERSION 1
@@ -457,7 +466,9 @@ GIT_EXTERN(int) git_repository_head_unborn(git_repository *repo);
* Check if a repository is empty
*
* An empty repository has just been initialized and contains no references
- * apart from HEAD, which must be pointing to the unborn master branch.
+ * apart from HEAD, which must be pointing to the unborn master branch,
+ * or the branch specified for the repository in the `init.defaultBranch`
+ * configuration variable.
*
* @param repo Repo to test
* @return 1 if the repository is empty, 0 if it isn't, error code
@@ -950,6 +961,14 @@ GIT_EXTERN(int) git_repository_ident(const char **name, const char **email, cons
*/
GIT_EXTERN(int) git_repository_set_ident(git_repository *repo, const char *name, const char *email);
+/**
+ * Gets the object type used by this repository.
+ *
+ * @param repo the repository
+ * @return the object id type
+ */
+GIT_EXTERN(git_oid_t) git_repository_oid_type(git_repository *repo);
+
/** @} */
GIT_END_DECL
#endif
diff --git a/include/git2/stash.h b/include/git2/stash.h
index 32e6f9576..dcfc013dc 100644
--- a/include/git2/stash.h
+++ b/include/git2/stash.h
@@ -44,7 +44,12 @@ typedef enum {
* All ignored files are also stashed and then cleaned up from
* the working directory
*/
- GIT_STASH_INCLUDE_IGNORED = (1 << 2)
+ GIT_STASH_INCLUDE_IGNORED = (1 << 2),
+
+ /**
+ * All changes in the index and working directory are left intact
+ */
+ GIT_STASH_KEEP_ALL = (1 << 3)
} git_stash_flags;
/**
@@ -52,15 +57,10 @@ typedef enum {
*
* @param out Object id of the commit containing the stashed state.
* This commit is also the target of the direct reference refs/stash.
- *
* @param repo The owning repository.
- *
* @param stasher The identity of the person performing the stashing.
- *
* @param message Optional description along with the stashed state.
- *
* @param flags Flags to control the stashing process. (see GIT_STASH_* above)
- *
* @return 0 on success, GIT_ENOTFOUND where there's nothing to stash,
* or error code.
*/
@@ -71,6 +71,60 @@ GIT_EXTERN(int) git_stash_save(
const char *message,
uint32_t flags);
+/**
+ * Stash save options structure
+ *
+ * Initialize with `GIT_STASH_SAVE_OPTIONS_INIT`. Alternatively, you can
+ * use `git_stash_save_options_init`.
+ *
+ */
+typedef struct git_stash_save_options {
+ unsigned int version;
+
+ /** Flags to control the stashing process. (see GIT_STASH_* above) */
+ uint32_t flags;
+
+ /** The identity of the person performing the stashing. */
+ const git_signature *stasher;
+
+ /** Optional description along with the stashed state. */
+ const char *message;
+
+ /** Optional paths that control which files are stashed. */
+ git_strarray paths;
+} git_stash_save_options;
+
+#define GIT_STASH_SAVE_OPTIONS_VERSION 1
+#define GIT_STASH_SAVE_OPTIONS_INIT { GIT_STASH_SAVE_OPTIONS_VERSION }
+
+/**
+ * Initialize git_stash_save_options structure
+ *
+ * Initializes a `git_stash_save_options` with default values. Equivalent to
+ * creating an instance with `GIT_STASH_SAVE_OPTIONS_INIT`.
+ *
+ * @param opts The `git_stash_save_options` struct to initialize.
+ * @param version The struct version; pass `GIT_STASH_SAVE_OPTIONS_VERSION`.
+ * @return Zero on success; -1 on failure.
+ */
+GIT_EXTERN(int) git_stash_save_options_init(
+ git_stash_save_options *opts, unsigned int version);
+
+/**
+ * Save the local modifications to a new stash, with options.
+ *
+ * @param out Object id of the commit containing the stashed state.
+ * This commit is also the target of the direct reference refs/stash.
+ * @param repo The owning repository.
+ * @param opts The stash options.
+ * @return 0 on success, GIT_ENOTFOUND where there's nothing to stash,
+ * or error code.
+ */
+GIT_EXTERN(int) git_stash_save_with_opts(
+ git_oid *out,
+ git_repository *repo,
+ const git_stash_save_options *opts);
+
/** Stash application flags. */
typedef enum {
GIT_STASH_APPLY_DEFAULT = 0,
diff --git a/include/git2/strarray.h b/include/git2/strarray.h
index 0f657e6c5..03d93f8fb 100644
--- a/include/git2/strarray.h
+++ b/include/git2/strarray.h
@@ -36,19 +36,6 @@ typedef struct git_strarray {
*/
GIT_EXTERN(void) git_strarray_dispose(git_strarray *array);
-/**
- * Copy a string array object from source to target.
- *
- * Note: target is overwritten and hence should be empty, otherwise its
- * contents are leaked. Call git_strarray_free() if necessary.
- *
- * @param tgt target
- * @param src source
- * @return 0 on success, < 0 on allocation failure
- */
-GIT_EXTERN(int) git_strarray_copy(git_strarray *tgt, const git_strarray *src);
-
-
/** @} */
GIT_END_DECL
diff --git a/include/git2/sys/transport.h b/include/git2/sys/transport.h
index 391765b77..8a8451592 100644
--- a/include/git2/sys/transport.h
+++ b/include/git2/sys/transport.h
@@ -75,6 +75,18 @@ struct git_transport {
unsigned int *capabilities,
git_transport *transport);
+#ifdef GIT_EXPERIMENTAL_SHA256
+ /**
+ * Gets the object type for the remote repository.
+ *
+ * This function may be called after a successful call to
+ * `connect()`.
+ */
+ int GIT_CALLBACK(oid_type)(
+ git_oid_t *object_type,
+ git_transport *transport);
+#endif
+
/**
* Get the list of available references in the remote repository.
*
diff --git a/include/git2/version.h b/include/git2/version.h
index 09f4ae3e4..8b5eb3138 100644
--- a/include/git2/version.h
+++ b/include/git2/version.h
@@ -11,7 +11,7 @@
* The version string for libgit2. This string follows semantic
* versioning (v2) guidelines.
*/
-#define LIBGIT2_VERSION "1.6.0-alpha"
+#define LIBGIT2_VERSION "1.6.2"
/** The major version number for this version of libgit2. */
#define LIBGIT2_VER_MAJOR 1
@@ -20,7 +20,7 @@
#define LIBGIT2_VER_MINOR 6
/** The revision ("teeny") version number for this version of libgit2. */
-#define LIBGIT2_VER_REVISION 0
+#define LIBGIT2_VER_REVISION 2
/** The Windows DLL patch number for this version of libgit2. */
#define LIBGIT2_VER_PATCH 0
@@ -31,7 +31,7 @@
* a prerelease name like "beta" or "rc1". For final releases, this will
* be `NULL`.
*/
-#define LIBGIT2_VER_PRERELEASE "alpha"
+#define LIBGIT2_VER_PRERELEASE NULL
/** The library ABI soversion for this version of libgit2. */
#define LIBGIT2_SOVERSION "1.6"
diff --git a/package.json b/package.json
index 8ef46d761..e29459efd 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "libgit2",
- "version": "1.6.0-alpha",
+ "version": "1.6.2",
"repo": "https://github.com/libgit2/libgit2",
"description": " A cross-platform, linkable library implementation of Git that you can use in your application.",
"install": "mkdir build && cd build && cmake .. && cmake --build ."
diff --git a/src/cli/CMakeLists.txt b/src/cli/CMakeLists.txt
index 46f4d63b5..ac1659c17 100644
--- a/src/cli/CMakeLists.txt
+++ b/src/cli/CMakeLists.txt
@@ -4,7 +4,8 @@ set(CLI_INCLUDES
"${libgit2_BINARY_DIR}/include/git2"
"${libgit2_SOURCE_DIR}/src/util"
"${libgit2_SOURCE_DIR}/src/cli"
- "${libgit2_SOURCE_DIR}/include")
+ "${libgit2_SOURCE_DIR}/include"
+ "${LIBGIT2_DEPENDENCY_INCLUDES}")
if(WIN32 AND NOT CYGWIN)
file(GLOB CLI_SRC_OS win32/*.c)
diff --git a/src/cli/cmd_hash_object.c b/src/cli/cmd_hash_object.c
index a64db8823..93b980d66 100644
--- a/src/cli/cmd_hash_object.c
+++ b/src/cli/cmd_hash_object.c
@@ -49,26 +49,37 @@ static void print_help(void)
cli_opt_help_fprint(stdout, opts);
}
-static int hash_buf(git_odb *odb, git_str *buf, git_object_t type)
+static int hash_buf(
+ git_odb *odb,
+ git_str *buf,
+ git_object_t object_type,
+ git_oid_t oid_type)
{
git_oid oid;
if (!literally) {
int valid = 0;
- if (git_object_rawcontent_is_valid(&valid, buf->ptr, buf->size, type) < 0 || !valid)
+#ifdef GIT_EXPERIMENTAL_SHA256
+ if (git_object_rawcontent_is_valid(&valid, buf->ptr, buf->size, object_type, oid_type) < 0 || !valid)
+ return cli_error_git();
+#else
+ GIT_UNUSED(oid_type);
+
+ if (git_object_rawcontent_is_valid(&valid, buf->ptr, buf->size, object_type) < 0 || !valid)
return cli_error_git();
+#endif
}
if (write_object) {
- if (git_odb_write(&oid, odb, buf->ptr, buf->size, type) < 0)
+ if (git_odb_write(&oid, odb, buf->ptr, buf->size, object_type) < 0)
return cli_error_git();
} else {
#ifdef GIT_EXPERIMENTAL_SHA256
- if (git_odb_hash(&oid, buf->ptr, buf->size, type, GIT_OID_SHA1) < 0)
+ if (git_odb_hash(&oid, buf->ptr, buf->size, object_type, GIT_OID_SHA1) < 0)
return cli_error_git();
#else
- if (git_odb_hash(&oid, buf->ptr, buf->size, type) < 0)
+ if (git_odb_hash(&oid, buf->ptr, buf->size, object_type) < 0)
return cli_error_git();
#endif
}
@@ -83,9 +94,10 @@ int cmd_hash_object(int argc, char **argv)
{
git_repository *repo = NULL;
git_odb *odb = NULL;
+ git_oid_t oid_type;
git_str buf = GIT_STR_INIT;
cli_opt invalid_opt;
- git_object_t type = GIT_OBJECT_BLOB;
+ git_object_t object_type = GIT_OBJECT_BLOB;
char **filename;
int ret = 0;
@@ -97,7 +109,7 @@ int cmd_hash_object(int argc, char **argv)
return 0;
}
- if (type_name && (type = git_object_string2type(type_name)) == GIT_OBJECT_INVALID)
+ if (type_name && (object_type = git_object_string2type(type_name)) == GIT_OBJECT_INVALID)
return cli_error_usage("invalid object type '%s'", type_name);
if (write_object &&
@@ -107,6 +119,8 @@ int cmd_hash_object(int argc, char **argv)
goto done;
}
+ oid_type = git_repository_oid_type(repo);
+
/*
* TODO: we're reading blobs, we shouldn't pull them all into main
* memory, we should just stream them into the odb instead.
@@ -118,7 +132,7 @@ int cmd_hash_object(int argc, char **argv)
goto done;
}
- if ((ret = hash_buf(odb, &buf, type)) != 0)
+ if ((ret = hash_buf(odb, &buf, object_type, oid_type)) != 0)
goto done;
} else {
for (filename = filenames; *filename; filename++) {
@@ -127,7 +141,7 @@ int cmd_hash_object(int argc, char **argv)
goto done;
}
- if ((ret = hash_buf(odb, &buf, type)) != 0)
+ if ((ret = hash_buf(odb, &buf, object_type, oid_type)) != 0)
goto done;
}
}
diff --git a/src/cli/opt.c b/src/cli/opt.c
index 72df5877f..62a3430d1 100644
--- a/src/cli/opt.c
+++ b/src/cli/opt.c
@@ -23,7 +23,7 @@
#include "opt.h"
#ifdef _WIN32
-# include <Windows.h>
+# include <windows.h>
#else
# include <fcntl.h>
# include <sys/ioctl.h>
diff --git a/src/libgit2/CMakeLists.txt b/src/libgit2/CMakeLists.txt
index 3462b795e..03b571212 100644
--- a/src/libgit2/CMakeLists.txt
+++ b/src/libgit2/CMakeLists.txt
@@ -15,16 +15,6 @@ set(LIBGIT2_INCLUDES
"${PROJECT_SOURCE_DIR}/src/util"
"${PROJECT_SOURCE_DIR}/include")
-if(WIN32 AND EMBED_SSH_PATH)
- file(GLOB SRC_SSH "${EMBED_SSH_PATH}/src/*.c")
- list(SORT SRC_SSH)
- target_sources(libgit2 PRIVATE ${SRC_SSH})
-
- list(APPEND LIBGIT2_SYSTEM_INCLUDES "${EMBED_SSH_PATH}/include")
- file(WRITE "${EMBED_SSH_PATH}/src/libssh2_config.h" "#define HAVE_WINCNG\n#define LIBSSH2_WINCNG\n#include \"../win32/libssh2_config.h\"")
- set(GIT_SSH 1)
-endif()
-
# Collect sourcefiles
file(GLOB SRC_H
"${PROJECT_SOURCE_DIR}/include/git2.h"
@@ -69,6 +59,7 @@ endif()
ide_split_sources(libgit2)
list(APPEND LIBGIT2_OBJECTS $<TARGET_OBJECTS:util> $<TARGET_OBJECTS:libgit2> ${LIBGIT2_DEPENDENCY_OBJECTS})
+list(APPEND LIBGIT2_INCLUDES ${LIBGIT2_DEPENDENCY_INCLUDES})
target_include_directories(libgit2 PRIVATE ${LIBGIT2_INCLUDES} ${LIBGIT2_DEPENDENCY_INCLUDES} PUBLIC ${PROJECT_SOURCE_DIR}/include)
target_include_directories(libgit2 SYSTEM PRIVATE ${LIBGIT2_SYSTEM_INCLUDES})
@@ -86,6 +77,7 @@ set(LIBGIT2_SYSTEM_LIBS ${LIBGIT2_SYSTEM_LIBS} PARENT_SCOPE)
add_library(libgit2package ${SRC_RC} ${LIBGIT2_OBJECTS})
target_link_libraries(libgit2package ${LIBGIT2_SYSTEM_LIBS})
+target_include_directories(libgit2package SYSTEM PRIVATE ${LIBGIT2_INCLUDES})
set_target_properties(libgit2package PROPERTIES C_STANDARD 90)
set_target_properties(libgit2package PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
@@ -111,10 +103,10 @@ if(SONAME)
endif()
endif()
-pkg_build_config(NAME "${LIBGIT2_FILENAME}"
+pkg_build_config(NAME "lib${LIBGIT2_FILENAME}"
VERSION ${libgit2_VERSION}
DESCRIPTION "The git library, take 2"
- LIBS_SELF git2
+ LIBS_SELF ${LIBGIT2_FILENAME}
PRIVATE_LIBS ${LIBGIT2_PC_LIBS}
REQUIRES ${LIBGIT2_PC_REQUIRES})
diff --git a/src/libgit2/attrcache.c b/src/libgit2/attrcache.c
index b16d95c3c..405944ed1 100644
--- a/src/libgit2/attrcache.c
+++ b/src/libgit2/attrcache.c
@@ -300,7 +300,7 @@ static int attr_cache__lookup_path(
/* expand leading ~/ as needed */
if (cfgval && cfgval[0] == '~' && cfgval[1] == '/') {
- if (! (error = git_sysdir_expand_global_file(&buf, &cfgval[2])))
+ if (! (error = git_sysdir_expand_homedir_file(&buf, &cfgval[2])))
*out = git_str_detach(&buf);
} else if (cfgval) {
*out = git__strdup(cfgval);
diff --git a/src/libgit2/blob.c b/src/libgit2/blob.c
index b1680d3a8..5cfd7474b 100644
--- a/src/libgit2/blob.c
+++ b/src/libgit2/blob.c
@@ -52,11 +52,12 @@ void git_blob__free(void *_blob)
git__free(blob);
}
-int git_blob__parse_raw(void *_blob, const char *data, size_t size)
+int git_blob__parse_raw(void *_blob, const char *data, size_t size, git_oid_t oid_type)
{
git_blob *blob = (git_blob *) _blob;
GIT_ASSERT_ARG(blob);
+ GIT_UNUSED(oid_type);
blob->raw = 1;
blob->data.raw.data = data;
@@ -64,11 +65,12 @@ int git_blob__parse_raw(void *_blob, const char *data, size_t size)
return 0;
}
-int git_blob__parse(void *_blob, git_odb_object *odb_obj)
+int git_blob__parse(void *_blob, git_odb_object *odb_obj, git_oid_t oid_type)
{
git_blob *blob = (git_blob *) _blob;
GIT_ASSERT_ARG(blob);
+ GIT_UNUSED(oid_type);
git_cached_obj_incref((git_cached_obj *)odb_obj);
blob->raw = 0;
diff --git a/src/libgit2/blob.h b/src/libgit2/blob.h
index 9a5dda225..d6c9dd99b 100644
--- a/src/libgit2/blob.h
+++ b/src/libgit2/blob.h
@@ -36,8 +36,8 @@ struct git_blob {
} while(0)
void git_blob__free(void *blob);
-int git_blob__parse(void *blob, git_odb_object *obj);
-int git_blob__parse_raw(void *blob, const char *data, size_t size);
+int git_blob__parse(void *blob, git_odb_object *obj, git_oid_t oid_type);
+int git_blob__parse_raw(void *blob, const char *data, size_t size, git_oid_t oid_type);
int git_blob__getbuf(git_str *buffer, git_blob *blob);
extern int git_blob__create_from_paths(
diff --git a/src/libgit2/clone.c b/src/libgit2/clone.c
index 6f34cb7ca..43341a493 100644
--- a/src/libgit2/clone.c
+++ b/src/libgit2/clone.c
@@ -282,7 +282,11 @@ static int update_head_to_branch(
reflog_message)) < 0)
goto cleanup;
- if ((retcode = git_remote__default_branch(&default_branch, remote)) < 0)
+ retcode = git_remote__default_branch(&default_branch, remote);
+
+ if (retcode == GIT_ENOTFOUND)
+ retcode = 0;
+ else if (retcode)
goto cleanup;
if (!git_remote__matching_refspec(remote, git_str_cstr(&default_branch)))
@@ -389,12 +393,19 @@ static int checkout_branch(git_repository *repo, git_remote *remote, const git_c
return error;
}
-static int clone_into(git_repository *repo, git_remote *_remote, const git_fetch_options *opts, const git_checkout_options *co_opts, const char *branch)
+static int clone_into(
+ git_repository *repo,
+ git_remote *_remote,
+ const git_fetch_options *opts,
+ const git_checkout_options *co_opts,
+ const char *branch)
{
int error;
git_str reflog_message = GIT_STR_INIT;
+ git_remote_connect_options connect_opts = GIT_REMOTE_CONNECT_OPTIONS_INIT;
git_fetch_options fetch_opts;
git_remote *remote;
+ git_oid_t oid_type;
GIT_ASSERT_ARG(repo);
GIT_ASSERT_ARG(_remote);
@@ -412,9 +423,25 @@ static int clone_into(git_repository *repo, git_remote *_remote, const git_fetch
if (opts->depth <= 0)
fetch_opts.download_tags = GIT_REMOTE_DOWNLOAD_TAGS_ALL;
-
+
+ if ((error = git_remote_connect_options__from_fetch_opts(&connect_opts, remote, &fetch_opts)) < 0)
+ goto cleanup;
+
git_str_printf(&reflog_message, "clone: from %s", git_remote_url(remote));
+ /*
+ * Connect to the server so that we can identify the remote
+ * object format.
+ */
+
+ if ((error = git_remote_connect_ext(remote, GIT_DIRECTION_FETCH,
+ &connect_opts)) < 0)
+ goto cleanup;
+
+ if ((error = git_remote_oid_type(&oid_type, remote)) < 0 ||
+ (error = git_repository__set_objectformat(repo, oid_type)) < 0)
+ goto cleanup;
+
if ((error = git_remote_fetch(remote, NULL, &fetch_opts, git_str_cstr(&reflog_message))) != 0)
goto cleanup;
@@ -422,6 +449,7 @@ static int clone_into(git_repository *repo, git_remote *_remote, const git_fetch
cleanup:
git_remote_free(remote);
+ git_remote_connect_options_dispose(&connect_opts);
git_str_dispose(&reflog_message);
return error;
diff --git a/src/libgit2/commit.c b/src/libgit2/commit.c
index 528d8beb7..017c60303 100644
--- a/src/libgit2/commit.c
+++ b/src/libgit2/commit.c
@@ -391,7 +391,11 @@ int git_commit_amend(
return error;
}
-static int commit_parse(git_commit *commit, const char *data, size_t size, unsigned int flags)
+static int commit_parse(
+ git_commit *commit,
+ const char *data,
+ size_t size,
+ git_commit__parse_options *opts)
{
const char *buffer_start = data, *buffer;
const char *buffer_end = buffer_start + size;
@@ -402,6 +406,7 @@ static int commit_parse(git_commit *commit, const char *data, size_t size, unsig
GIT_ASSERT_ARG(commit);
GIT_ASSERT_ARG(data);
+ GIT_ASSERT_ARG(opts);
buffer = buffer_start;
@@ -410,26 +415,29 @@ static int commit_parse(git_commit *commit, const char *data, size_t size, unsig
GIT_ERROR_CHECK_ARRAY(commit->parent_ids);
/* The tree is always the first field */
- if (!(flags & GIT_COMMIT_PARSE_QUICK)) {
+ if (!(opts->flags & GIT_COMMIT_PARSE_QUICK)) {
if (git_object__parse_oid_header(&commit->tree_id,
&buffer, buffer_end, "tree ",
- GIT_OID_SHA1) < 0)
+ opts->oid_type) < 0)
goto bad_buffer;
} else {
- size_t tree_len = strlen("tree ") + GIT_OID_SHA1_HEXSIZE + 1;
+ size_t tree_len = strlen("tree ") + git_oid_hexsize(opts->oid_type) + 1;
+
if (buffer + tree_len > buffer_end)
goto bad_buffer;
buffer += tree_len;
}
- while (git_object__parse_oid_header(&parent_id, &buffer, buffer_end, "parent ", GIT_OID_SHA1) == 0) {
+ while (git_object__parse_oid_header(&parent_id,
+ &buffer, buffer_end, "parent ",
+ opts->oid_type) == 0) {
git_oid *new_id = git_array_alloc(commit->parent_ids);
GIT_ERROR_CHECK_ALLOC(new_id);
git_oid_cpy(new_id, &parent_id);
}
- if (!(flags & GIT_COMMIT_PARSE_QUICK)) {
+ if (!opts || !(opts->flags & GIT_COMMIT_PARSE_QUICK)) {
commit->author = git__malloc(sizeof(git_signature));
GIT_ERROR_CHECK_ALLOC(commit->author);
@@ -453,7 +461,7 @@ static int commit_parse(git_commit *commit, const char *data, size_t size, unsig
if ((error = git_signature__parse(commit->committer, &buffer, buffer_end, "committer ", '\n')) < 0)
return error;
- if (flags & GIT_COMMIT_PARSE_QUICK)
+ if (opts && opts->flags & GIT_COMMIT_PARSE_QUICK)
return 0;
/* Parse add'l header entries */
@@ -498,9 +506,15 @@ bad_buffer:
return GIT_EINVALID;
}
-int git_commit__parse_raw(void *commit, const char *data, size_t size)
+int git_commit__parse(
+ void *commit,
+ git_odb_object *odb_obj,
+ git_oid_t oid_type)
{
- return commit_parse(commit, data, size, 0);
+ git_commit__parse_options parse_options = {0};
+ parse_options.oid_type = oid_type;
+
+ return git_commit__parse_ext(commit, odb_obj, &parse_options);
}
static int assign_commit_parents_from_graft(git_commit *commit, git_commit_graft *graft) {
@@ -540,9 +554,28 @@ int git_commit__parse_ext(git_commit *commit, git_odb_object *odb_obj, unsigned
return assign_commit_parents_from_graft(commit, graft);
}
-int git_commit__parse(void *_commit, git_odb_object *odb_obj)
+int git_commit__parse_raw(
+ void *commit,
+ const char *data,
+ size_t size,
+ git_oid_t oid_type)
{
- return git_commit__parse_ext(_commit, odb_obj, 0);
+ git_commit__parse_options parse_options = {0};
+ parse_options.oid_type = oid_type;
+
+ return commit_parse(commit, data, size, &parse_options);
+}
+
+int git_commit__parse_ext(
+ git_commit *commit,
+ git_odb_object *odb_obj,
+ git_commit__parse_options *parse_opts)
+{
+ return commit_parse(
+ commit,
+ git_odb_object_data(odb_obj),
+ git_odb_object_size(odb_obj),
+ parse_opts);
}
#define GIT_COMMIT_GETTER(_rvalue, _name, _return, _invalid) \
@@ -1012,11 +1045,14 @@ int git_commit_create_with_signature(
git_str commit = GIT_STR_INIT;
git_commit *parsed;
git_array_oid_t parents = GIT_ARRAY_INIT;
+ git_commit__parse_options parse_opts = {0};
+
+ parse_opts.oid_type = repo->oid_type;
/* The first step is to verify that all the tree and parents exist */
parsed = git__calloc(1, sizeof(git_commit));
GIT_ERROR_CHECK_ALLOC(parsed);
- if (commit_parse(parsed, commit_content, strlen(commit_content), 0) < 0) {
+ if (commit_parse(parsed, commit_content, strlen(commit_content), &parse_opts) < 0) {
error = -1;
goto cleanup;
}
diff --git a/src/libgit2/commit.h b/src/libgit2/commit.h
index 7a2454e61..c25fee327 100644
--- a/src/libgit2/commit.h
+++ b/src/libgit2/commit.h
@@ -33,6 +33,16 @@ struct git_commit {
char *body;
};
+typedef struct {
+ git_oid_t oid_type;
+ unsigned int flags;
+} git_commit__parse_options;
+
+typedef enum {
+ /** Only parse parents and committer info */
+ GIT_COMMIT_PARSE_QUICK = (1 << 0)
+} git_commit__parse_flags;
+
int git_commit__header_field(
git_str *out,
const git_commit *commit,
@@ -56,14 +66,22 @@ int git_commit__create_buffer(
size_t parent_count,
const git_commit *parents[]);
-void git_commit__free(void *commit);
-int git_commit__parse(void *commit, git_odb_object *obj);
-int git_commit__parse_raw(void *commit, const char *data, size_t size);
+int git_commit__parse(
+ void *commit,
+ git_odb_object *obj,
+ git_oid_t oid_type);
-typedef enum {
- GIT_COMMIT_PARSE_QUICK = (1 << 0) /**< Only parse parents and committer info */
-} git_commit__parse_flags;
+int git_commit__parse_raw(
+ void *commit,
+ const char *data,
+ size_t size,
+ git_oid_t oid_type);
-int git_commit__parse_ext(git_commit *commit, git_odb_object *odb_obj, unsigned int flags);
+int git_commit__parse_ext(
+ git_commit *commit,
+ git_odb_object *odb_obj,
+ git_commit__parse_options *parse_opts);
+
+void git_commit__free(void *commit);
#endif
diff --git a/src/libgit2/commit_graph.c b/src/libgit2/commit_graph.c
index 322d24b19..bf557f7ad 100644
--- a/src/libgit2/commit_graph.c
+++ b/src/libgit2/commit_graph.c
@@ -200,8 +200,7 @@ int git_commit_graph_file_parse(
const unsigned char *chunk_hdr;
struct git_commit_graph_chunk *last_chunk;
uint32_t i;
- off64_t last_chunk_offset, chunk_offset, trailer_offset;
- unsigned char checksum[GIT_HASH_SHA1_SIZE];
+ uint64_t last_chunk_offset, chunk_offset, trailer_offset;
size_t checksum_size;
int error;
struct git_commit_graph_chunk chunk_oid_fanout = {0}, chunk_oid_lookup = {0},
@@ -234,16 +233,11 @@ int git_commit_graph_file_parse(
return commit_graph_error("wrong commit-graph size");
memcpy(file->checksum, (data + trailer_offset), checksum_size);
- if (git_hash_buf(checksum, data, (size_t)trailer_offset, GIT_HASH_ALGORITHM_SHA1) < 0)
- return commit_graph_error("could not calculate signature");
- if (memcmp(checksum, file->checksum, checksum_size) != 0)
- return commit_graph_error("index signature mismatch");
-
chunk_hdr = data + sizeof(struct git_commit_graph_header);
last_chunk = NULL;
for (i = 0; i < hdr->chunks; ++i, chunk_hdr += 12) {
- chunk_offset = ((off64_t)ntohl(*((uint32_t *)(chunk_hdr + 4)))) << 32
- | ((off64_t)ntohl(*((uint32_t *)(chunk_hdr + 8))));
+ chunk_offset = ((uint64_t)ntohl(*((uint32_t *)(chunk_hdr + 4)))) << 32
+ | ((uint64_t)ntohl(*((uint32_t *)(chunk_hdr + 8))));
if (chunk_offset < last_chunk_offset)
return commit_graph_error("chunks are non-monotonic");
if (chunk_offset >= trailer_offset)
@@ -331,9 +325,29 @@ error:
return error;
}
+int git_commit_graph_validate(git_commit_graph *cgraph) {
+ unsigned char checksum[GIT_HASH_SHA1_SIZE];
+ size_t checksum_size = GIT_HASH_SHA1_SIZE;
+ size_t trailer_offset = cgraph->file->graph_map.len - checksum_size;
+
+ if (cgraph->file->graph_map.len < checksum_size)
+ return commit_graph_error("map length too small");
+
+ if (git_hash_buf(checksum, cgraph->file->graph_map.data, trailer_offset, GIT_HASH_ALGORITHM_SHA1) < 0)
+ return commit_graph_error("could not calculate signature");
+ if (memcmp(checksum, cgraph->file->checksum, checksum_size) != 0)
+ return commit_graph_error("index signature mismatch");
+
+ return 0;
+}
+
int git_commit_graph_open(git_commit_graph **cgraph_out, const char *objects_dir)
{
- return git_commit_graph_new(cgraph_out, objects_dir, true);
+ int error = git_commit_graph_new(cgraph_out, objects_dir, true);
+ if (!error) {
+ return git_commit_graph_validate(*cgraph_out);
+ }
+ return error;
}
int git_commit_graph_file_open(git_commit_graph_file **file_out, const char *path)
@@ -524,7 +538,7 @@ int git_commit_graph_entry_find(
hi = ntohl(file->oid_fanout[(int)short_oid->id[0]]);
lo = ((short_oid->id[0] == 0x0) ? 0 : ntohl(file->oid_fanout[(int)short_oid->id[0] - 1]));
- pos = git_pack__lookup_sha1(file->oid_lookup, GIT_OID_SHA1_SIZE, lo, hi, short_oid->id);
+ pos = git_pack__lookup_id(file->oid_lookup, GIT_OID_SHA1_SIZE, lo, hi, short_oid->id, GIT_OID_SHA1);
if (pos >= 0) {
/* An object matching exactly the oid was found */
@@ -712,7 +726,8 @@ int git_commit_graph_writer_add_index_file(
if (error < 0)
goto cleanup;
- error = git_mwindow_get_pack(&p, idx_path);
+ /* TODO: SHA256 */
+ error = git_mwindow_get_pack(&p, idx_path, 0);
if (error < 0)
goto cleanup;
diff --git a/src/libgit2/commit_graph.h b/src/libgit2/commit_graph.h
index b78ab8177..517abb239 100644
--- a/src/libgit2/commit_graph.h
+++ b/src/libgit2/commit_graph.h
@@ -106,6 +106,9 @@ struct git_commit_graph {
/** Create a new commit-graph, optionally opening the underlying file. */
int git_commit_graph_new(git_commit_graph **cgraph_out, const char *objects_dir, bool open_file);
+/** Validate the checksum of a commit graph */
+int git_commit_graph_validate(git_commit_graph *cgraph);
+
/** Open and validate a commit-graph file. */
int git_commit_graph_file_open(git_commit_graph_file **file_out, const char *path);
diff --git a/src/libgit2/commit_list.c b/src/libgit2/commit_list.c
index 511d7291f..12b329b25 100644
--- a/src/libgit2/commit_list.c
+++ b/src/libgit2/commit_list.c
@@ -124,13 +124,17 @@ static int commit_quick_parse(
{
git_oid *parent_oid;
git_commit *commit;
+ git_commit__parse_options parse_opts = {
+ GIT_OID_SHA1,
+ GIT_COMMIT_PARSE_QUICK
+ };
size_t i;
commit = git__calloc(1, sizeof(*commit));
GIT_ERROR_CHECK_ALLOC(commit);
commit->object.repo = walk->repo;
- if (git_commit__parse_ext(commit, obj, GIT_COMMIT_PARSE_QUICK) < 0) {
+ if (git_commit__parse_ext(commit, obj, &parse_opts) < 0) {
git__free(commit);
return -1;
}
diff --git a/src/libgit2/config.c b/src/libgit2/config.c
index 5c366e221..6d15a8db6 100644
--- a/src/libgit2/config.c
+++ b/src/libgit2/config.c
@@ -860,7 +860,7 @@ static int git_config__parse_path(git_str *out, const char *value)
return -1;
}
- return git_sysdir_expand_global_file(out, value[1] ? &value[2] : NULL);
+ return git_sysdir_expand_homedir_file(out, value[1] ? &value[2] : NULL);
}
return git_str_sets(out, value);
diff --git a/src/libgit2/config_file.c b/src/libgit2/config_file.c
index 66fcb8ae2..932ca7601 100644
--- a/src/libgit2/config_file.c
+++ b/src/libgit2/config_file.c
@@ -528,7 +528,7 @@ static int included_path(git_str *out, const char *dir, const char *path)
{
/* From the user's home */
if (path[0] == '~' && path[1] == '/')
- return git_sysdir_expand_global_file(out, &path[1]);
+ return git_sysdir_expand_homedir_file(out, &path[1]);
return git_fs_path_join_unrooted(out, path, dir, NULL);
}
@@ -616,7 +616,7 @@ static int do_match_gitdir(
git_fs_path_dirname_r(&pattern, cfg_file);
git_str_joinpath(&pattern, pattern.ptr, condition + 2);
} else if (condition[0] == '~' && git_fs_path_is_dirsep(condition[1]))
- git_sysdir_expand_global_file(&pattern, condition + 1);
+ git_sysdir_expand_homedir_file(&pattern, condition + 1);
else if (!git_fs_path_is_absolute(condition))
git_str_joinpath(&pattern, "**", condition);
else
diff --git a/src/libgit2/describe.c b/src/libgit2/describe.c
index 20a171aa5..3f73d87d6 100644
--- a/src/libgit2/describe.c
+++ b/src/libgit2/describe.c
@@ -8,7 +8,6 @@
#include "common.h"
#include "git2/describe.h"
-#include "git2/strarray.h"
#include "git2/diff.h"
#include "git2/status.h"
@@ -19,6 +18,7 @@
#include "refs.h"
#include "repository.h"
#include "revwalk.h"
+#include "strarray.h"
#include "tag.h"
#include "vector.h"
#include "wildmatch.h"
diff --git a/src/libgit2/diff_file.c b/src/libgit2/diff_file.c
index 5f4336658..c2d08675a 100644
--- a/src/libgit2/diff_file.c
+++ b/src/libgit2/diff_file.c
@@ -348,6 +348,13 @@ static int diff_file_content_load_workdir_file(
goto cleanup;
}
+ /* if file is empty, don't attempt to mmap or readbuffer */
+ if (fc->file->size == 0) {
+ fc->map.len = 0;
+ fc->map.data = git_str__initstr;
+ goto cleanup;
+ }
+
if ((diff_opts->flags & GIT_DIFF_SHOW_BINARY) == 0 &&
diff_file_content_binary_by_size(fc))
goto cleanup;
diff --git a/src/libgit2/experimental.h.in b/src/libgit2/experimental.h.in
index 3d6e931e2..25fb14b9d 100644
--- a/src/libgit2/experimental.h.in
+++ b/src/libgit2/experimental.h.in
@@ -1,3 +1,10 @@
+/*
+ * Copyright (C) the libgit2 contributors. All rights reserved.
+ *
+ * This file is part of libgit2, distributed under the GNU GPL v2 with
+ * a Linking Exception. For full terms see the included COPYING file.
+ */
+
#ifndef INCLUDE_experimental_h__
#define INCLUDE_experimental_h__
diff --git a/src/libgit2/fetch.c b/src/libgit2/fetch.c
index 2a419534e..3a574e857 100644
--- a/src/libgit2/fetch.c
+++ b/src/libgit2/fetch.c
@@ -98,7 +98,6 @@ static int filter_wants(git_remote *remote, const git_fetch_options *opts)
git_remote_head **heads;
git_refspec tagspec, head, *spec;
int error = 0;
- git_odb *odb;
size_t i, heads_len;
unsigned int remote_caps;
unsigned int oid_mask = GIT_REMOTE_CAPABILITY_TIP_OID |
@@ -129,9 +128,6 @@ static int filter_wants(git_remote *remote, const git_fetch_options *opts)
goto cleanup;
}
- if ((error = git_repository_odb__weakptr(&odb, remote->repo)) < 0)
- goto cleanup;
-
if ((error = git_remote_ls((const git_remote_head ***)&heads, &heads_len, remote)) < 0 ||
(error = git_remote_capabilities(&remote_caps, remote)) < 0)
goto cleanup;
diff --git a/src/libgit2/index.c b/src/libgit2/index.c
index 1821f6027..d4532c005 100644
--- a/src/libgit2/index.c
+++ b/src/libgit2/index.c
@@ -3397,7 +3397,6 @@ int git_index_add_all(
{
int error;
git_repository *repo;
- git_iterator *wditer = NULL;
git_pathspec ps;
bool no_fnmatch = (flags & GIT_INDEX_ADD_DISABLE_PATHSPEC_MATCH) != 0;
@@ -3423,7 +3422,6 @@ int git_index_add_all(
git_error_set_after_callback(error);
cleanup:
- git_iterator_free(wditer);
git_pathspec__clear(&ps);
return error;
@@ -3511,7 +3509,8 @@ static int index_apply_to_wd_diff(git_index *index, int action, const git_strarr
GIT_DIFF_RECURSE_UNTRACKED_DIRS;
if (flags == GIT_INDEX_ADD_FORCE)
- opts.flags |= GIT_DIFF_INCLUDE_IGNORED;
+ opts.flags |= GIT_DIFF_INCLUDE_IGNORED |
+ GIT_DIFF_RECURSE_IGNORED_DIRS;
}
if ((error = git_diff_index_to_workdir(&diff, repo, index, &opts)) < 0)
diff --git a/src/libgit2/indexer.c b/src/libgit2/indexer.c
index 62bb70393..fa55fb5ea 100644
--- a/src/libgit2/indexer.c
+++ b/src/libgit2/indexer.c
@@ -42,6 +42,7 @@ struct git_indexer {
have_delta :1,
do_fsync :1,
do_verify :1;
+ git_oid_t oid_type;
struct git_pack_header hdr;
struct git_pack_file *pack;
unsigned int mode;
@@ -55,8 +56,8 @@ struct git_indexer {
git_vector deltas;
unsigned int fanout[256];
git_hash_ctx hash_ctx;
- unsigned char checksum[GIT_HASH_SHA1_SIZE];
- char name[(GIT_HASH_SHA1_SIZE * 2) + 1];
+ unsigned char checksum[GIT_HASH_MAX_SIZE];
+ char name[(GIT_HASH_MAX_SIZE * 2) + 1];
git_indexer_progress_cb progress_cb;
void *progress_payload;
char objbuf[8*1024];
@@ -68,7 +69,7 @@ struct git_indexer {
git_odb *odb;
/* Fields for calculating the packfile trailer (hash of everything before it) */
- char inbuf[GIT_OID_SHA1_SIZE];
+ char inbuf[GIT_HASH_MAX_SIZE];
size_t inbuf_len;
git_hash_ctx trailer;
};
@@ -136,17 +137,33 @@ int git_indexer_init_options(git_indexer_options *opts, unsigned int version)
}
#endif
-int git_indexer_new(
- git_indexer **out,
- const char *prefix,
- unsigned int mode,
- git_odb *odb,
- git_indexer_options *in_opts)
+GIT_INLINE(git_hash_algorithm_t) indexer_hash_algorithm(git_indexer *idx)
+{
+ switch (idx->oid_type) {
+ case GIT_OID_SHA1:
+ return GIT_HASH_ALGORITHM_SHA1;
+#ifdef GIT_EXPERIMENTAL_SHA256
+ case GIT_OID_SHA256:
+ return GIT_HASH_ALGORITHM_SHA256;
+#endif
+ }
+
+ return GIT_HASH_ALGORITHM_NONE;
+}
+
+static int indexer_new(
+ git_indexer **out,
+ const char *prefix,
+ git_oid_t oid_type,
+ unsigned int mode,
+ git_odb *odb,
+ git_indexer_options *in_opts)
{
git_indexer_options opts = GIT_INDEXER_OPTIONS_INIT;
git_indexer *idx;
git_str path = GIT_STR_INIT, tmp_path = GIT_STR_INIT;
static const char suff[] = "/pack";
+ git_hash_algorithm_t checksum_type;
int error, fd = -1;
if (in_opts)
@@ -154,14 +171,17 @@ int git_indexer_new(
idx = git__calloc(1, sizeof(git_indexer));
GIT_ERROR_CHECK_ALLOC(idx);
+ idx->oid_type = oid_type;
idx->odb = odb;
idx->progress_cb = opts.progress_cb;
idx->progress_payload = opts.progress_cb_payload;
idx->mode = mode ? mode : GIT_PACK_FILE_MODE;
git_str_init(&idx->entry_data, 0);
- if ((error = git_hash_ctx_init(&idx->hash_ctx, GIT_HASH_ALGORITHM_SHA1)) < 0 ||
- (error = git_hash_ctx_init(&idx->trailer, GIT_HASH_ALGORITHM_SHA1)) < 0 ||
+ checksum_type = indexer_hash_algorithm(idx);
+
+ if ((error = git_hash_ctx_init(&idx->hash_ctx, checksum_type)) < 0 ||
+ (error = git_hash_ctx_init(&idx->trailer, checksum_type)) < 0 ||
(error = git_oidmap_new(&idx->expected_oids)) < 0)
goto cleanup;
@@ -179,7 +199,7 @@ int git_indexer_new(
if (fd < 0)
goto cleanup;
- error = git_packfile_alloc(&idx->pack, git_str_cstr(&tmp_path));
+ error = git_packfile_alloc(&idx->pack, git_str_cstr(&tmp_path), oid_type);
git_str_dispose(&tmp_path);
if (error < 0)
@@ -208,6 +228,33 @@ cleanup:
return -1;
}
+#ifdef GIT_EXPERIMENTAL_SHA256
+int git_indexer_new(
+ git_indexer **out,
+ const char *prefix,
+ git_oid_t oid_type,
+ git_indexer_options *opts)
+{
+ return indexer_new(
+ out,
+ prefix,
+ oid_type,
+ opts ? opts->mode : 0,
+ opts ? opts->odb : NULL,
+ opts);
+}
+#else
+int git_indexer_new(
+ git_indexer **out,
+ const char *prefix,
+ unsigned int mode,
+ git_odb *odb,
+ git_indexer_options *opts)
+{
+ return indexer_new(out, prefix, GIT_OID_SHA1, mode, odb, opts);
+}
+#endif
+
void git_indexer__set_fsync(git_indexer *idx, int do_fsync)
{
idx->do_fsync = !!do_fsync;
@@ -272,7 +319,7 @@ static int advance_delta_offset(git_indexer *idx, git_object_t type)
GIT_ASSERT_ARG(type == GIT_OBJECT_REF_DELTA || type == GIT_OBJECT_OFS_DELTA);
if (type == GIT_OBJECT_REF_DELTA) {
- idx->off += GIT_OID_SHA1_SIZE;
+ idx->off += git_oid_size(idx->oid_type);
} else {
off64_t base_off;
int error = get_delta_base(&base_off, idx->pack, &w, &idx->off, type, idx->entry_start);
@@ -356,7 +403,7 @@ static int check_object_connectivity(git_indexer *idx, const git_rawobj *obj)
obj->type != GIT_OBJECT_TAG)
return 0;
- if (git_object__from_raw(&object, obj->data, obj->len, obj->type) < 0) {
+ if (git_object__from_raw(&object, obj->data, obj->len, obj->type, idx->oid_type) < 0) {
/*
* parse_raw returns EINVALID on invalid data; downgrade
* that to a normal -1 error code.
@@ -446,7 +493,7 @@ static int store_object(git_indexer *idx)
}
#ifdef GIT_EXPERIMENTAL_SHA256
- oid.type = GIT_OID_SHA1;
+ oid.type = idx->oid_type;
#endif
entry_size = idx->off - entry_start;
@@ -468,16 +515,16 @@ static int store_object(git_indexer *idx)
goto on_error;
}
- git_oid_cpy(&pentry->sha1, &oid);
+ git_oid_cpy(&pentry->id, &oid);
pentry->offset = entry_start;
- if (git_oidmap_exists(idx->pack->idx_cache, &pentry->sha1)) {
- git_error_set(GIT_ERROR_INDEXER, "duplicate object %s found in pack", git_oid_tostr_s(&pentry->sha1));
+ if (git_oidmap_exists(idx->pack->idx_cache, &pentry->id)) {
+ git_error_set(GIT_ERROR_INDEXER, "duplicate object %s found in pack", git_oid_tostr_s(&pentry->id));
git__free(pentry);
goto on_error;
}
- if ((error = git_oidmap_set(idx->pack->idx_cache, &pentry->sha1, pentry)) < 0) {
+ if ((error = git_oidmap_set(idx->pack->idx_cache, &pentry->id, pentry)) < 0) {
git__free(pentry);
git_error_set_oom();
goto on_error;
@@ -522,8 +569,8 @@ static int save_entry(git_indexer *idx, struct entry *entry, struct git_pack_ent
pentry->offset = entry_start;
- if (git_oidmap_exists(idx->pack->idx_cache, &pentry->sha1) ||
- git_oidmap_set(idx->pack->idx_cache, &pentry->sha1, pentry) < 0) {
+ if (git_oidmap_exists(idx->pack->idx_cache, &pentry->id) ||
+ git_oidmap_set(idx->pack->idx_cache, &pentry->id, pentry) < 0) {
git_error_set(GIT_ERROR_INDEXER, "cannot insert object into pack");
return -1;
}
@@ -549,7 +596,7 @@ static int hash_and_save(git_indexer *idx, git_rawobj *obj, off64_t entry_start)
entry = git__calloc(1, sizeof(*entry));
GIT_ERROR_CHECK_ALLOC(entry);
- if (git_odb__hashobj(&oid, obj, GIT_OID_SHA1) < 0) {
+ if (git_odb__hashobj(&oid, obj, idx->oid_type) < 0) {
git_error_set(GIT_ERROR_INDEXER, "failed to hash object");
goto on_error;
}
@@ -557,7 +604,7 @@ static int hash_and_save(git_indexer *idx, git_rawobj *obj, off64_t entry_start)
pentry = git__calloc(1, sizeof(struct git_pack_entry));
GIT_ERROR_CHECK_ALLOC(pentry);
- git_oid_cpy(&pentry->sha1, &oid);
+ git_oid_cpy(&pentry->id, &oid);
git_oid_cpy(&entry->oid, &oid);
entry->crc = crc32(0L, Z_NULL, 0);
@@ -583,34 +630,38 @@ static int do_progress_callback(git_indexer *idx, git_indexer_progress *stats)
return 0;
}
-/* Hash everything but the last 20B of input */
+/* Hash everything but the checksum trailer */
static void hash_partially(git_indexer *idx, const uint8_t *data, size_t size)
{
size_t to_expell, to_keep;
+ size_t oid_size = git_oid_size(idx->oid_type);
if (size == 0)
return;
- /* Easy case, dump the buffer and the data minus the last 20 bytes */
- if (size >= GIT_OID_SHA1_SIZE) {
+ /*
+ * Easy case, dump the buffer and the data minus the trailing
+ * checksum (SHA1 or SHA256).
+ */
+ if (size >= oid_size) {
git_hash_update(&idx->trailer, idx->inbuf, idx->inbuf_len);
- git_hash_update(&idx->trailer, data, size - GIT_OID_SHA1_SIZE);
+ git_hash_update(&idx->trailer, data, size - oid_size);
- data += size - GIT_OID_SHA1_SIZE;
- memcpy(idx->inbuf, data, GIT_OID_SHA1_SIZE);
- idx->inbuf_len = GIT_OID_SHA1_SIZE;
+ data += size - oid_size;
+ memcpy(idx->inbuf, data, oid_size);
+ idx->inbuf_len = oid_size;
return;
}
/* We can just append */
- if (idx->inbuf_len + size <= GIT_OID_SHA1_SIZE) {
+ if (idx->inbuf_len + size <= oid_size) {
memcpy(idx->inbuf + idx->inbuf_len, data, size);
idx->inbuf_len += size;
return;
}
/* We need to partially drain the buffer and then append */
- to_keep = GIT_OID_SHA1_SIZE - size;
+ to_keep = oid_size - size;
to_expell = idx->inbuf_len - to_keep;
git_hash_update(&idx->trailer, idx->inbuf, to_expell);
@@ -729,12 +780,14 @@ static int read_stream_object(git_indexer *idx, git_indexer_progress *stats)
{
git_packfile_stream *stream = &idx->stream;
off64_t entry_start = idx->off;
- size_t entry_size;
+ size_t oid_size, entry_size;
git_object_t type;
git_mwindow *w = NULL;
int error;
- if (idx->pack->mwf.size <= idx->off + 20)
+ oid_size = git_oid_size(idx->oid_type);
+
+ if (idx->pack->mwf.size <= idx->off + (long long)oid_size)
return GIT_EBUFS;
if (!idx->have_stream) {
@@ -905,7 +958,7 @@ static int index_path(git_str *path, git_indexer *idx, const char *suffix)
slash--;
if (git_str_grow(path, slash + 1 + strlen(prefix) +
- GIT_OID_SHA1_HEXSIZE + strlen(suffix) + 1) < 0)
+ git_oid_hexsize(idx->oid_type) + strlen(suffix) + 1) < 0)
return -1;
git_str_truncate(path, slash);
@@ -922,7 +975,7 @@ static int index_path(git_str *path, git_indexer *idx, const char *suffix)
*/
static int seek_back_trailer(git_indexer *idx)
{
- idx->pack->mwf.size -= GIT_OID_SHA1_SIZE;
+ idx->pack->mwf.size -= git_oid_size(idx->oid_type);
return git_mwindow_free_all(&idx->pack->mwf);
}
@@ -931,15 +984,17 @@ static int inject_object(git_indexer *idx, git_oid *id)
git_odb_object *obj = NULL;
struct entry *entry = NULL;
struct git_pack_entry *pentry = NULL;
- unsigned char empty_checksum[GIT_HASH_SHA1_SIZE] = {0};
+ unsigned char empty_checksum[GIT_HASH_MAX_SIZE] = {0};
unsigned char hdr[64];
git_str buf = GIT_STR_INIT;
off64_t entry_start;
const void *data;
size_t len, hdr_len;
- size_t checksum_size = GIT_HASH_SHA1_SIZE;
+ size_t checksum_size;
int error;
+ checksum_size = git_hash_size(indexer_hash_algorithm(idx));
+
if ((error = seek_back_trailer(idx)) < 0)
goto cleanup;
@@ -982,12 +1037,12 @@ static int inject_object(git_indexer *idx, git_oid *id)
if ((error = append_to_pack(idx, empty_checksum, checksum_size)) < 0)
goto cleanup;
- idx->pack->mwf.size += GIT_OID_SHA1_SIZE;
+ idx->pack->mwf.size += git_oid_size(idx->oid_type);
pentry = git__calloc(1, sizeof(struct git_pack_entry));
GIT_ERROR_CHECK_ALLOC(pentry);
- git_oid_cpy(&pentry->sha1, id);
+ git_oid_cpy(&pentry->id, id);
git_oid_cpy(&entry->oid, id);
idx->off = entry_start + hdr_len + len;
@@ -1045,13 +1100,13 @@ static int fix_thin_pack(git_indexer *idx, git_indexer_progress *stats)
}
/* curpos now points to the base information, which is an OID */
- base_info = git_mwindow_open(&idx->pack->mwf, &w, curpos, GIT_OID_SHA1_SIZE, &left);
+ base_info = git_mwindow_open(&idx->pack->mwf, &w, curpos, git_oid_size(idx->oid_type), &left);
if (base_info == NULL) {
git_error_set(GIT_ERROR_INDEXER, "failed to map delta information");
return -1;
}
- git_oid__fromraw(&base, base_info, GIT_OID_SHA1);
+ git_oid__fromraw(&base, base_info, idx->oid_type);
git_mwindow_close(&w);
if (has_entry(idx, &base))
@@ -1173,10 +1228,10 @@ int git_indexer_commit(git_indexer *idx, git_indexer_progress *stats)
struct git_pack_idx_header hdr;
git_str filename = GIT_STR_INIT;
struct entry *entry;
- unsigned char checksum[GIT_HASH_SHA1_SIZE];
+ unsigned char checksum[GIT_HASH_MAX_SIZE];
git_filebuf index_file = {0};
void *packfile_trailer;
- size_t checksum_size = GIT_HASH_SHA1_SIZE;
+ size_t checksum_size;
bool mismatch;
if (!idx->parsed_header) {
@@ -1184,6 +1239,9 @@ int git_indexer_commit(git_indexer *idx, git_indexer_progress *stats)
return -1;
}
+ checksum_size = git_hash_size(indexer_hash_algorithm(idx));
+ GIT_ASSERT(checksum_size);
+
/* Test for this before resolve_deltas(), as it plays with idx->off */
if (idx->off + (ssize_t)checksum_size < idx->pack->mwf.size) {
git_error_set(GIT_ERROR_INDEXER, "unexpected data at the end of the pack");
@@ -1274,7 +1332,7 @@ int git_indexer_commit(git_indexer *idx, git_indexer_progress *stats)
/* Write out the object names (SHA-1 hashes) */
git_vector_foreach(&idx->objects, i, entry) {
- git_filebuf_write(&index_file, &entry->oid.id, GIT_OID_SHA1_SIZE);
+ git_filebuf_write(&index_file, &entry->oid.id, git_oid_size(idx->oid_type));
}
/* Write out the CRC32 values */
diff --git a/src/libgit2/libgit2.c b/src/libgit2/libgit2.c
index 2537730cf..65f19e3ca 100644
--- a/src/libgit2/libgit2.c
+++ b/src/libgit2/libgit2.c
@@ -415,6 +415,25 @@ int git_libgit2_opts(int key, ...)
git_repository__validate_ownership = (va_arg(ap, int) != 0);
break;
+ case GIT_OPT_GET_HOMEDIR:
+ {
+ git_buf *out = va_arg(ap, git_buf *);
+ git_str str = GIT_STR_INIT;
+ const git_str *tmp;
+
+ if ((error = git_buf_tostr(&str, out)) < 0 ||
+ (error = git_sysdir_get(&tmp, GIT_SYSDIR_HOME)) < 0 ||
+ (error = git_str_put(&str, tmp->ptr, tmp->size)) < 0)
+ break;
+
+ error = git_buf_fromstr(out, &str);
+ }
+ break;
+
+ case GIT_OPT_SET_HOMEDIR:
+ error = git_sysdir_set(GIT_SYSDIR_HOME, va_arg(ap, const char *));
+ break;
+
case GIT_OPT_ENABLE_SHALLOW:
git_shallow__enabled = (va_arg(ap, int) != 0);
break;
diff --git a/src/libgit2/midx.c b/src/libgit2/midx.c
index 51b2d6cc7..b09055237 100644
--- a/src/libgit2/midx.c
+++ b/src/libgit2/midx.c
@@ -392,7 +392,7 @@ int git_midx_entry_find(
hi = ntohl(idx->oid_fanout[(int)short_oid->id[0]]);
lo = ((short_oid->id[0] == 0x0) ? 0 : ntohl(idx->oid_fanout[(int)short_oid->id[0] - 1]));
- pos = git_pack__lookup_sha1(idx->oid_lookup, GIT_OID_SHA1_SIZE, lo, hi, short_oid->id);
+ pos = git_pack__lookup_id(idx->oid_lookup, GIT_OID_SHA1_SIZE, lo, hi, short_oid->id, GIT_OID_SHA1);
if (pos >= 0) {
/* An object matching exactly the oid was found */
@@ -549,7 +549,8 @@ int git_midx_writer_add(
if (error < 0)
return error;
- error = git_mwindow_get_pack(&p, git_str_cstr(&idx_path_buf));
+ /* TODO: SHA256 */
+ error = git_mwindow_get_pack(&p, git_str_cstr(&idx_path_buf), 0);
git_str_dispose(&idx_path_buf);
if (error < 0)
return error;
diff --git a/src/libgit2/mwindow.c b/src/libgit2/mwindow.c
index ad649490a..b8295d9d1 100644
--- a/src/libgit2/mwindow.c
+++ b/src/libgit2/mwindow.c
@@ -61,7 +61,10 @@ int git_mwindow_global_init(void)
return git_runtime_shutdown_register(git_mwindow_global_shutdown);
}
-int git_mwindow_get_pack(struct git_pack_file **out, const char *path)
+int git_mwindow_get_pack(
+ struct git_pack_file **out,
+ const char *path,
+ git_oid_t oid_type)
{
struct git_pack_file *pack;
char *packname;
@@ -86,7 +89,7 @@ int git_mwindow_get_pack(struct git_pack_file **out, const char *path)
}
/* If we didn't find it, we need to create it */
- if ((error = git_packfile_alloc(&pack, path)) < 0) {
+ if ((error = git_packfile_alloc(&pack, path, oid_type)) < 0) {
git_mutex_unlock(&git__mwindow_mutex);
return error;
}
diff --git a/src/libgit2/mwindow.h b/src/libgit2/mwindow.h
index e32ab99d4..8e6df2613 100644
--- a/src/libgit2/mwindow.h
+++ b/src/libgit2/mwindow.h
@@ -48,7 +48,10 @@ void git_mwindow_close(git_mwindow **w_cursor);
extern int git_mwindow_global_init(void);
struct git_pack_file; /* just declaration to avoid cyclical includes */
-int git_mwindow_get_pack(struct git_pack_file **out, const char *path);
+int git_mwindow_get_pack(
+ struct git_pack_file **out,
+ const char *path,
+ git_oid_t oid_type);
int git_mwindow_put_pack(struct git_pack_file *pack);
#endif
diff --git a/src/libgit2/object.c b/src/libgit2/object.c
index 5ce4f1142..3d544cfff 100644
--- a/src/libgit2/object.c
+++ b/src/libgit2/object.c
@@ -27,8 +27,8 @@ typedef struct {
const char *str; /* type name string */
size_t size; /* size in bytes of the object structure */
- int (*parse)(void *self, git_odb_object *obj);
- int (*parse_raw)(void *self, const char *data, size_t size);
+ int (*parse)(void *self, git_odb_object *obj, git_oid_t oid_type);
+ int (*parse_raw)(void *self, const char *data, size_t size, git_oid_t oid_type);
void (*free)(void *self);
} git_object_def;
@@ -60,7 +60,8 @@ int git_object__from_raw(
git_object **object_out,
const char *data,
size_t size,
- git_object_t type)
+ git_object_t object_type,
+ git_oid_t oid_type)
{
git_object_def *def;
git_object *object;
@@ -71,12 +72,15 @@ int git_object__from_raw(
*object_out = NULL;
/* Validate type match */
- if (type != GIT_OBJECT_BLOB && type != GIT_OBJECT_TREE && type != GIT_OBJECT_COMMIT && type != GIT_OBJECT_TAG) {
+ if (object_type != GIT_OBJECT_BLOB &&
+ object_type != GIT_OBJECT_TREE &&
+ object_type != GIT_OBJECT_COMMIT &&
+ object_type != GIT_OBJECT_TAG) {
git_error_set(GIT_ERROR_INVALID, "the requested type is invalid");
return GIT_ENOTFOUND;
}
- if ((object_size = git_object__size(type)) == 0) {
+ if ((object_size = git_object__size(object_type)) == 0) {
git_error_set(GIT_ERROR_INVALID, "the requested type is invalid");
return GIT_ENOTFOUND;
}
@@ -85,15 +89,15 @@ int git_object__from_raw(
object = git__calloc(1, object_size);
GIT_ERROR_CHECK_ALLOC(object);
object->cached.flags = GIT_CACHE_STORE_PARSED;
- object->cached.type = type;
- if ((error = git_odb__hash(&object->cached.oid, data, size, type, GIT_OID_SHA1)) < 0)
+ object->cached.type = object_type;
+ if ((error = git_odb__hash(&object->cached.oid, data, size, object_type, oid_type)) < 0)
return error;
/* Parse raw object data */
- def = &git_objects_table[type];
+ def = &git_objects_table[object_type];
GIT_ASSERT(def->free && def->parse_raw);
- if ((error = def->parse_raw(object, data, size)) < 0) {
+ if ((error = def->parse_raw(object, data, size, oid_type)) < 0) {
def->free(object);
return error;
}
@@ -158,7 +162,7 @@ int git_object__from_odb_object(
def = &git_objects_table[odb_obj->cached.type];
GIT_ASSERT(def->free && def->parse);
- if ((error = def->parse(object, odb_obj)) < 0) {
+ if ((error = def->parse(object, odb_obj, repo->oid_type)) < 0) {
/*
* parse returns EINVALID on invalid data; downgrade
* that to a normal -1 error code.
@@ -372,12 +376,11 @@ static int dereference_object(git_object **dereferenced, git_object *obj)
static int peel_error(int error, const git_oid *oid, git_object_t type)
{
const char *type_name;
- char hex_oid[GIT_OID_SHA1_HEXSIZE + 1];
+ char hex_oid[GIT_OID_MAX_HEXSIZE + 1];
type_name = git_object_type2string(type);
- git_oid_fmt(hex_oid, oid);
- hex_oid[GIT_OID_SHA1_HEXSIZE] = '\0';
+ git_oid_nfmt(hex_oid, GIT_OID_MAX_HEXSIZE + 1, oid);
git_error_set(GIT_ERROR_OBJECT, "the git_object of id '%s' can not be "
"successfully peeled into a %s (git_object_t=%i).", hex_oid, type_name, type);
@@ -591,21 +594,29 @@ int git_object_rawcontent_is_valid(
int *valid,
const char *buf,
size_t len,
- git_object_t type)
+ git_object_t object_type
+#ifdef GIT_EXPERIMENTAL_SHA256
+ , git_oid_t oid_type
+#endif
+ )
{
git_object *obj = NULL;
int error;
+#ifndef GIT_EXPERIMENTAL_SHA256
+ git_oid_t oid_type = GIT_OID_SHA1;
+#endif
+
GIT_ASSERT_ARG(valid);
GIT_ASSERT_ARG(buf);
/* Blobs are always valid; don't bother parsing. */
- if (type == GIT_OBJECT_BLOB) {
+ if (object_type == GIT_OBJECT_BLOB) {
*valid = 1;
return 0;
}
- error = git_object__from_raw(&obj, buf, len, type);
+ error = git_object__from_raw(&obj, buf, len, object_type, oid_type);
git_object_free(obj);
if (error == 0) {
@@ -626,7 +637,7 @@ int git_object__parse_oid_header(
const char *header,
git_oid_t oid_type)
{
- const size_t sha_len = GIT_OID_SHA1_HEXSIZE;
+ const size_t sha_len = git_oid_hexsize(oid_type);
const size_t header_len = strlen(header);
const char *buffer = *buffer_out;
diff --git a/src/libgit2/object.h b/src/libgit2/object.h
index 9099f8607..b6c604c81 100644
--- a/src/libgit2/object.h
+++ b/src/libgit2/object.h
@@ -33,7 +33,8 @@ int git_object__from_raw(
git_object **object_out,
const char *data,
size_t size,
- git_object_t type);
+ git_object_t object_type,
+ git_oid_t oid_type);
int git_object__init_from_odb_object(
git_object **object_out,
diff --git a/src/libgit2/odb.c b/src/libgit2/odb.c
index aa2dd3cb2..0fc48035a 100644
--- a/src/libgit2/odb.c
+++ b/src/libgit2/odb.c
@@ -684,6 +684,7 @@ int git_odb__add_default_backends(
ino_t inode;
git_odb_backend *loose, *packed;
git_odb_backend_loose_options loose_opts = GIT_ODB_BACKEND_LOOSE_OPTIONS_INIT;
+ git_odb_backend_pack_options pack_opts = GIT_ODB_BACKEND_PACK_OPTIONS_INIT;
/* TODO: inodes are not really relevant on Win32, so we need to find
* a cross-platform workaround for this */
@@ -722,6 +723,7 @@ int git_odb__add_default_backends(
loose_opts.flags |= GIT_ODB_BACKEND_LOOSE_FSYNC;
loose_opts.oid_type = db->options.oid_type;
+ pack_opts.oid_type = db->options.oid_type;
/* add the loose object backend */
if (git_odb__backend_loose(&loose, objects_dir, &loose_opts) < 0 ||
@@ -729,8 +731,17 @@ int git_odb__add_default_backends(
return -1;
/* add the packed file backend */
- if (git_odb_backend_pack(&packed, objects_dir) < 0 ||
- add_backend_internal(db, packed, git_odb__packed_priority, as_alternates, inode) < 0)
+#ifdef GIT_EXPERIMENTAL_SHA256
+ if (git_odb_backend_pack(&packed, objects_dir, &pack_opts) < 0)
+ return -1;
+#else
+ GIT_UNUSED(pack_opts);
+
+ if (git_odb_backend_pack(&packed, objects_dir) < 0)
+ return -1;
+#endif
+
+ if (add_backend_internal(db, packed, git_odb__packed_priority, as_alternates, inode) < 0)
return -1;
if (git_mutex_lock(&db->lock) < 0) {
@@ -845,6 +856,25 @@ int git_odb__open(
return 0;
}
+#ifdef GIT_EXPERIMENTAL_SHA256
+
+int git_odb_open(
+ git_odb **out,
+ const char *objects_dir,
+ const git_odb_options *opts)
+{
+ return git_odb__open(out, objects_dir, opts);
+}
+
+#else
+
+int git_odb_open(git_odb **out, const char *objects_dir)
+{
+ return git_odb__open(out, objects_dir, NULL);
+}
+
+#endif
+
int git_odb__set_caps(git_odb *odb, int caps)
{
if (caps == GIT_ODB_CAP_FROM_OWNER) {
@@ -1693,7 +1723,9 @@ int git_odb_open_wstream(
(error = hash_header(ctx, size, type)) < 0)
goto done;
+#ifdef GIT_EXPERIMENTAL_SHA256
(*stream)->oid_type = db->options.oid_type;
+#endif
(*stream)->hash_ctx = ctx;
(*stream)->declared_size = size;
(*stream)->received_bytes = 0;
diff --git a/src/libgit2/odb_loose.c b/src/libgit2/odb_loose.c
index d1abbe233..51195d357 100644
--- a/src/libgit2/odb_loose.c
+++ b/src/libgit2/odb_loose.c
@@ -1204,3 +1204,37 @@ int git_odb__backend_loose(
*backend_out = (git_odb_backend *)backend;
return 0;
}
+
+
+#ifdef GIT_EXPERIMENTAL_SHA256
+int git_odb_backend_loose(
+ git_odb_backend **backend_out,
+ const char *objects_dir,
+ git_odb_backend_loose_options *opts)
+{
+ return git_odb__backend_loose(backend_out, objects_dir, opts);
+}
+#else
+int git_odb_backend_loose(
+ git_odb_backend **backend_out,
+ const char *objects_dir,
+ int compression_level,
+ int do_fsync,
+ unsigned int dir_mode,
+ unsigned int file_mode)
+{
+ git_odb_backend_loose_flag_t flags = 0;
+ git_odb_backend_loose_options opts = GIT_ODB_BACKEND_LOOSE_OPTIONS_INIT;
+
+ if (do_fsync)
+ flags |= GIT_ODB_BACKEND_LOOSE_FSYNC;
+
+ opts.flags = flags;
+ opts.compression_level = compression_level;
+ opts.dir_mode = dir_mode;
+ opts.file_mode = file_mode;
+ opts.oid_type = GIT_OID_DEFAULT;
+
+ return git_odb__backend_loose(backend_out, objects_dir, &opts);
+}
+#endif
diff --git a/src/libgit2/odb_pack.c b/src/libgit2/odb_pack.c
index 49a655b44..1b1d122b0 100644
--- a/src/libgit2/odb_pack.c
+++ b/src/libgit2/odb_pack.c
@@ -26,6 +26,7 @@
struct pack_backend {
git_odb_backend parent;
+ git_odb_backend_pack_options opts;
git_midx_file *midx;
git_vector midx_packs;
git_vector packs;
@@ -95,24 +96,24 @@ struct pack_writepack {
* --------------------------------------------------
*
* # pack_backend__exists / pack_backend__exists_prefix
- * | Check if the given SHA1 oid (or a SHA1 oid prefix) exists in any of the
+ * | Check if the given oid (or an oid prefix) exists in any of the
* | packs that have been loaded for our ODB.
* |
* |-# pack_entry_find / pack_entry_find_prefix
- * | If there is a multi-pack-index present, search the SHA1 oid in that
+ * | If there is a multi-pack-index present, search the oid in that
* | index first. If it is not found there, iterate through all the unindexed
* | packs that have been preloaded (starting by the pack where the latest
* | object was found) to try to find the OID in one of them.
* |
* |-# git_midx_entry_find
- * | Search for the SHA1 oid in the multi-pack-index. See
+ * | Search for the oid in the multi-pack-index. See
* | <https://github.com/git/git/blob/master/Documentation/technical/pack-format.txt>
* | for specifics on the multi-pack-index format and how do we find
* | entries in it.
* |
* |-# git_pack_entry_find
- * | Check the index of an individual unindexed pack to see if the SHA1
- * | OID can be found. If we can find the offset to that SHA1 inside of the
+ * | Check the index of an individual unindexed pack to see if the
+ * | OID can be found. If we can find the offset to that inside of the
* | index, that means the object is contained inside of the packfile and
* | we can stop searching. Before returning, we verify that the
* | packfile behind the index we are searching still exists on disk.
@@ -141,13 +142,13 @@ struct pack_writepack {
* --------------------------------------------------
*
* # pack_backend__read / pack_backend__read_prefix
- * | Check if the given SHA1 oid (or a SHA1 oid prefix) exists in any of the
+ * | Check if the given oid (or an oid prefix) exists in any of the
* | packs that have been loaded for our ODB. If it does, open the packfile and
* | read from it.
* |
* |-# git_packfile_unpack
* Armed with a packfile and the offset within it, we can finally unpack
- * the object pointed at by the SHA1 oid. This involves mmapping part of
+ * the object pointed at by the oid. This involves mmapping part of
* the `.pack` file, and uncompressing the object within it (if it is
* stored in the undelfitied representation), or finding a base object and
* applying some deltas to its uncompressed representation (if it is stored
@@ -177,7 +178,7 @@ static int pack_entry_find(struct git_pack_entry *e,
* a prefix of an identifier.
* Sets GIT_EAMBIGUOUS if short oid is ambiguous.
* This method assumes that len is between
- * GIT_OID_MINPREFIXLEN and GIT_OID_SHA1_HEXSIZE.
+ * GIT_OID_MINPREFIXLEN and the hexsize for the hash type.
*/
static int pack_entry_find_prefix(
struct git_pack_entry *e,
@@ -251,7 +252,7 @@ static int packfile_load__cb(void *data, git_str *path)
if (git_vector_search2(NULL, &backend->packs, packfile_byname_search_cmp, &index_prefix) == 0)
return 0;
- error = git_mwindow_get_pack(&pack, path->ptr);
+ error = git_mwindow_get_pack(&pack, path->ptr, backend->opts.oid_type);
/* ignore missing .pack file as git does */
if (error == GIT_ENOTFOUND) {
@@ -270,33 +271,34 @@ static int pack_entry_find(struct git_pack_entry *e, struct pack_backend *backen
{
struct git_pack_file *last_found = backend->last_found, *p;
git_midx_entry midx_entry;
+ size_t oid_hexsize = git_oid_hexsize(backend->opts.oid_type);
size_t i;
if (backend->midx &&
- git_midx_entry_find(&midx_entry, backend->midx, oid, GIT_OID_SHA1_HEXSIZE) == 0 &&
+ git_midx_entry_find(&midx_entry, backend->midx, oid, oid_hexsize) == 0 &&
midx_entry.pack_index < git_vector_length(&backend->midx_packs)) {
e->offset = midx_entry.offset;
- git_oid_cpy(&e->sha1, &midx_entry.sha1);
+ git_oid_cpy(&e->id, &midx_entry.sha1);
e->p = git_vector_get(&backend->midx_packs, midx_entry.pack_index);
return 0;
}
if (last_found &&
- git_pack_entry_find(e, last_found, oid, GIT_OID_SHA1_HEXSIZE) == 0)
+ git_pack_entry_find(e, last_found, oid, oid_hexsize) == 0)
return 0;
git_vector_foreach(&backend->packs, i, p) {
if (p == last_found)
continue;
- if (git_pack_entry_find(e, p, oid, GIT_OID_SHA1_HEXSIZE) == 0) {
+ if (git_pack_entry_find(e, p, oid, oid_hexsize) == 0) {
backend->last_found = p;
return 0;
}
}
return git_odb__error_notfound(
- "failed to find pack entry", oid, GIT_OID_SHA1_HEXSIZE);
+ "failed to find pack entry", oid, oid_hexsize);
}
static int pack_entry_find_prefix(
@@ -318,9 +320,9 @@ static int pack_entry_find_prefix(
return error;
if (!error && midx_entry.pack_index < git_vector_length(&backend->midx_packs)) {
e->offset = midx_entry.offset;
- git_oid_cpy(&e->sha1, &midx_entry.sha1);
+ git_oid_cpy(&e->id, &midx_entry.sha1);
e->p = git_vector_get(&backend->midx_packs, midx_entry.pack_index);
- git_oid_cpy(&found_full_oid, &e->sha1);
+ git_oid_cpy(&found_full_oid, &e->id);
found = true;
}
}
@@ -330,9 +332,9 @@ static int pack_entry_find_prefix(
if (error == GIT_EAMBIGUOUS)
return error;
if (!error) {
- if (found && git_oid_cmp(&e->sha1, &found_full_oid))
+ if (found && git_oid_cmp(&e->id, &found_full_oid))
return git_odb__error_ambiguous("found multiple pack entries");
- git_oid_cpy(&found_full_oid, &e->sha1);
+ git_oid_cpy(&found_full_oid, &e->id);
found = true;
}
}
@@ -345,9 +347,9 @@ static int pack_entry_find_prefix(
if (error == GIT_EAMBIGUOUS)
return error;
if (!error) {
- if (found && git_oid_cmp(&e->sha1, &found_full_oid))
+ if (found && git_oid_cmp(&e->id, &found_full_oid))
return git_odb__error_ambiguous("found multiple pack entries");
- git_oid_cpy(&found_full_oid, &e->sha1);
+ git_oid_cpy(&found_full_oid, &e->id);
found = true;
backend->last_found = p;
}
@@ -425,7 +427,10 @@ static int process_multi_pack_index_pack(
}
/* Pack was not found. Allocate a new one. */
- error = git_mwindow_get_pack(&pack, git_str_cstr(&pack_path));
+ error = git_mwindow_get_pack(
+ &pack,
+ git_str_cstr(&pack_path),
+ backend->opts.oid_type);
git_str_dispose(&pack_path);
if (error < 0)
return error;
@@ -596,32 +601,33 @@ static int pack_backend__read_prefix(
void **buffer_p,
size_t *len_p,
git_object_t *type_p,
- git_odb_backend *backend,
+ git_odb_backend *_backend,
const git_oid *short_oid,
size_t len)
{
+ struct pack_backend *backend = (struct pack_backend *)_backend;
int error = 0;
if (len < GIT_OID_MINPREFIXLEN)
error = git_odb__error_ambiguous("prefix length too short");
- else if (len >= GIT_OID_SHA1_HEXSIZE) {
+ else if (len >= git_oid_hexsize(backend->opts.oid_type)) {
/* We can fall back to regular read method */
- error = pack_backend__read(buffer_p, len_p, type_p, backend, short_oid);
+ error = pack_backend__read(buffer_p, len_p, type_p, _backend, short_oid);
if (!error)
git_oid_cpy(out_oid, short_oid);
} else {
struct git_pack_entry e;
git_rawobj raw = {NULL};
- if ((error = pack_entry_find_prefix(
- &e, (struct pack_backend *)backend, short_oid, len)) == 0 &&
- (error = git_packfile_unpack(&raw, e.p, &e.offset)) == 0)
+ if ((error = pack_entry_find_prefix(&e,
+ backend, short_oid, len)) == 0 &&
+ (error = git_packfile_unpack(&raw, e.p, &e.offset)) == 0)
{
*buffer_p = raw.data;
*len_p = raw.len;
*type_p = raw.type;
- git_oid_cpy(out_oid, &e.sha1);
+ git_oid_cpy(out_oid, &e.id);
}
}
@@ -642,7 +648,7 @@ static int pack_backend__exists_prefix(
struct git_pack_entry e = {0};
error = pack_entry_find_prefix(&e, pb, short_id, len);
- git_oid_cpy(out, &e.sha1);
+ git_oid_cpy(out, &e.id);
return error;
}
@@ -712,6 +718,7 @@ static int pack_backend__writepack(struct git_odb_writepack **out,
git_indexer_options opts = GIT_INDEXER_OPTIONS_INIT;
struct pack_backend *backend;
struct pack_writepack *writepack;
+ int error;
GIT_ASSERT_ARG(out);
GIT_ASSERT_ARG(_backend);
@@ -726,11 +733,20 @@ static int pack_backend__writepack(struct git_odb_writepack **out,
writepack = git__calloc(1, sizeof(struct pack_writepack));
GIT_ERROR_CHECK_ALLOC(writepack);
- if (git_indexer_new(&writepack->indexer,
- backend->pack_folder, 0, odb, &opts) < 0) {
- git__free(writepack);
+#ifdef GIT_EXPERIMENTAL_SHA256
+ opts.odb = odb;
+
+ error = git_indexer_new(&writepack->indexer,
+ backend->pack_folder,
+ backend->opts.oid_type,
+ &opts);
+#else
+ error = git_indexer_new(&writepack->indexer,
+ backend->pack_folder, 0, odb, &opts);
+#endif
+
+ if (error < 0)
return -1;
- }
writepack->parent.backend = _backend;
writepack->parent.append = pack_backend__writepack_append;
@@ -840,7 +856,10 @@ static void pack_backend__free(git_odb_backend *_backend)
git__free(backend);
}
-static int pack_backend__alloc(struct pack_backend **out, size_t initial_size)
+static int pack_backend__alloc(
+ struct pack_backend **out,
+ size_t initial_size,
+ const git_odb_backend_pack_options *opts)
{
struct pack_backend *backend = git__calloc(1, sizeof(struct pack_backend));
GIT_ERROR_CHECK_ALLOC(backend);
@@ -849,12 +868,19 @@ static int pack_backend__alloc(struct pack_backend **out, size_t initial_size)
git__free(backend);
return -1;
}
+
if (git_vector_init(&backend->packs, initial_size, packfile_sort__cb) < 0) {
git_vector_free(&backend->midx_packs);
git__free(backend);
return -1;
}
+ if (opts)
+ memcpy(&backend->opts, opts, sizeof(git_odb_backend_pack_options));
+
+ if (!backend->opts.oid_type)
+ backend->opts.oid_type = GIT_OID_DEFAULT;
+
backend->parent.version = GIT_ODB_BACKEND_VERSION;
backend->parent.read = &pack_backend__read;
@@ -873,17 +899,31 @@ static int pack_backend__alloc(struct pack_backend **out, size_t initial_size)
return 0;
}
-int git_odb_backend_one_pack(git_odb_backend **backend_out, const char *idx)
+#ifdef GIT_EXPERIMENTAL_SHA256
+int git_odb_backend_one_pack(
+ git_odb_backend **backend_out,
+ const char *idx,
+ const git_odb_backend_pack_options *opts)
+#else
+int git_odb_backend_one_pack(
+ git_odb_backend **backend_out,
+ const char *idx)
+#endif
{
struct pack_backend *backend = NULL;
struct git_pack_file *packfile = NULL;
- if (pack_backend__alloc(&backend, 1) < 0)
+#ifndef GIT_EXPERIMENTAL_SHA256
+ git_odb_backend_pack_options *opts = NULL;
+#endif
+
+ git_oid_t oid_type = opts ? opts->oid_type : 0;
+
+ if (pack_backend__alloc(&backend, 1, opts) < 0)
return -1;
- if (git_mwindow_get_pack(&packfile, idx) < 0 ||
- git_vector_insert(&backend->packs, packfile) < 0)
- {
+ if (git_mwindow_get_pack(&packfile, idx, oid_type) < 0 ||
+ git_vector_insert(&backend->packs, packfile) < 0) {
pack_backend__free((git_odb_backend *)backend);
return -1;
}
@@ -892,18 +932,30 @@ int git_odb_backend_one_pack(git_odb_backend **backend_out, const char *idx)
return 0;
}
-int git_odb_backend_pack(git_odb_backend **backend_out, const char *objects_dir)
+#ifdef GIT_EXPERIMENTAL_SHA256
+int git_odb_backend_pack(
+ git_odb_backend **backend_out,
+ const char *objects_dir,
+ const git_odb_backend_pack_options *opts)
+#else
+int git_odb_backend_pack(
+ git_odb_backend **backend_out,
+ const char *objects_dir)
+#endif
{
int error = 0;
struct pack_backend *backend = NULL;
git_str path = GIT_STR_INIT;
- if (pack_backend__alloc(&backend, 8) < 0)
+#ifndef GIT_EXPERIMENTAL_SHA256
+ git_odb_backend_pack_options *opts = NULL;
+#endif
+
+ if (pack_backend__alloc(&backend, 8, opts) < 0)
return -1;
if (!(error = git_str_joinpath(&path, objects_dir, "pack")) &&
- git_fs_path_isdir(git_str_cstr(&path)))
- {
+ git_fs_path_isdir(git_str_cstr(&path))) {
backend->pack_folder = git_str_detach(&path);
error = pack_backend__refresh((git_odb_backend *)backend);
}
diff --git a/src/libgit2/oid.h b/src/libgit2/oid.h
index d775e180b..7b6b09d8b 100644
--- a/src/libgit2/oid.h
+++ b/src/libgit2/oid.h
@@ -66,6 +66,47 @@ GIT_INLINE(size_t) git_oid_hexsize(git_oid_t type)
return 0;
}
+GIT_INLINE(const char *) git_oid_type_name(git_oid_t type)
+{
+ switch (type) {
+ case GIT_OID_SHA1:
+ return "sha1";
+
+#ifdef GIT_EXPERIMENTAL_SHA256
+ case GIT_OID_SHA256:
+ return "sha256";
+#endif
+ }
+
+ return "unknown";
+}
+
+GIT_INLINE(git_oid_t) git_oid_type_fromstr(const char *name)
+{
+ if (strcmp(name, "sha1") == 0)
+ return GIT_OID_SHA1;
+
+#ifdef GIT_EXPERIMENTAL_SHA256
+ if (strcmp(name, "sha256") == 0)
+ return GIT_OID_SHA256;
+#endif
+
+ return 0;
+}
+
+GIT_INLINE(git_oid_t) git_oid_type_fromstrn(const char *name, size_t len)
+{
+ if (len == CONST_STRLEN("sha1") && strncmp(name, "sha1", len) == 0)
+ return GIT_OID_SHA1;
+
+#ifdef GIT_EXPERIMENTAL_SHA256
+ if (len == CONST_STRLEN("sha256") && strncmp(name, "sha256", len) == 0)
+ return GIT_OID_SHA256;
+#endif
+
+ return 0;
+}
+
GIT_INLINE(git_hash_algorithm_t) git_oid_algorithm(git_oid_t type)
{
switch (type) {
diff --git a/src/libgit2/pack-objects.c b/src/libgit2/pack-objects.c
index 068231649..20a5dfcbd 100644
--- a/src/libgit2/pack-objects.c
+++ b/src/libgit2/pack-objects.c
@@ -1407,7 +1407,18 @@ int git_packbuilder_write(
opts.progress_cb = progress_cb;
opts.progress_cb_payload = progress_cb_payload;
- if ((error = git_indexer_new(&indexer, path, mode, pb->odb, &opts)) < 0)
+ /* TODO: SHA256 */
+
+#ifdef GIT_EXPERIMENTAL_SHA256
+ opts.mode = mode;
+ opts.odb = pb->odb;
+
+ error = git_indexer_new(&indexer, path, GIT_OID_SHA1, &opts);
+#else
+ error = git_indexer_new(&indexer, path, mode, pb->odb, &opts);
+#endif
+
+ if (error < 0)
goto cleanup;
if (!git_repository__configmap_lookup(&t, pb->repo, GIT_CONFIGMAP_FSYNCOBJECTFILES) && t)
diff --git a/src/libgit2/pack.c b/src/libgit2/pack.c
index d428729ea..c30801844 100644
--- a/src/libgit2/pack.c
+++ b/src/libgit2/pack.c
@@ -32,7 +32,7 @@ static int packfile_unpack_compressed(
* Throws GIT_EAMBIGUOUSOIDPREFIX if short oid
* is ambiguous within the pack.
* This method assumes that len is between
- * GIT_OID_MINPREFIXLEN and GIT_OID_SHA1_HEXSIZE.
+ * GIT_OID_MINPREFIXLEN and the oid type's hexsize.
*/
static int pack_entry_find_offset(
off64_t *offset_out,
@@ -186,9 +186,9 @@ static int cache_add(
static void pack_index_free(struct git_pack_file *p)
{
- if (p->oids) {
- git__free(p->oids);
- p->oids = NULL;
+ if (p->ids) {
+ git__free(p->ids);
+ p->ids = NULL;
}
if (p->index_map.data) {
git_futils_mmap_free(&p->index_map);
@@ -205,6 +205,7 @@ static int pack_index_check_locked(const char *path, struct git_pack_file *p)
size_t idx_size;
struct stat st;
int error;
+
/* TODO: properly open the file without access time using O_NOATIME */
git_file fd = git_futils_open_ro(path);
if (fd < 0)
@@ -218,8 +219,7 @@ static int pack_index_check_locked(const char *path, struct git_pack_file *p)
if (!S_ISREG(st.st_mode) ||
!git__is_sizet(st.st_size) ||
- (idx_size = (size_t)st.st_size) < 4 * 256 + 20 + 20)
- {
+ (idx_size = (size_t)st.st_size) < (size_t)((4 * 256) + (p->oid_size * 2))) {
p_close(fd);
git_error_set(GIT_ERROR_ODB, "invalid pack index '%s'", path);
return -1;
@@ -242,8 +242,9 @@ static int pack_index_check_locked(const char *path, struct git_pack_file *p)
return packfile_error("unsupported index version");
}
- } else
+ } else {
version = 1;
+ }
nr = 0;
index = idx_map;
@@ -264,11 +265,11 @@ static int pack_index_check_locked(const char *path, struct git_pack_file *p)
/*
* Total size:
* - 256 index entries 4 bytes each
- * - 24-byte entries * nr (20-byte sha1 + 4-byte offset)
- * - 20-byte SHA1 of the packfile
- * - 20-byte SHA1 file checksum
+ * - 24/36-byte entries * nr (20/32 byte SHA + 4-byte offset)
+ * - 20/32-byte SHA of the packfile
+ * - 20/32-byte SHA file checksum
*/
- if (idx_size != 4*256 + nr * 24 + 20 + 20) {
+ if (idx_size != (4 * 256 + (nr * (p->oid_size + 4)) + (p->oid_size * 2))) {
git_futils_mmap_free(&p->index_map);
return packfile_error("index is corrupted");
}
@@ -277,16 +278,16 @@ static int pack_index_check_locked(const char *path, struct git_pack_file *p)
* Minimum size:
* - 8 bytes of header
* - 256 index entries 4 bytes each
- * - 20-byte sha1 entry * nr
+ * - 20/32-byte SHA entry * nr
* - 4-byte crc entry * nr
* - 4-byte offset entry * nr
- * - 20-byte SHA1 of the packfile
- * - 20-byte SHA1 file checksum
+ * - 20/32-byte SHA of the packfile
+ * - 20/32-byte SHA file checksum
* And after the 4-byte offset table might be a
* variable sized table containing 8-byte entries
* for offsets larger than 2^31.
*/
- unsigned long min_size = 8 + 4*256 + nr*(20 + 4 + 4) + 20 + 20;
+ unsigned long min_size = 8 + (4 * 256) + (nr * (p->oid_size + 4 + 4)) + (p->oid_size * 2);
unsigned long max_size = min_size;
if (nr)
@@ -365,12 +366,12 @@ static unsigned char *pack_window_open(
* Don't allow a negative offset, as that means we've wrapped
* around.
*/
- if (offset > (p->mwf.size - 20))
+ if (offset > (p->mwf.size - p->oid_size))
goto cleanup;
if (offset < 0)
goto cleanup;
- pack_data = git_mwindow_open(&p->mwf, w_cursor, offset, 20, left);
+ pack_data = git_mwindow_open(&p->mwf, w_cursor, offset, p->oid_size, left);
cleanup:
git_mutex_unlock(&p->mwf.lock);
@@ -473,13 +474,13 @@ int git_packfile_unpack_header(
return error;
}
- /* pack_window_open() assures us we have [base, base + 20) available
- * as a range that we can look at at. (Its actually the hash
- * size that is assured.) With our object header encoding
- * the maximum deflated object size is 2^137, which is just
- * insane, so we know won't exceed what we have been given.
+ /* pack_window_open() assures us we have [base, base + oid_size)
+ * available as a range that we can look at at. (It's actually
+ * the hash size that is assured.) With our object header
+ * encoding the maximum deflated object size is 2^137, which is
+ * just insane, so we know won't exceed what we have been given.
*/
- base = git_mwindow_open(&p->mwf, w_curs, *curpos, 20, &left);
+ base = git_mwindow_open(&p->mwf, w_curs, *curpos, p->oid_size, &left);
git_mutex_unlock(&p->lock);
git_mutex_unlock(&p->mwf.lock);
if (base == NULL)
@@ -977,11 +978,12 @@ int get_delta_base(
/* Assumption: the only reason this would fail is because the file is too small */
if (base_info == NULL)
return GIT_EBUFS;
- /* pack_window_open() assured us we have [base_info, base_info + 20)
- * as a range that we can look at without walking off the
- * end of the mapped window. Its actually the hash size
- * that is assured. An OFS_DELTA longer than the hash size
- * is stupid, as then a REF_DELTA would be smaller to store.
+ /* pack_window_open() assured us we have
+ * [base_info, base_info + oid_size) as a range that we can look
+ * at without walking off the end of the mapped window. Its
+ * actually the hash size that is assured. An OFS_DELTA longer
+ * than the hash size is stupid, as then a REF_DELTA would be
+ * smaller to store.
*/
if (type == GIT_OBJECT_OFS_DELTA) {
unsigned used = 0;
@@ -1002,7 +1004,7 @@ int get_delta_base(
*curpos += used;
} else if (type == GIT_OBJECT_REF_DELTA) {
git_oid base_oid;
- git_oid__fromraw(&base_oid, base_info, GIT_OID_SHA1);
+ git_oid__fromraw(&base_oid, base_info, p->oid_type);
/* If we have the cooperative cache, search in it first */
if (p->has_cache) {
@@ -1012,7 +1014,7 @@ int get_delta_base(
if (entry->offset == 0)
return packfile_error("delta offset is zero");
- *curpos += 20;
+ *curpos += p->oid_size;
*delta_base_out = entry->offset;
return 0;
} else {
@@ -1025,9 +1027,9 @@ int get_delta_base(
}
/* The base entry _must_ be in the same pack */
- if (pack_entry_find_offset(&base_offset, &unused, p, &base_oid, GIT_OID_SHA1_HEXSIZE) < 0)
+ if (pack_entry_find_offset(&base_offset, &unused, p, &base_oid, p->oid_hexsize) < 0)
return packfile_error("base entry delta is not in the same pack");
- *curpos += 20;
+ *curpos += p->oid_size;
} else
return packfile_error("unknown object type");
@@ -1070,7 +1072,7 @@ void git_packfile_free(struct git_pack_file *p, bool unlink_packfile)
pack_index_free(p);
- git__free(p->bad_object_sha1);
+ git__free(p->bad_object_ids);
git_mutex_free(&p->bases.lock);
git_mutex_free(&p->mwf.lock);
@@ -1083,8 +1085,8 @@ static int packfile_open_locked(struct git_pack_file *p)
{
struct stat st;
struct git_pack_header hdr;
- unsigned char sha1[GIT_OID_SHA1_SIZE];
- unsigned char *idx_sha1;
+ unsigned char checksum[GIT_OID_MAX_SIZE];
+ unsigned char *idx_checksum;
if (pack_index_open_locked(p) < 0)
return git_odb__error_notfound("failed to open packfile", NULL, 0);
@@ -1131,12 +1133,13 @@ static int packfile_open_locked(struct git_pack_file *p)
/* Verify the pack matches its index. */
if (p->num_objects != ntohl(hdr.hdr_entries) ||
- p_pread(p->mwf.fd, sha1, GIT_OID_SHA1_SIZE, p->mwf.size - GIT_OID_SHA1_SIZE) < 0)
+ p_pread(p->mwf.fd, checksum, p->oid_size, p->mwf.size - p->oid_size) < 0)
goto cleanup;
- idx_sha1 = ((unsigned char *)p->index_map.data) + p->index_map.len - 40;
+ idx_checksum = ((unsigned char *)p->index_map.data) +
+ p->index_map.len - (p->oid_size * 2);
- if (git_oid_raw_cmp(sha1, idx_sha1, GIT_OID_SHA1_SIZE) != 0)
+ if (git_oid_raw_cmp(checksum, idx_checksum, p->oid_size) != 0)
goto cleanup;
if (git_mwindow_file_register(&p->mwf) < 0)
@@ -1171,7 +1174,10 @@ int git_packfile__name(char **out, const char *path)
return 0;
}
-int git_packfile_alloc(struct git_pack_file **pack_out, const char *path)
+int git_packfile_alloc(
+ struct git_pack_file **pack_out,
+ const char *path,
+ git_oid_t oid_type)
{
struct stat st;
struct git_pack_file *p;
@@ -1219,6 +1225,9 @@ int git_packfile_alloc(struct git_pack_file **pack_out, const char *path)
p->pack_local = 1;
p->mtime = (git_time_t)st.st_mtime;
p->index_version = -1;
+ p->oid_type = oid_type ? oid_type : GIT_OID_DEFAULT;
+ p->oid_size = (unsigned int)git_oid_size(p->oid_type);
+ p->oid_hexsize = (unsigned int)git_oid_hexsize(p->oid_type);
if (git_mutex_init(&p->lock) < 0) {
git_error_set(GIT_ERROR_OS, "failed to initialize packfile mutex");
@@ -1260,9 +1269,9 @@ static off64_t nth_packed_object_offset_locked(struct git_pack_file *p, uint32_t
end = index + p->index_map.len;
index += 4 * 256;
if (p->index_version == 1)
- return ntohl(*((uint32_t *)(index + 24 * n)));
+ return ntohl(*((uint32_t *)(index + (p->oid_size + 4) * n)));
- index += 8 + p->num_objects * (20 + 4);
+ index += 8 + p->num_objects * (p->oid_size + 4);
off32 = ntohl(*((uint32_t *)(index + 4 * n)));
if (!(off32 & 0x80000000))
return off32;
@@ -1273,7 +1282,7 @@ static off64_t nth_packed_object_offset_locked(struct git_pack_file *p, uint32_t
return -1;
return (((uint64_t)ntohl(*((uint32_t *)(index + 0)))) << 32) |
- ntohl(*((uint32_t *)(index + 4)));
+ ntohl(*((uint32_t *)(index + 4)));
}
static int git__memcmp4(const void *a, const void *b) {
@@ -1312,7 +1321,7 @@ int git_pack_foreach_entry(
index += 4 * 256;
- if (p->oids == NULL) {
+ if (p->ids == NULL) {
git_vector offsets, oids;
if ((error = git_vector_init(&oids, p->num_objects, NULL))) {
@@ -1326,22 +1335,25 @@ int git_pack_foreach_entry(
}
if (p->index_version > 1) {
- const unsigned char *off = index + 24 * p->num_objects;
+ const unsigned char *off = index +
+ (p->oid_size + 4) * p->num_objects;
+
for (i = 0; i < p->num_objects; i++)
git_vector_insert(&offsets, (void*)&off[4 * i]);
+
git_vector_sort(&offsets);
git_vector_foreach(&offsets, i, current)
git_vector_insert(&oids, (void*)&index[5 * (current - off)]);
} else {
for (i = 0; i < p->num_objects; i++)
- git_vector_insert(&offsets, (void*)&index[24 * i]);
+ git_vector_insert(&offsets, (void*)&index[(p->oid_size + 4) * i]);
git_vector_sort(&offsets);
git_vector_foreach(&offsets, i, current)
git_vector_insert(&oids, (void*)&current[4]);
}
git_vector_free(&offsets);
- p->oids = (unsigned char **)git_vector_detach(NULL, NULL, &oids);
+ p->ids = (unsigned char **)git_vector_detach(NULL, NULL, &oids);
}
/*
@@ -1362,7 +1374,7 @@ int git_pack_foreach_entry(
git_array_clear(oids);
GIT_ERROR_CHECK_ALLOC(oid);
}
- git_oid__fromraw(oid, p->oids[i], GIT_OID_SHA1);
+ git_oid__fromraw(oid, p->ids[i], p->oid_type);
}
git_mutex_unlock(&p->lock);
@@ -1412,10 +1424,13 @@ int git_pack_foreach_entry_offset(
/* all offsets should have been validated by pack_index_check_locked */
if (p->index_version > 1) {
- const unsigned char *offsets = index + 24 * p->num_objects;
+ const unsigned char *offsets = index +
+ (p->oid_size + 4) * p->num_objects;
const unsigned char *large_offset_ptr;
- const unsigned char *large_offsets = index + 28 * p->num_objects;
- const unsigned char *large_offsets_end = ((const unsigned char *)p->index_map.data) + p->index_map.len - 20;
+ const unsigned char *large_offsets = index +
+ (p->oid_size + 8) * p->num_objects;
+ const unsigned char *large_offsets_end = ((const unsigned char *)p->index_map.data) + p->index_map.len - p->oid_size;
+
for (i = 0; i < p->num_objects; i++) {
current_offset = ntohl(*(const uint32_t *)(offsets + 4 * i));
if (current_offset & 0x80000000) {
@@ -1428,7 +1443,7 @@ int git_pack_foreach_entry_offset(
ntohl(*((uint32_t *)(large_offset_ptr + 4)));
}
- git_oid__fromraw(&current_oid, (index + 20 * i), GIT_OID_SHA1);
+ git_oid__fromraw(&current_oid, (index + p->oid_size * i), p->oid_type);
if ((error = cb(&current_oid, current_offset, data)) != 0) {
error = git_error_set_after_callback(error);
goto cleanup;
@@ -1436,8 +1451,8 @@ int git_pack_foreach_entry_offset(
}
} else {
for (i = 0; i < p->num_objects; i++) {
- current_offset = ntohl(*(const uint32_t *)(index + 24 * i));
- git_oid__fromraw(&current_oid, (index + 24 * i + 4), GIT_OID_SHA1);
+ current_offset = ntohl(*(const uint32_t *)(index + (p->oid_size + 4) * i));
+ git_oid__fromraw(&current_oid, (index + (p->oid_size + 4) * i + 4), p->oid_type);
if ((error = cb(&current_oid, current_offset, data)) != 0) {
error = git_error_set_after_callback(error);
goto cleanup;
@@ -1450,14 +1465,20 @@ cleanup:
return error;
}
-int git_pack__lookup_sha1(const void *oid_lookup_table, size_t stride, unsigned lo,
- unsigned hi, const unsigned char *oid_prefix)
+int git_pack__lookup_id(
+ const void *oid_lookup_table,
+ size_t stride,
+ unsigned lo,
+ unsigned hi,
+ const unsigned char *oid_prefix,
+ const git_oid_t oid_type)
{
const unsigned char *base = oid_lookup_table;
+ size_t oid_size = git_oid_size(oid_type);
while (lo < hi) {
unsigned mi = (lo + hi) / 2;
- int cmp = git_oid_raw_cmp(base + mi * stride, oid_prefix, GIT_OID_SHA1_SIZE);
+ int cmp = git_oid_raw_cmp(base + mi * stride, oid_prefix, oid_size);
if (!cmp)
return mi;
@@ -1512,9 +1533,9 @@ static int pack_entry_find_offset(
lo = ((short_oid->id[0] == 0x0) ? 0 : ntohl(level1_ofs[(int)short_oid->id[0] - 1]));
if (p->index_version > 1) {
- stride = 20;
+ stride = p->oid_size;
} else {
- stride = 24;
+ stride = p->oid_size + 4;
index += 4;
}
@@ -1523,7 +1544,8 @@ static int pack_entry_find_offset(
short_oid->id[0], short_oid->id[1], short_oid->id[2], lo, hi, p->num_objects);
#endif
- pos = git_pack__lookup_sha1(index, stride, lo, hi, short_oid->id);
+ pos = git_pack__lookup_id(index, stride, lo, hi,
+ short_oid->id, p->oid_type);
if (pos >= 0) {
/* An object matching exactly the oid was found */
@@ -1541,7 +1563,9 @@ static int pack_entry_find_offset(
}
}
- if (found && len != GIT_OID_SHA1_HEXSIZE && pos + 1 < (int)p->num_objects) {
+ if (found &&
+ len != p->oid_hexsize &&
+ pos + 1 < (int)p->num_objects) {
/* Check for ambiguousity */
const unsigned char *next = current + stride;
@@ -1566,13 +1590,13 @@ static int pack_entry_find_offset(
}
*offset_out = offset;
- git_oid__fromraw(found_oid, current, GIT_OID_SHA1);
+ git_oid__fromraw(found_oid, current, p->oid_type);
#ifdef INDEX_DEBUG_LOOKUP
{
- unsigned char hex_sha1[GIT_OID_SHA1_HEXSIZE + 1];
+ char hex_sha1[p->oid_hexsize + 1];
git_oid_fmt(hex_sha1, found_oid);
- hex_sha1[GIT_OID_SHA1_HEXSIZE] = '\0';
+ hex_sha1[p->oid_hexsize] = '\0';
printf("found lo=%d %s\n", lo, hex_sha1);
}
#endif
@@ -1594,10 +1618,10 @@ int git_pack_entry_find(
GIT_ASSERT_ARG(p);
- if (len == GIT_OID_SHA1_HEXSIZE && p->num_bad_objects) {
+ if (len == p->oid_hexsize && p->num_bad_objects) {
unsigned i;
for (i = 0; i < p->num_bad_objects; i++)
- if (git_oid__cmp(short_oid, &p->bad_object_sha1[i]) == 0)
+ if (git_oid__cmp(short_oid, &p->bad_object_ids[i]) == 0)
return packfile_error("bad object found in packfile");
}
@@ -1630,6 +1654,6 @@ int git_pack_entry_find(
e->offset = offset;
e->p = p;
- git_oid_cpy(&e->sha1, &found_oid);
+ git_oid_cpy(&e->id, &found_oid);
return 0;
}
diff --git a/src/libgit2/pack.h b/src/libgit2/pack.h
index d90588f79..1a9eb14b2 100644
--- a/src/libgit2/pack.h
+++ b/src/libgit2/pack.h
@@ -99,13 +99,19 @@ struct git_pack_file {
uint32_t num_objects;
uint32_t num_bad_objects;
- git_oid *bad_object_sha1; /* array of git_oid */
+ git_oid *bad_object_ids; /* array of git_oid */
+
+ git_oid_t oid_type;
+ unsigned oid_hexsize:7,
+ oid_size:6,
+ pack_local:1,
+ pack_keep:1,
+ has_cache:1;
int index_version;
git_time_t mtime;
- unsigned pack_local:1, pack_keep:1, has_cache:1;
git_oidmap *idx_cache;
- unsigned char **oids;
+ unsigned char **ids;
git_pack_cache bases; /* delta base cache */
@@ -116,21 +122,26 @@ struct git_pack_file {
};
/**
- * Return the position where an OID (or a prefix) would be inserted within the
- * OID Lookup Table of an .idx file. This performs binary search between the lo
- * and hi indices.
+ * Return the position where an OID (or a prefix) would be inserted within
+ * the OID Lookup Table of an .idx file. This performs binary search
+ * between the lo and hi indices.
*
- * The stride parameter is provided because .idx files version 1 store the OIDs
- * interleaved with the 4-byte file offsets of the objects within the .pack
- * file (stride = 24), whereas files with version 2 store them in a contiguous
- * flat array (stride = 20).
+ * The stride parameter is provided because .idx files version 1 store the
+ * OIDs interleaved with the 4-byte file offsets of the objects within the
+ * .pack file (stride = oid_size + 4), whereas files with version 2 store
+ * them in a contiguous flat array (stride = oid_size).
*/
-int git_pack__lookup_sha1(const void *oid_lookup_table, size_t stride, unsigned lo,
- unsigned hi, const unsigned char *oid_prefix);
+int git_pack__lookup_id(
+ const void *id_lookup_table,
+ size_t stride,
+ unsigned lo,
+ unsigned hi,
+ const unsigned char *id_prefix,
+ const git_oid_t oid_type);
struct git_pack_entry {
off64_t offset;
- git_oid sha1;
+ git_oid id;
struct git_pack_file *p;
};
@@ -174,12 +185,15 @@ int get_delta_base(
off64_t delta_obj_offset);
void git_packfile_free(struct git_pack_file *p, bool unlink_packfile);
-int git_packfile_alloc(struct git_pack_file **pack_out, const char *path);
+int git_packfile_alloc(
+ struct git_pack_file **pack_out,
+ const char *path,
+ git_oid_t oid_type);
int git_pack_entry_find(
struct git_pack_entry *e,
struct git_pack_file *p,
- const git_oid *short_oid,
+ const git_oid *short_id,
size_t len);
int git_pack_foreach_entry(
struct git_pack_file *p,
diff --git a/src/libgit2/push.c b/src/libgit2/push.c
index d477b4f0d..e25681870 100644
--- a/src/libgit2/push.c
+++ b/src/libgit2/push.c
@@ -385,11 +385,18 @@ static int calculate_work(git_push *push)
git_vector_foreach(&push->specs, i, spec) {
if (spec->refspec.src && spec->refspec.src[0]!= '\0') {
/* This is a create or update. Local ref must exist. */
- if (git_reference_name_to_id(
- &spec->loid, push->repo, spec->refspec.src) < 0) {
- git_error_set(GIT_ERROR_REFERENCE, "no such reference '%s'", spec->refspec.src);
+
+ git_object *obj;
+ int error = git_revparse_single(&obj, push->repo, spec->refspec.src);
+
+ if (error < 0) {
+ git_object_free(obj);
+ git_error_set(GIT_ERROR_REFERENCE, "src refspec %s does not match any", spec->refspec.src);
return -1;
}
+
+ git_oid_cpy(&spec->loid, git_object_id(obj));
+ git_object_free(obj);
}
/* Remote ref may or may not (e.g. during create) already exist. */
diff --git a/src/libgit2/refdb_fs.c b/src/libgit2/refdb_fs.c
index 43283b3e4..9ce1a9608 100644
--- a/src/libgit2/refdb_fs.c
+++ b/src/libgit2/refdb_fs.c
@@ -60,15 +60,17 @@ typedef struct refdb_fs_backend {
/* path to common objects' directory */
char *commonpath;
- git_sortedcache *refcache;
+ git_oid_t oid_type;
+
+ int fsync : 1,
+ sorted : 1;
int peeling_mode;
git_iterator_flag_t iterator_flags;
uint32_t direach_flags;
- int fsync;
+ git_sortedcache *refcache;
git_map packed_refs_map;
git_mutex prlock; /* protect packed_refs_map */
git_futils_filestamp packed_refs_stamp;
- bool sorted;
} refdb_fs_backend;
static int refdb_reflog_fs__delete(git_refdb_backend *_backend, const char *name);
@@ -113,6 +115,7 @@ static int packed_reload(refdb_fs_backend *backend)
{
int error;
git_str packedrefs = GIT_STR_INIT;
+ size_t oid_hexsize = git_oid_hexsize(backend->oid_type);
char *scan, *eof, *eol;
if (!backend->gitpath)
@@ -158,9 +161,9 @@ static int packed_reload(refdb_fs_backend *backend)
/* parse "<OID> <refname>\n" */
- if (git_oid__fromstr(&oid, scan, GIT_OID_SHA1) < 0)
+ if (git_oid__fromstr(&oid, scan, backend->oid_type) < 0)
goto parse_failed;
- scan += GIT_OID_SHA1_HEXSIZE;
+ scan += oid_hexsize;
if (*scan++ != ' ')
goto parse_failed;
@@ -179,9 +182,9 @@ static int packed_reload(refdb_fs_backend *backend)
/* look for optional "^<OID>\n" */
if (*scan == '^') {
- if (git_oid__fromstr(&oid, scan + 1, GIT_OID_SHA1) < 0)
+ if (git_oid__fromstr(&oid, scan + 1, backend->oid_type) < 0)
goto parse_failed;
- scan += GIT_OID_SHA1_HEXSIZE + 1;
+ scan += oid_hexsize + 1;
if (scan < eof) {
if (!(eol = strchr(scan, '\n')))
@@ -214,19 +217,23 @@ parse_failed:
}
static int loose_parse_oid(
- git_oid *oid, const char *filename, git_str *file_content)
+ git_oid *oid,
+ const char *filename,
+ git_str *file_content,
+ git_oid_t oid_type)
{
const char *str = git_str_cstr(file_content);
+ size_t oid_hexsize = git_oid_hexsize(oid_type);
- if (git_str_len(file_content) < GIT_OID_SHA1_HEXSIZE)
+ if (git_str_len(file_content) < oid_hexsize)
goto corrupted;
/* we need to get 40 OID characters from the file */
- if (git_oid__fromstr(oid, str, GIT_OID_SHA1) < 0)
+ if (git_oid__fromstr(oid, str, oid_type) < 0)
goto corrupted;
/* If the file is longer than 40 chars, the 41st must be a space */
- str += GIT_OID_SHA1_HEXSIZE;
+ str += oid_hexsize;
if (*str == '\0' || git__isspace(*str))
return 0;
@@ -266,7 +273,7 @@ static int loose_lookup_to_packfile(refdb_fs_backend *backend, const char *name)
goto done;
/* parse OID from file */
- if ((error = loose_parse_oid(&oid, name, &ref_file)) < 0)
+ if ((error = loose_parse_oid(&oid, name, &ref_file, backend->oid_type)) < 0)
goto done;
if ((error = git_sortedcache_wlock(backend->refcache)) < 0)
@@ -437,7 +444,7 @@ static int loose_lookup(
} else {
git_oid oid;
- if (!(error = loose_parse_oid(&oid, ref_name, &ref_file)) &&
+ if (!(error = loose_parse_oid(&oid, ref_name, &ref_file, backend->oid_type)) &&
out != NULL)
*out = git_reference__alloc(ref_name, &oid, NULL);
}
@@ -615,19 +622,24 @@ static const char *end_of_record(const char *p, const char *end)
return p;
}
-static int
-cmp_record_to_refname(const char *rec, size_t data_end, const char *ref_name)
+static int cmp_record_to_refname(
+ const char *rec,
+ size_t data_end,
+ const char *ref_name,
+ git_oid_t oid_type)
{
const size_t ref_len = strlen(ref_name);
int cmp_val;
const char *end;
+ size_t oid_hexsize = git_oid_hexsize(oid_type);
- rec += GIT_OID_SHA1_HEXSIZE + 1; /* <oid> + space */
- if (data_end < GIT_OID_SHA1_HEXSIZE + 3) {
- /* an incomplete (corrupt) record is treated as less than ref_name */
+ rec += oid_hexsize + 1; /* <oid> + space */
+
+ /* an incomplete (corrupt) record is treated as less than ref_name */
+ if (data_end < oid_hexsize + 3)
return -1;
- }
- data_end -= GIT_OID_SHA1_HEXSIZE + 1;
+
+ data_end -= oid_hexsize + 1;
end = memchr(rec, '\n', data_end);
if (end)
@@ -675,6 +687,7 @@ static int packed_lookup(
{
int error = 0;
const char *left, *right, *data_end;
+ size_t oid_hexsize = git_oid_hexsize(backend->oid_type);
if ((error = packed_map_check(backend)) < 0)
return error;
@@ -698,7 +711,7 @@ static int packed_lookup(
mid = left + (right - left) / 2;
rec = start_of_record(left, mid);
- compare = cmp_record_to_refname(rec, data_end - rec, ref_name);
+ compare = cmp_record_to_refname(rec, data_end - rec, ref_name, backend->oid_type);
if (compare < 0) {
left = end_of_record(mid, right);
@@ -708,11 +721,11 @@ static int packed_lookup(
const char *eol;
git_oid oid, peel, *peel_ptr = NULL;
- if (data_end - rec < GIT_OID_SHA1_HEXSIZE ||
- git_oid__fromstr(&oid, rec, GIT_OID_SHA1) < 0) {
+ if (data_end - rec < (long)oid_hexsize ||
+ git_oid__fromstr(&oid, rec, backend->oid_type) < 0) {
goto parse_failed;
}
- rec += GIT_OID_SHA1_HEXSIZE + 1;
+ rec += oid_hexsize + 1;
if (!(eol = memchr(rec, '\n', data_end - rec))) {
goto parse_failed;
}
@@ -724,8 +737,8 @@ static int packed_lookup(
if (*rec == '^') {
rec++;
- if (data_end - rec < GIT_OID_SHA1_HEXSIZE ||
- git_oid__fromstr(&peel, rec, GIT_OID_SHA1) < 0) {
+ if (data_end - rec < (long)oid_hexsize ||
+ git_oid__fromstr(&peel, rec, backend->oid_type) < 0) {
goto parse_failed;
}
peel_ptr = &peel;
@@ -1108,7 +1121,7 @@ static int loose_commit(git_filebuf *file, const git_reference *ref)
GIT_ASSERT_ARG(ref);
if (ref->type == GIT_REFERENCE_DIRECT) {
- char oid[GIT_OID_SHA1_HEXSIZE + 1];
+ char oid[GIT_OID_MAX_HEXSIZE + 1];
git_oid_nfmt(oid, sizeof(oid), &ref->target.oid);
git_filebuf_printf(file, "%s\n", oid);
@@ -1224,7 +1237,7 @@ static int packed_find_peel(refdb_fs_backend *backend, struct packref *ref)
*/
static int packed_write_ref(struct packref *ref, git_filebuf *file)
{
- char oid[GIT_OID_SHA1_HEXSIZE + 1];
+ char oid[GIT_OID_MAX_HEXSIZE + 1];
git_oid_nfmt(oid, sizeof(oid), &ref->oid);
/*
@@ -1238,7 +1251,7 @@ static int packed_write_ref(struct packref *ref, git_filebuf *file)
* The required peels have already been loaded into `ref->peel_target`.
*/
if (ref->flags & PACKREF_HAS_PEEL) {
- char peel[GIT_OID_SHA1_HEXSIZE + 1];
+ char peel[GIT_OID_MAX_HEXSIZE + 1];
git_oid_nfmt(peel, sizeof(peel), &ref->peel);
if (git_filebuf_printf(file, "%s %s\n^%s\n", oid, ref->name, peel) < 0)
@@ -1302,7 +1315,7 @@ static int packed_remove_loose(refdb_fs_backend *backend)
continue;
/* Figure out the current id; if we find a bad ref file, skip it so we can do the rest */
- if (loose_parse_oid(&current_id, lock.path_original, &ref_content) < 0)
+ if (loose_parse_oid(&current_id, lock.path_original, &ref_content, backend->oid_type) < 0)
continue;
/* If the ref moved since we packed it, we must not delete it */
@@ -1891,7 +1904,10 @@ done:
return out;
}
-static int reflog_alloc(git_reflog **reflog, const char *name)
+static int reflog_alloc(
+ git_reflog **reflog,
+ const char *name,
+ git_oid_t oid_type)
{
git_reflog *log;
@@ -1903,6 +1919,8 @@ static int reflog_alloc(git_reflog **reflog, const char *name)
log->ref_name = git__strdup(name);
GIT_ERROR_CHECK_ALLOC(log->ref_name);
+ log->oid_type = oid_type;
+
if (git_vector_init(&log->entries, 0, NULL) < 0) {
git__free(log->ref_name);
git__free(log);
@@ -2032,7 +2050,10 @@ static int refdb_reflog_fs__has_log(git_refdb_backend *_backend, const char *nam
return has_reflog(backend->repo, name);
}
-static int refdb_reflog_fs__read(git_reflog **out, git_refdb_backend *_backend, const char *name)
+static int refdb_reflog_fs__read(
+ git_reflog **out,
+ git_refdb_backend *_backend,
+ const char *name)
{
int error = -1;
git_str log_path = GIT_STR_INIT;
@@ -2048,7 +2069,7 @@ static int refdb_reflog_fs__read(git_reflog **out, git_refdb_backend *_backend,
backend = GIT_CONTAINER_OF(_backend, refdb_fs_backend, parent);
repo = backend->repo;
- if (reflog_alloc(&log, name) < 0)
+ if (reflog_alloc(&log, name, backend->oid_type) < 0)
return -1;
if (reflog_path(&log_path, repo, name) < 0)
@@ -2086,11 +2107,11 @@ static int serialize_reflog_entry(
const git_signature *committer,
const char *msg)
{
- char raw_old[GIT_OID_SHA1_HEXSIZE+1];
- char raw_new[GIT_OID_SHA1_HEXSIZE+1];
+ char raw_old[GIT_OID_MAX_HEXSIZE + 1];
+ char raw_new[GIT_OID_MAX_HEXSIZE + 1];
- git_oid_tostr(raw_old, GIT_OID_SHA1_HEXSIZE+1, oid_old);
- git_oid_tostr(raw_new, GIT_OID_SHA1_HEXSIZE+1, oid_new);
+ git_oid_tostr(raw_old, GIT_OID_MAX_HEXSIZE + 1, oid_old);
+ git_oid_tostr(raw_new, GIT_OID_MAX_HEXSIZE + 1, oid_new);
git_str_clear(buf);
@@ -2189,10 +2210,16 @@ success:
}
/* Append to the reflog, must be called under reference lock */
-static int reflog_append(refdb_fs_backend *backend, const git_reference *ref, const git_oid *old, const git_oid *new, const git_signature *who, const char *message)
+static int reflog_append(
+ refdb_fs_backend *backend,
+ const git_reference *ref,
+ const git_oid *old,
+ const git_oid *new,
+ const git_signature *who,
+ const char *message)
{
int error, is_symbolic, open_flags;
- git_oid old_id = GIT_OID_SHA1_ZERO, new_id = GIT_OID_SHA1_ZERO;
+ git_oid old_id, new_id;
git_str buf = GIT_STR_INIT, path = GIT_STR_INIT;
git_repository *repo = backend->repo;
@@ -2206,6 +2233,9 @@ static int reflog_append(refdb_fs_backend *backend, const git_reference *ref, co
/* From here on is_symbolic also means that it's HEAD */
+ git_oid_clear(&old_id, backend->oid_type);
+ git_oid_clear(&new_id, backend->oid_type);
+
if (old) {
git_oid_cpy(&old_id, old);
} else {
@@ -2402,6 +2432,7 @@ int git_refdb_backend_fs(
goto fail;
backend->repo = repository;
+ backend->oid_type = repository->oid_type;
if (repository->gitdir) {
backend->gitpath = setup_namespace(repository, repository->gitdir);
diff --git a/src/libgit2/reflog.c b/src/libgit2/reflog.c
index eb0b7e48c..86d4355e3 100644
--- a/src/libgit2/reflog.c
+++ b/src/libgit2/reflog.c
@@ -71,7 +71,11 @@ int git_reflog_write(git_reflog *reflog)
return db->backend->reflog_write(db->backend, reflog);
}
-int git_reflog_append(git_reflog *reflog, const git_oid *new_oid, const git_signature *committer, const char *msg)
+int git_reflog_append(
+ git_reflog *reflog,
+ const git_oid *new_oid,
+ const git_signature *committer,
+ const char *msg)
{
const git_reflog_entry *previous;
git_reflog_entry *entry;
@@ -104,7 +108,7 @@ int git_reflog_append(git_reflog *reflog, const git_oid *new_oid, const git_sign
previous = git_reflog_entry_byindex(reflog, 0);
if (previous == NULL)
- git_oid__fromstr(&entry->oid_old, GIT_OID_SHA1_HEXZERO, GIT_OID_SHA1);
+ git_oid_clear(&entry->oid_old, reflog->oid_type);
else
git_oid_cpy(&entry->oid_old, &previous->oid_cur);
@@ -218,12 +222,8 @@ int git_reflog_drop(git_reflog *reflog, size_t idx, int rewrite_previous_entry)
/* If the oldest entry has just been removed... */
if (idx == entrycount - 1) {
- git_oid zero = GIT_OID_SHA1_ZERO;
-
/* ...clear the oid_old member of the "new" oldest entry */
- if (git_oid_cpy(&entry->oid_old, &zero) < 0)
- return -1;
-
+ git_oid_clear(&entry->oid_old, reflog->oid_type);
return 0;
}
diff --git a/src/libgit2/reflog.h b/src/libgit2/reflog.h
index 50d1056ed..bc9878598 100644
--- a/src/libgit2/reflog.h
+++ b/src/libgit2/reflog.h
@@ -16,8 +16,6 @@
#define GIT_REFLOG_DIR_MODE 0777
#define GIT_REFLOG_FILE_MODE 0666
-#define GIT_REFLOG_SIZE_MIN (2*GIT_OID_SHA1_HEXSIZE+2+17)
-
struct git_reflog_entry {
git_oid oid_old;
git_oid oid_cur;
@@ -30,6 +28,7 @@ struct git_reflog_entry {
struct git_reflog {
git_refdb *db;
char *ref_name;
+ git_oid_t oid_type;
git_vector entries;
};
diff --git a/src/libgit2/remote.c b/src/libgit2/remote.c
index 63346e941..e1bc6c694 100644
--- a/src/libgit2/remote.c
+++ b/src/libgit2/remote.c
@@ -17,6 +17,7 @@
#include "fetchhead.h"
#include "push.h"
#include "proxy.h"
+#include "strarray.h"
#include "git2/config.h"
#include "git2/types.h"
@@ -1027,6 +1028,24 @@ int git_remote_capabilities(unsigned int *out, git_remote *remote)
return remote->transport->capabilities(out, remote->transport);
}
+int git_remote_oid_type(git_oid_t *out, git_remote *remote)
+{
+ GIT_ASSERT_ARG(remote);
+
+ if (!remote->transport) {
+ git_error_set(GIT_ERROR_NET, "this remote has never connected");
+ *out = 0;
+ return -1;
+ }
+
+#ifdef GIT_EXPERIMENTAL_SHA256
+ return remote->transport->oid_type(out, remote->transport);
+#else
+ *out = GIT_OID_SHA1;
+ return 0;
+#endif
+}
+
static int lookup_config(char **out, git_config *cfg, const char *name)
{
git_config_entry *ce = NULL;
@@ -1226,24 +1245,6 @@ static int ls_to_vector(git_vector *out, git_remote *remote)
return 0;
}
-#define copy_opts(out, in) \
- if (in) { \
- (out)->callbacks = (in)->callbacks; \
- (out)->proxy_opts = (in)->proxy_opts; \
- (out)->custom_headers = (in)->custom_headers; \
- (out)->follow_redirects = (in)->follow_redirects; \
- }
-
-GIT_INLINE(int) connect_opts_from_fetch_opts(
- git_remote_connect_options *out,
- git_remote *remote,
- const git_fetch_options *fetch_opts)
-{
- git_remote_connect_options tmp = GIT_REMOTE_CONNECT_OPTIONS_INIT;
- copy_opts(&tmp, fetch_opts);
- return git_remote_connect_options_normalize(out, remote->repo, &tmp);
-}
-
static int connect_or_reset_options(
git_remote *remote,
int direction,
@@ -1331,7 +1332,8 @@ int git_remote_download(
return -1;
}
- if (connect_opts_from_fetch_opts(&connect_opts, remote, opts) < 0)
+ if (git_remote_connect_options__from_fetch_opts(&connect_opts,
+ remote, opts) < 0)
return -1;
if ((error = connect_or_reset_options(remote, GIT_DIRECTION_FETCH, &connect_opts)) < 0)
@@ -1351,6 +1353,8 @@ int git_remote_fetch(
bool prune = false;
git_str reflog_msg_buf = GIT_STR_INIT;
git_remote_connect_options connect_opts = GIT_REMOTE_CONNECT_OPTIONS_INIT;
+ unsigned int capabilities;
+ git_oid_t oid_type;
GIT_ASSERT_ARG(remote);
@@ -1359,7 +1363,8 @@ int git_remote_fetch(
return -1;
}
- if (connect_opts_from_fetch_opts(&connect_opts, remote, opts) < 0)
+ if (git_remote_connect_options__from_fetch_opts(&connect_opts,
+ remote, opts) < 0)
return -1;
if ((error = connect_or_reset_options(remote, GIT_DIRECTION_FETCH, &connect_opts)) < 0)
@@ -1370,6 +1375,10 @@ int git_remote_fetch(
tagopt = opts->download_tags;
}
+ if ((error = git_remote_capabilities(&capabilities, remote)) < 0 ||
+ (error = git_remote_oid_type(&oid_type, remote)) < 0)
+ return error;
+
/* Connect and download everything */
error = git_remote__download(remote, refspecs, opts);
@@ -1725,7 +1734,7 @@ static int update_ref(
const git_remote_callbacks *callbacks)
{
git_reference *ref;
- git_oid old_id;
+ git_oid old_id = GIT_OID_SHA1_ZERO;
int error;
error = git_reference_name_to_id(&old_id, remote->repo, ref_name);
@@ -2902,16 +2911,6 @@ done:
return error;
}
-GIT_INLINE(int) connect_opts_from_push_opts(
- git_remote_connect_options *out,
- git_remote *remote,
- const git_push_options *push_opts)
-{
- git_remote_connect_options tmp = GIT_REMOTE_CONNECT_OPTIONS_INIT;
- copy_opts(&tmp, push_opts);
- return git_remote_connect_options_normalize(out, remote->repo, &tmp);
-}
-
int git_remote_upload(
git_remote *remote,
const git_strarray *refspecs,
@@ -2930,7 +2929,8 @@ int git_remote_upload(
return -1;
}
- if ((error = connect_opts_from_push_opts(&connect_opts, remote, opts)) < 0)
+ if ((error = git_remote_connect_options__from_push_opts(
+ &connect_opts, remote, opts)) < 0)
goto cleanup;
if ((error = connect_or_reset_options(remote, GIT_DIRECTION_PUSH, &connect_opts)) < 0)
@@ -2991,7 +2991,8 @@ int git_remote_push(
return -1;
}
- if (connect_opts_from_push_opts(&connect_opts, remote, opts) < 0)
+ if (git_remote_connect_options__from_push_opts(&connect_opts,
+ remote, opts) < 0)
return -1;
if ((error = git_remote_upload(remote, refspecs, opts)) < 0)
diff --git a/src/libgit2/remote.h b/src/libgit2/remote.h
index df3aea29d..9e089be38 100644
--- a/src/libgit2/remote.h
+++ b/src/libgit2/remote.h
@@ -17,6 +17,7 @@
#include "refspec.h"
#include "vector.h"
#include "net.h"
+#include "proxy.h"
#define GIT_REMOTE_ORIGIN "origin"
@@ -57,5 +58,44 @@ int git_remote_connect_options_normalize(
const git_remote_connect_options *src);
int git_remote_capabilities(unsigned int *out, git_remote *remote);
+int git_remote_oid_type(git_oid_t *out, git_remote *remote);
+
+
+#define git_remote_connect_options__copy_opts(out, in) \
+ if (in) { \
+ (out)->callbacks = (in)->callbacks; \
+ (out)->proxy_opts = (in)->proxy_opts; \
+ (out)->custom_headers = (in)->custom_headers; \
+ (out)->follow_redirects = (in)->follow_redirects; \
+ }
+
+GIT_INLINE(int) git_remote_connect_options__from_fetch_opts(
+ git_remote_connect_options *out,
+ git_remote *remote,
+ const git_fetch_options *fetch_opts)
+{
+ git_remote_connect_options tmp = GIT_REMOTE_CONNECT_OPTIONS_INIT;
+ git_remote_connect_options__copy_opts(&tmp, fetch_opts);
+ return git_remote_connect_options_normalize(out, remote->repo, &tmp);
+}
+
+GIT_INLINE(int) git_remote_connect_options__from_push_opts(
+ git_remote_connect_options *out,
+ git_remote *remote,
+ const git_push_options *push_opts)
+{
+ git_remote_connect_options tmp = GIT_REMOTE_CONNECT_OPTIONS_INIT;
+ git_remote_connect_options__copy_opts(&tmp, push_opts);
+ return git_remote_connect_options_normalize(out, remote->repo, &tmp);
+}
+
+#undef git_remote_connect_options__copy_opts
+
+GIT_INLINE(void) git_remote_connect_options__dispose(
+ git_remote_connect_options *opts)
+{
+ git_proxy_options_dispose(&opts->proxy_opts);
+ git_strarray_dispose(&opts->custom_headers);
+}
#endif
diff --git a/src/libgit2/repository.c b/src/libgit2/repository.c
index 0eb16c223..bb6ae1b0f 100644
--- a/src/libgit2/repository.c
+++ b/src/libgit2/repository.c
@@ -68,6 +68,7 @@ static const struct {
static int check_repositoryformatversion(int *version, git_config *config);
static int check_extensions(git_config *config, int version);
static int load_global_config(git_config **config);
+static int load_objectformat(git_repository *repo, git_config *config);
#define GIT_COMMONDIR_FILE "commondir"
#define GIT_GITDIR_FILE "gitdir"
@@ -76,8 +77,8 @@ static int load_global_config(git_config **config);
#define GIT_BRANCH_DEFAULT "master"
-#define GIT_REPO_VERSION 0
-#define GIT_REPO_MAX_VERSION 1
+#define GIT_REPO_VERSION_DEFAULT 0
+#define GIT_REPO_VERSION_MAX 1
git_str git_repository__reserved_names_win32[] = {
{ DOT_GIT, 0, CONST_STRLEN(DOT_GIT) },
@@ -243,7 +244,7 @@ GIT_INLINE(int) validate_repo_path(git_str *path)
*/
static size_t suffix_len =
CONST_STRLEN("objects/pack/pack-.pack.lock") +
- GIT_OID_SHA1_HEXSIZE;
+ GIT_OID_MAX_HEXSIZE;
return git_fs_path_validate_str_length_with_suffix(
path, suffix_len);
@@ -498,12 +499,47 @@ static int validate_ownership_cb(const git_config_entry *entry, void *payload)
{
validate_ownership_data *data = payload;
- if (strcmp(entry->value, "") == 0)
+ if (strcmp(entry->value, "") == 0) {
*data->is_safe = false;
-
- if (git_fs_path_prettify_dir(&data->tmp, entry->value, NULL) == 0 &&
- strcmp(data->tmp.ptr, data->repo_path) == 0)
+ } else if (strcmp(entry->value, "*") == 0) {
*data->is_safe = true;
+ } else {
+ const char *test_path = entry->value;
+
+#ifdef GIT_WIN32
+ /*
+ * Git for Windows does some truly bizarre things with
+ * paths that start with a forward slash; and expects you
+ * to escape that with `%(prefix)`. This syntax generally
+ * means to add the prefix that Git was installed to -- eg
+ * `/usr/local` -- unless it's an absolute path, in which
+ * case the leading `%(prefix)/` is just removed. And Git
+ * for Windows expects you to use this syntax for absolute
+ * Unix-style paths (in "Git Bash" or Windows Subsystem for
+ * Linux).
+ *
+ * Worse, the behavior used to be that a leading `/` was
+ * not absolute. It would indicate that Git for Windows
+ * should add the prefix. So `//` is required for absolute
+ * Unix-style paths. Yes, this is truly horrifying.
+ *
+ * Emulate that behavior, I guess, but only for absolute
+ * paths. We won't deal with the Git install prefix. Also,
+ * give WSL users an escape hatch where they don't have to
+ * think about this and can use the literal path that the
+ * filesystem APIs provide (`//wsl.localhost/...`).
+ */
+ if (strncmp(test_path, "%(prefix)//", strlen("%(prefix)//")) == 0)
+ test_path += strlen("%(prefix)/");
+ else if (strncmp(test_path, "//", 2) == 0 &&
+ strncmp(test_path, "//wsl.localhost/", strlen("//wsl.localhost/")) != 0)
+ test_path++;
+#endif
+
+ if (git_fs_path_prettify_dir(&data->tmp, test_path, NULL) == 0 &&
+ strcmp(data->tmp.ptr, data->repo_path) == 0)
+ *data->is_safe = true;
+ }
return 0;
}
@@ -524,6 +560,9 @@ static int validate_ownership_config(bool *is_safe, const char *path)
validate_ownership_cb,
&ownership_data);
+ if (error == GIT_ENOTFOUND)
+ error = 0;
+
git_config_free(config);
git_str_dispose(&ownership_data.tmp);
@@ -544,6 +583,9 @@ static int validate_ownership_path(bool *is_safe, const char *path)
if (error == GIT_ENOTFOUND) {
*is_safe = true;
error = 0;
+ } else if (error == GIT_EINVALID) {
+ *is_safe = false;
+ error = 0;
}
return error;
@@ -751,6 +793,43 @@ error:
return error;
}
+static int obtain_config_and_set_oid_type(
+ git_config **config_ptr,
+ git_repository *repo)
+{
+ int error;
+ git_config *config = NULL;
+ int version = 0;
+
+ /*
+ * We'd like to have the config, but git doesn't particularly
+ * care if it's not there, so we need to deal with that.
+ */
+
+ error = git_repository_config_snapshot(&config, repo);
+ if (error < 0 && error != GIT_ENOTFOUND)
+ goto out;
+
+ if (config &&
+ (error = check_repositoryformatversion(&version, config)) < 0)
+ goto out;
+
+ if ((error = check_extensions(config, version)) < 0)
+ goto out;
+
+ if (version > 0) {
+ if ((error = load_objectformat(repo, config)) < 0)
+ goto out;
+ } else {
+ repo->oid_type = GIT_OID_SHA1;
+ }
+
+out:
+ *config_ptr = config;
+
+ return error;
+}
+
int git_repository_open_bare(
git_repository **repo_ptr,
const char *bare_path)
@@ -759,6 +838,7 @@ int git_repository_open_bare(
git_repository *repo = NULL;
bool is_valid;
int error;
+ git_config *config;
if ((error = git_fs_path_prettify_dir(&path, bare_path, NULL)) < 0 ||
(error = is_valid_repository_path(&is_valid, &path, &common_path)) < 0)
@@ -784,8 +864,15 @@ int git_repository_open_bare(
repo->is_worktree = 0;
repo->workdir = NULL;
+ if ((error = obtain_config_and_set_oid_type(&config, repo)) < 0)
+ goto cleanup;
+
*repo_ptr = repo;
- return 0;
+
+cleanup:
+ git_config_free(config);
+
+ return error;
}
static int _git_repository_open_ext_from_env(
@@ -992,7 +1079,6 @@ int git_repository_open_ext(
gitlink = GIT_STR_INIT, commondir = GIT_STR_INIT;
git_repository *repo = NULL;
git_config *config = NULL;
- int version = 0;
if (flags & GIT_REPOSITORY_OPEN_FROM_ENV)
return _git_repository_open_ext_from_env(repo_ptr, start_path);
@@ -1025,19 +1111,8 @@ int git_repository_open_ext(
goto cleanup;
repo->is_worktree = is_worktree;
- /*
- * We'd like to have the config, but git doesn't particularly
- * care if it's not there, so we need to deal with that.
- */
-
- error = git_repository_config_snapshot(&config, repo);
- if (error < 0 && error != GIT_ENOTFOUND)
- goto cleanup;
-
- if (config && (error = check_repositoryformatversion(&version, config)) < 0)
- goto cleanup;
-
- if ((error = check_extensions(config, version)) < 0)
+ error = obtain_config_and_set_oid_type(&config, repo);
+ if (error < 0)
goto cleanup;
if (git_shallow__enabled && (error = load_grafts(repo)) < 0)
@@ -1291,11 +1366,14 @@ int git_repository_odb__weakptr(git_odb **out, git_repository *repo)
*out = git_atomic_load(repo->_odb);
if (*out == NULL) {
git_str odb_path = GIT_STR_INIT;
+ git_odb_options odb_opts = GIT_ODB_OPTIONS_INIT;
git_odb *odb;
+ odb_opts.oid_type = repo->oid_type;
+
if ((error = git_repository__item_path(&odb_path, repo,
GIT_REPOSITORY_ITEM_OBJECTS)) < 0 ||
- (error = git_odb__new(&odb, NULL)) < 0)
+ (error = git_odb__new(&odb, &odb_opts)) < 0)
return error;
GIT_REFCOUNT_OWN(odb, repo);
@@ -1567,6 +1645,7 @@ static int check_repositoryformatversion(int *version, git_config *config)
int error;
error = git_config_get_int32(version, config, "core.repositoryformatversion");
+
/* git ignores this if the config variable isn't there */
if (error == GIT_ENOTFOUND)
return 0;
@@ -1574,10 +1653,15 @@ static int check_repositoryformatversion(int *version, git_config *config)
if (error < 0)
return -1;
- if (GIT_REPO_MAX_VERSION < *version) {
+ if (*version < 0) {
+ git_error_set(GIT_ERROR_REPOSITORY,
+ "invalid repository version %d", *version);
+ }
+
+ if (GIT_REPO_VERSION_MAX < *version) {
git_error_set(GIT_ERROR_REPOSITORY,
"unsupported repository version %d; only versions up to %d are supported",
- *version, GIT_REPO_MAX_VERSION);
+ *version, GIT_REPO_VERSION_MAX);
return -1;
}
@@ -1585,7 +1669,8 @@ static int check_repositoryformatversion(int *version, git_config *config)
}
static const char *builtin_extensions[] = {
- "noop"
+ "noop",
+ "objectformat"
};
static git_vector user_extensions = GIT_VECTOR_INIT;
@@ -1649,6 +1734,79 @@ static int check_extensions(git_config *config, int version)
return git_config_foreach_match(config, "^extensions\\.", check_valid_extension, NULL);
}
+static int load_objectformat(git_repository *repo, git_config *config)
+{
+ git_config_entry *entry = NULL;
+ int error;
+
+ if ((error = git_config_get_entry(&entry, config, "extensions.objectformat")) < 0) {
+ if (error == GIT_ENOTFOUND) {
+ repo->oid_type = GIT_OID_SHA1;
+ git_error_clear();
+ error = 0;
+ }
+
+ goto done;
+ }
+
+ if ((repo->oid_type = git_oid_type_fromstr(entry->value)) == 0) {
+ git_error_set(GIT_ERROR_REPOSITORY,
+ "unknown object format '%s'", entry->value);
+ error = GIT_EINVALID;
+ }
+
+done:
+ git_config_entry_free(entry);
+ return error;
+}
+
+int git_repository__set_objectformat(
+ git_repository *repo,
+ git_oid_t oid_type)
+{
+ git_config *cfg;
+
+ /*
+ * Older clients do not necessarily understand the
+ * `objectformat` extension, even when it's set to an
+ * object format that they understand (SHA1). Do not set
+ * the objectformat extension unless we're not using the
+ * default object format.
+ */
+ if (oid_type == GIT_OID_DEFAULT)
+ return 0;
+
+ if (!git_repository_is_empty(repo) && repo->oid_type != oid_type) {
+ git_error_set(GIT_ERROR_REPOSITORY,
+ "cannot change object id type of existing repository");
+ return -1;
+ }
+
+ if (git_repository_config__weakptr(&cfg, repo) < 0)
+ return -1;
+
+ if (git_config_set_int32(cfg,
+ "core.repositoryformatversion", 1) < 0 ||
+ git_config_set_string(cfg, "extensions.objectformat",
+ git_oid_type_name(oid_type)) < 0)
+ return -1;
+
+ /*
+ * During repo init, we may create some backends with the
+ * default oid type. Clear them so that we create them with
+ * the proper oid type.
+ */
+ if (repo->oid_type != oid_type) {
+ set_index(repo, NULL);
+ set_odb(repo, NULL);
+ set_refdb(repo, NULL);
+
+ repo->oid_type = oid_type;
+ }
+
+ return 0;
+}
+
int git_repository__extensions(char ***out, size_t *out_len)
{
git_vector extensions;
@@ -1927,19 +2085,21 @@ static int repo_init_config(
const char *repo_dir,
const char *work_dir,
uint32_t flags,
- uint32_t mode)
+ uint32_t mode,
+ git_oid_t oid_type)
{
int error = 0;
git_str cfg_path = GIT_STR_INIT, worktree_path = GIT_STR_INIT;
git_config *config = NULL;
bool is_bare = ((flags & GIT_REPOSITORY_INIT_BARE) != 0);
bool is_reinit = ((flags & GIT_REPOSITORY_INIT__IS_REINIT) != 0);
- int version = 0;
+ int version = GIT_REPO_VERSION_DEFAULT;
if ((error = repo_local_config(&config, &cfg_path, NULL, repo_dir)) < 0)
goto cleanup;
- if (is_reinit && (error = check_repositoryformatversion(&version, config)) < 0)
+ if (is_reinit &&
+ (error = check_repositoryformatversion(&version, config)) < 0)
goto cleanup;
if ((error = check_extensions(config, version)) < 0)
@@ -1950,7 +2110,7 @@ static int repo_init_config(
goto cleanup; } while (0)
SET_REPO_CONFIG(bool, "core.bare", is_bare);
- SET_REPO_CONFIG(int32, "core.repositoryformatversion", GIT_REPO_VERSION);
+ SET_REPO_CONFIG(int32, "core.repositoryformatversion", version);
if ((error = repo_init_fs_configs(
config, cfg_path.ptr, repo_dir, work_dir, !is_reinit)) < 0)
@@ -1983,6 +2143,11 @@ static int repo_init_config(
SET_REPO_CONFIG(bool, "receive.denyNonFastforwards", true);
}
+ if (oid_type != GIT_OID_SHA1) {
+ SET_REPO_CONFIG(int32, "core.repositoryformatversion", 1);
+ SET_REPO_CONFIG(string, "extensions.objectformat", git_oid_type_name(oid_type));
+ }
+
cleanup:
git_str_dispose(&cfg_path);
git_str_dispose(&worktree_path);
@@ -2463,6 +2628,7 @@ int git_repository_init_ext(
common_path = GIT_STR_INIT;
const char *wd;
bool is_valid;
+ git_oid_t oid_type = GIT_OID_DEFAULT;
int error;
GIT_ASSERT_ARG(out);
@@ -2471,6 +2637,11 @@ int git_repository_init_ext(
GIT_ERROR_CHECK_VERSION(opts, GIT_REPOSITORY_INIT_OPTIONS_VERSION, "git_repository_init_options");
+#ifdef GIT_EXPERIMENTAL_SHA256
+ if (opts->oid_type)
+ oid_type = opts->oid_type;
+#endif
+
if ((error = repo_init_directories(&repo_path, &wd_path, given_repo, opts)) < 0)
goto out;
@@ -2489,13 +2660,13 @@ int git_repository_init_ext(
opts->flags |= GIT_REPOSITORY_INIT__IS_REINIT;
- if ((error = repo_init_config(repo_path.ptr, wd, opts->flags, opts->mode)) < 0)
+ if ((error = repo_init_config(repo_path.ptr, wd, opts->flags, opts->mode, oid_type)) < 0)
goto out;
/* TODO: reinitialize the templates */
} else {
if ((error = repo_init_structure(repo_path.ptr, wd, opts)) < 0 ||
- (error = repo_init_config(repo_path.ptr, wd, opts->flags, opts->mode)) < 0 ||
+ (error = repo_init_config(repo_path.ptr, wd, opts->flags, opts->mode, oid_type)) < 0 ||
(error = repo_init_head(repo_path.ptr, opts->initial_head)) < 0)
goto out;
}
@@ -2958,14 +3129,14 @@ int git_repository__set_orig_head(git_repository *repo, const git_oid *orig_head
{
git_filebuf file = GIT_FILEBUF_INIT;
git_str file_path = GIT_STR_INIT;
- char orig_head_str[GIT_OID_SHA1_HEXSIZE];
+ char orig_head_str[GIT_OID_MAX_HEXSIZE];
int error = 0;
git_oid_fmt(orig_head_str, orig_head);
if ((error = git_str_joinpath(&file_path, repo->gitdir, GIT_ORIG_HEAD_FILE)) == 0 &&
(error = git_filebuf_open(&file, file_path.ptr, GIT_FILEBUF_CREATE_LEADING_DIRS, GIT_MERGE_FILE_MODE)) == 0 &&
- (error = git_filebuf_printf(&file, "%.*s\n", GIT_OID_SHA1_HEXSIZE, orig_head_str)) == 0)
+ (error = git_filebuf_printf(&file, "%.*s\n", (int)git_oid_hexsize(repo->oid_type), orig_head_str)) == 0)
error = git_filebuf_commit(&file);
if (error < 0)
@@ -3078,7 +3249,7 @@ int git_repository_hashfile(
goto cleanup;
}
- error = git_odb__hashfd_filtered(out, fd, (size_t)len, type, GIT_OID_SHA1, fl);
+ error = git_odb__hashfd_filtered(out, fd, (size_t)len, type, repo->oid_type, fl);
cleanup:
if (fd >= 0)
@@ -3478,3 +3649,8 @@ int git_repository_submodule_cache_clear(git_repository *repo)
repo->submodule_cache = NULL;
return error;
}
+
+git_oid_t git_repository_oid_type(git_repository *repo)
+{
+ return repo ? repo->oid_type : 0;
+}
diff --git a/src/libgit2/repository.h b/src/libgit2/repository.h
index c7966bcd2..16458e416 100644
--- a/src/libgit2/repository.h
+++ b/src/libgit2/repository.h
@@ -154,6 +154,7 @@ struct git_repository {
unsigned is_bare:1;
unsigned is_worktree:1;
+ git_oid_t oid_type;
unsigned int lru_counter;
@@ -265,4 +266,12 @@ int git_repository__extensions(char ***out, size_t *out_len);
int git_repository__set_extensions(const char **extensions, size_t len);
void git_repository__free_extensions(void);
+/*
+ * Set the object format (OID type) for a repository; this will set
+ * both the configuration and the internal value for the oid type.
+ */
+int git_repository__set_objectformat(
+ git_repository *repo,
+ git_oid_t oid_type);
+
#endif
diff --git a/src/libgit2/revparse.c b/src/libgit2/revparse.c
index 2ed282159..964afe378 100644
--- a/src/libgit2/revparse.c
+++ b/src/libgit2/revparse.c
@@ -15,21 +15,28 @@
#include "git2.h"
-static int maybe_sha_or_abbrev(git_object **out, git_repository *repo, const char *spec, size_t speclen)
+static int maybe_sha_or_abbrev(
+ git_object **out,
+ git_repository *repo,
+ const char *spec,
+ size_t speclen)
{
git_oid oid;
- if (git_oid__fromstrn(&oid, spec, speclen, GIT_OID_SHA1) < 0)
+ if (git_oid__fromstrn(&oid, spec, speclen, repo->oid_type) < 0)
return GIT_ENOTFOUND;
return git_object_lookup_prefix(out, repo, &oid, speclen, GIT_OBJECT_ANY);
}
-static int maybe_sha(git_object **out, git_repository *repo, const char *spec)
+static int maybe_sha(
+ git_object **out,
+ git_repository *repo,
+ const char *spec)
{
size_t speclen = strlen(spec);
- if (speclen != GIT_OID_SHA1_HEXSIZE)
+ if (speclen != git_oid_hexsize(repo->oid_type))
return GIT_ENOTFOUND;
return maybe_sha_or_abbrev(out, repo, spec, speclen);
@@ -110,8 +117,8 @@ static int revparse_lookup_object(
if (error != GIT_ENOTFOUND)
return error;
- if ((strlen(spec) < GIT_OID_SHA1_HEXSIZE) &&
- ((error = maybe_abbrev(object_out, repo, spec)) != GIT_ENOTFOUND))
+ if ((strlen(spec) < git_oid_hexsize(repo->oid_type)) &&
+ ((error = maybe_abbrev(object_out, repo, spec)) != GIT_ENOTFOUND))
return error;
if ((error = maybe_describe(object_out, repo, spec)) != GIT_ENOTFOUND)
@@ -268,7 +275,16 @@ static int retrieve_revobject_from_reflog(git_object **out, git_reference **base
int error = -1;
if (*base_ref == NULL) {
- if ((error = git_reference_dwim(&ref, repo, identifier)) < 0)
+ /*
+ * When HEAD@{n} is specified, do not use dwim, which would resolve the
+ * reference (to the current branch that HEAD is pointing to).
+ */
+ if (position > 0 && strcmp(identifier, GIT_HEAD_FILE) == 0)
+ error = git_reference_lookup(&ref, repo, GIT_HEAD_FILE);
+ else
+ error = git_reference_dwim(&ref, repo, identifier);
+
+ if (error < 0)
return error;
} else {
ref = *base_ref;
diff --git a/src/libgit2/revwalk.c b/src/libgit2/revwalk.c
index 553e0497a..3269d9279 100644
--- a/src/libgit2/revwalk.c
+++ b/src/libgit2/revwalk.c
@@ -121,8 +121,12 @@ int git_revwalk__push_ref(git_revwalk *walk, const char *refname, const git_revw
{
git_oid oid;
- if (git_reference_name_to_id(&oid, walk->repo, refname) < 0)
+ int error = git_reference_name_to_id(&oid, walk->repo, refname);
+ if (opts->from_glob && (error == GIT_ENOTFOUND || error == GIT_EINVALIDSPEC || error == GIT_EPEEL)) {
+ return 0;
+ } else if (error < 0) {
return -1;
+ }
return git_revwalk__push_commit(walk, &oid, opts);
}
diff --git a/src/libgit2/stash.c b/src/libgit2/stash.c
index 5fc01ac36..319ae3a3f 100644
--- a/src/libgit2/stash.c
+++ b/src/libgit2/stash.c
@@ -25,6 +25,7 @@
#include "merge.h"
#include "diff.h"
#include "diff_generate.h"
+#include "strarray.h"
static int create_error(int error, const char *msg)
{
@@ -193,6 +194,30 @@ static int stash_to_index(
return git_index_add(index, &entry);
}
+static int stash_update_index_from_paths(
+ git_repository *repo,
+ git_index *index,
+ const git_strarray *paths)
+{
+ unsigned int status_flags;
+ size_t i;
+ int error = 0;
+
+ for (i = 0; i < paths->count; i++) {
+ git_status_file(&status_flags, repo, paths->strings[i]);
+
+ if (status_flags & (GIT_STATUS_WT_DELETED | GIT_STATUS_INDEX_DELETED)) {
+ if ((error = git_index_remove(index, paths->strings[i], 0)) < 0)
+ return error;
+ } else {
+ if ((error = stash_to_index(repo, index, paths->strings[i])) < 0)
+ return error;
+ }
+ }
+
+ return error;
+}
+
static int stash_update_index_from_diff(
git_repository *repo,
git_index *index,
@@ -388,24 +413,79 @@ cleanup:
return error;
}
-static int commit_worktree(
+static int build_stash_commit_from_tree(
git_oid *w_commit_oid,
git_repository *repo,
const git_signature *stasher,
const char *message,
git_commit *i_commit,
git_commit *b_commit,
- git_commit *u_commit)
+ git_commit *u_commit,
+ const git_tree *tree)
{
const git_commit *parents[] = { NULL, NULL, NULL };
- git_index *i_index = NULL, *r_index = NULL;
- git_tree *w_tree = NULL;
- int error = 0, ignorecase;
parents[0] = b_commit;
parents[1] = i_commit;
parents[2] = u_commit;
+ return git_commit_create(
+ w_commit_oid,
+ repo,
+ NULL,
+ stasher,
+ stasher,
+ NULL,
+ message,
+ tree,
+ u_commit ? 3 : 2,
+ parents);
+}
+
+static int build_stash_commit_from_index(
+ git_oid *w_commit_oid,
+ git_repository *repo,
+ const git_signature *stasher,
+ const char *message,
+ git_commit *i_commit,
+ git_commit *b_commit,
+ git_commit *u_commit,
+ git_index *index)
+{
+ git_tree *tree;
+ int error;
+
+ if ((error = build_tree_from_index(&tree, repo, index)) < 0)
+ goto cleanup;
+
+ error = build_stash_commit_from_tree(
+ w_commit_oid,
+ repo,
+ stasher,
+ message,
+ i_commit,
+ b_commit,
+ u_commit,
+ tree);
+
+cleanup:
+ git_tree_free(tree);
+ return error;
+}
+
+static int commit_worktree(
+ git_oid *w_commit_oid,
+ git_repository *repo,
+ const git_signature *stasher,
+ const char *message,
+ git_commit *i_commit,
+ git_commit *b_commit,
+ git_commit *u_commit)
+{
+ git_index *i_index = NULL, *r_index = NULL;
+ git_tree *w_tree = NULL;
+ int error = 0, ignorecase;
+
if ((error = git_repository_index(&r_index, repo) < 0) ||
(error = git_index_new(&i_index)) < 0 ||
(error = git_index__fill(i_index, &r_index->entries) < 0) ||
@@ -417,17 +497,16 @@ static int commit_worktree(
if ((error = build_workdir_tree(&w_tree, repo, i_index, b_commit)) < 0)
goto cleanup;
- error = git_commit_create(
+ error = build_stash_commit_from_tree(
w_commit_oid,
repo,
- NULL,
stasher,
- stasher,
- NULL,
message,
- w_tree,
- u_commit ? 3 : 2,
- parents);
+ i_commit,
+ b_commit,
+ u_commit,
+ w_tree
+ );
cleanup:
git_tree_free(w_tree);
@@ -520,6 +599,54 @@ static int ensure_there_are_changes_to_stash(git_repository *repo, uint32_t flag
return error;
}
+static int has_changes_cb(
+ const char *path,
+ unsigned int status,
+ void *payload)
+{
+ GIT_UNUSED(path);
+ GIT_UNUSED(status);
+ GIT_UNUSED(payload);
+
+ if (status == GIT_STATUS_CURRENT)
+ return GIT_ENOTFOUND;
+
+ return 0;
+}
+
+static int ensure_there_are_changes_to_stash_paths(
+ git_repository *repo,
+ uint32_t flags,
+ const git_strarray *paths)
+{
+ int error;
+ git_status_options opts = GIT_STATUS_OPTIONS_INIT;
+
+ opts.show = GIT_STATUS_SHOW_INDEX_AND_WORKDIR;
+ opts.flags = GIT_STATUS_OPT_EXCLUDE_SUBMODULES |
+ GIT_STATUS_OPT_INCLUDE_UNMODIFIED |
+ GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH;
+
+ if (flags & GIT_STASH_INCLUDE_UNTRACKED)
+ opts.flags |= GIT_STATUS_OPT_INCLUDE_UNTRACKED |
+ GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS;
+
+ if (flags & GIT_STASH_INCLUDE_IGNORED)
+ opts.flags |= GIT_STATUS_OPT_INCLUDE_IGNORED |
+ GIT_STATUS_OPT_RECURSE_IGNORED_DIRS;
+
+ git_strarray_copy(&opts.pathspec, paths);
+
+ error = git_status_foreach_ext(repo, &opts, has_changes_cb, NULL);
+
+ git_strarray_dispose(&opts.pathspec);
+
+ if (error == GIT_ENOTFOUND)
+ return create_error(GIT_ENOTFOUND, "one of the files does not have any changes to stash.");
+
+ return error;
+}
+
static int reset_index_and_workdir(git_repository *repo, git_commit *commit, uint32_t flags)
{
git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;
@@ -540,14 +667,36 @@ int git_stash_save(
const char *message,
uint32_t flags)
{
- git_index *index = NULL;
+ git_stash_save_options opts = GIT_STASH_SAVE_OPTIONS_INIT;
+
+ GIT_ASSERT_ARG(stasher);
+
+ opts.stasher = stasher;
+ opts.message = message;
+ opts.flags = flags;
+
+ return git_stash_save_with_opts(out, repo, &opts);
+}
+
+int git_stash_save_with_opts(
+ git_oid *out,
+ git_repository *repo,
+ const git_stash_save_options *opts)
+{
+ git_index *index = NULL, *paths_index = NULL;
git_commit *b_commit = NULL, *i_commit = NULL, *u_commit = NULL;
git_str msg = GIT_STR_INIT;
+ git_tree *tree = NULL;
+ git_reference *head = NULL;
+ bool has_paths = false;
+
int error;
GIT_ASSERT_ARG(out);
GIT_ASSERT_ARG(repo);
- GIT_ASSERT_ARG(stasher);
+ GIT_ASSERT_ARG(opts && opts->stasher);
+
+ has_paths = opts->paths.count > 0;
if ((error = git_repository__ensure_not_bare(repo, "stash save")) < 0)
return error;
@@ -555,44 +704,63 @@ int git_stash_save(
if ((error = retrieve_base_commit_and_message(&b_commit, &msg, repo)) < 0)
goto cleanup;
- if ((error = ensure_there_are_changes_to_stash(repo, flags)) < 0)
+ if (!has_paths &&
+ (error = ensure_there_are_changes_to_stash(repo, opts->flags)) < 0)
+ goto cleanup;
+ else if (has_paths &&
+ (error = ensure_there_are_changes_to_stash_paths(
+ repo, opts->flags, &opts->paths)) < 0)
goto cleanup;
if ((error = git_repository_index(&index, repo)) < 0)
goto cleanup;
- if ((error = commit_index(&i_commit, repo, index, stasher,
+ if ((error = commit_index(&i_commit, repo, index, opts->stasher,
git_str_cstr(&msg), b_commit)) < 0)
goto cleanup;
- if ((flags & (GIT_STASH_INCLUDE_UNTRACKED | GIT_STASH_INCLUDE_IGNORED)) &&
- (error = commit_untracked(&u_commit, repo, stasher,
- git_str_cstr(&msg), i_commit, flags)) < 0)
+ if ((opts->flags & (GIT_STASH_INCLUDE_UNTRACKED | GIT_STASH_INCLUDE_IGNORED)) &&
+ (error = commit_untracked(&u_commit, repo, opts->stasher,
+ git_str_cstr(&msg), i_commit, opts->flags)) < 0)
goto cleanup;
- if ((error = prepare_worktree_commit_message(&msg, message)) < 0)
+ if ((error = prepare_worktree_commit_message(&msg, opts->message)) < 0)
goto cleanup;
- if ((error = commit_worktree(out, repo, stasher, git_str_cstr(&msg),
- i_commit, b_commit, u_commit)) < 0)
- goto cleanup;
+ if (!has_paths) {
+ if ((error = commit_worktree(out, repo, opts->stasher, git_str_cstr(&msg),
+ i_commit, b_commit, u_commit)) < 0)
+ goto cleanup;
+ } else {
+ if ((error = git_index_new(&paths_index)) < 0 ||
+ (error = retrieve_head(&head, repo)) < 0 ||
+ (error = git_reference_peel((git_object**)&tree, head, GIT_OBJECT_TREE)) < 0 ||
+ (error = git_index_read_tree(paths_index, tree)) < 0 ||
+ (error = stash_update_index_from_paths(repo, paths_index, &opts->paths)) < 0 ||
+ (error = build_stash_commit_from_index(out, repo, opts->stasher, git_str_cstr(&msg),
+ i_commit, b_commit, u_commit, paths_index)) < 0)
+ goto cleanup;
+ }
git_str_rtrim(&msg);
if ((error = update_reflog(out, repo, git_str_cstr(&msg))) < 0)
goto cleanup;
- if ((error = reset_index_and_workdir(repo, (flags & GIT_STASH_KEEP_INDEX) ? i_commit : b_commit,
- flags)) < 0)
+ if (!(opts->flags & GIT_STASH_KEEP_ALL) &&
+ (error = reset_index_and_workdir(repo,
+ (opts->flags & GIT_STASH_KEEP_INDEX) ? i_commit : b_commit,opts->flags)) < 0)
goto cleanup;
cleanup:
-
git_str_dispose(&msg);
git_commit_free(i_commit);
git_commit_free(b_commit);
git_commit_free(u_commit);
+ git_tree_free(tree);
+ git_reference_free(head);
git_index_free(index);
+ git_index_free(paths_index);
return error;
}
@@ -777,6 +945,13 @@ int git_stash_apply_options_init(git_stash_apply_options *opts, unsigned int ver
return 0;
}
+int git_stash_save_options_init(git_stash_save_options *opts, unsigned int version)
+{
+ GIT_INIT_STRUCTURE_FROM_TEMPLATE(
+ opts, version, git_stash_save_options, GIT_STASH_SAVE_OPTIONS_INIT);
+ return 0;
+}
+
#ifndef GIT_DEPRECATE_HARD
int git_stash_apply_init_options(git_stash_apply_options *opts, unsigned int version)
{
diff --git a/src/libgit2/strarray.c b/src/libgit2/strarray.c
index 2f9b77cc2..25e75f02a 100644
--- a/src/libgit2/strarray.c
+++ b/src/libgit2/strarray.c
@@ -8,6 +8,7 @@
#include "util.h"
#include "common.h"
+#include "strarray.h"
int git_strarray_copy(git_strarray *tgt, const git_strarray *src)
{
diff --git a/src/libgit2/strarray.h b/src/libgit2/strarray.h
new file mode 100644
index 000000000..198480535
--- /dev/null
+++ b/src/libgit2/strarray.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) the libgit2 contributors. All rights reserved.
+ *
+ * This file is part of libgit2, distributed under the GNU GPL v2 with
+ * a Linking Exception. For full terms see the included COPYING file.
+ */
+#ifndef INCLUDE_strarray_h__
+#define INCLUDE_strarray_h__
+
+#include "common.h"
+#include "git2/strarray.h"
+
+/**
+ * Copy a string array object from source to target.
+ *
+ * Note: target is overwritten and hence should be empty, otherwise its
+ * contents are leaked. Call git_strarray_free() if necessary.
+ *
+ * @param tgt target
+ * @param src source
+ * @return 0 on success, < 0 on allocation failure
+ */
+extern int git_strarray_copy(git_strarray *tgt, const git_strarray *src);
+
+#endif
diff --git a/src/libgit2/streams/openssl.c b/src/libgit2/streams/openssl.c
index 89c96780c..5e0e2c939 100644
--- a/src/libgit2/streams/openssl.c
+++ b/src/libgit2/streams/openssl.c
@@ -198,7 +198,7 @@ static int openssl_ensure_initialized(void)
if ((error = git_openssl_stream_dynamic_init()) == 0)
error = openssl_init();
- openssl_initialized = true;
+ openssl_initialized = !error;
}
error |= git_mutex_unlock(&openssl_mutex);
diff --git a/src/libgit2/streams/openssl_dynamic.c b/src/libgit2/streams/openssl_dynamic.c
index da16b6ed7..222c1099d 100644
--- a/src/libgit2/streams/openssl_dynamic.c
+++ b/src/libgit2/streams/openssl_dynamic.c
@@ -91,7 +91,7 @@ int (*sk_num)(const void *sk);
void *(*sk_value)(const void *sk, int i);
void (*sk_free)(void *sk);
-void *openssl_handle;
+static void *openssl_handle;
GIT_INLINE(void *) openssl_sym(int *err, const char *name, bool required)
{
@@ -125,7 +125,8 @@ int git_openssl_stream_dynamic_init(void)
(openssl_handle = dlopen("libssl.1.1.dylib", RTLD_NOW)) == NULL &&
(openssl_handle = dlopen("libssl.so.1.0.0", RTLD_NOW)) == NULL &&
(openssl_handle = dlopen("libssl.1.0.0.dylib", RTLD_NOW)) == NULL &&
- (openssl_handle = dlopen("libssl.so.10", RTLD_NOW)) == NULL) {
+ (openssl_handle = dlopen("libssl.so.10", RTLD_NOW)) == NULL &&
+ (openssl_handle = dlopen("libssl.so.3", RTLD_NOW)) == NULL) {
git_error_set(GIT_ERROR_SSL, "could not load ssl libraries");
return -1;
}
@@ -175,7 +176,6 @@ int git_openssl_stream_dynamic_init(void)
SSL_connect = (int (*)(SSL *))openssl_sym(&err, "SSL_connect", true);
SSL_ctrl = (long (*)(SSL *, int, long, void *))openssl_sym(&err, "SSL_ctrl", true);
- SSL_get_peer_certificate = (X509 *(*)(const SSL *))openssl_sym(&err, "SSL_get_peer_certificate", true);
SSL_library_init = (int (*)(void))openssl_sym(&err, "SSL_library_init", false);
SSL_free = (void (*)(SSL *))openssl_sym(&err, "SSL_free", true);
SSL_get_error = (int (*)(SSL *, int))openssl_sym(&err, "SSL_get_error", true);
@@ -187,6 +187,10 @@ int git_openssl_stream_dynamic_init(void)
SSL_shutdown = (int (*)(SSL *ssl))openssl_sym(&err, "SSL_shutdown", true);
SSL_write = (int (*)(SSL *, const void *, int))openssl_sym(&err, "SSL_write", true);
+ if (!(SSL_get_peer_certificate = (X509 *(*)(const SSL *))openssl_sym(&err, "SSL_get_peer_certificate", false))) {
+ SSL_get_peer_certificate = (X509 *(*)(const SSL *))openssl_sym(&err, "SSL_get1_peer_certificate", true);
+ }
+
SSL_CTX_ctrl = (long (*)(SSL_CTX *, int, long, void *))openssl_sym(&err, "SSL_CTX_ctrl", true);
SSL_CTX_free = (void (*)(SSL_CTX *))openssl_sym(&err, "SSL_CTX_free", true);
SSL_CTX_new = (SSL_CTX *(*)(const SSL_METHOD *))openssl_sym(&err, "SSL_CTX_new", true);
diff --git a/src/libgit2/streams/socket.c b/src/libgit2/streams/socket.c
index 9415fe892..908e8c02f 100644
--- a/src/libgit2/streams/socket.c
+++ b/src/libgit2/streams/socket.c
@@ -135,9 +135,12 @@ static ssize_t socket_write(git_stream *stream, const char *data, size_t len, in
git_socket_stream *st = (git_socket_stream *) stream;
ssize_t written;
+ GIT_ASSERT(flags == 0);
+ GIT_UNUSED(flags);
+
errno = 0;
- if ((written = p_send(st->s, data, len, flags)) < 0) {
+ if ((written = p_send(st->s, data, len, 0)) < 0) {
net_set_error("error sending data");
return -1;
}
diff --git a/src/libgit2/submodule.c b/src/libgit2/submodule.c
index 0f4f0726c..95ea84fc2 100644
--- a/src/libgit2/submodule.c
+++ b/src/libgit2/submodule.c
@@ -1338,7 +1338,11 @@ int git_submodule_update(git_submodule *sm, int init, git_submodule_update_optio
/* Get the status of the submodule to determine if it is already initialized */
if ((error = git_submodule_status(&submodule_status, sm->repo, sm->name, GIT_SUBMODULE_IGNORE_UNSPECIFIED)) < 0)
goto done;
-
+
+ /* If the submodule is configured but hasn't been added, skip it */
+ if (submodule_status == GIT_SUBMODULE_STATUS_IN_CONFIG)
+ goto done;
+
/*
* If submodule work dir is not already initialized, check to see
* what we need to do (initialize, clone, return error...)
@@ -1389,7 +1393,7 @@ int git_submodule_update(git_submodule *sm, int init, git_submodule_update_optio
*/
clone_options.checkout_opts.checkout_strategy = GIT_CHECKOUT_NONE;
- if ((error = git_clone(&sub_repo, submodule_url, sm->path, &clone_options)) < 0 ||
+ if ((error = git_clone__submodule(&sub_repo, submodule_url, sm->path, &clone_options)) < 0 ||
(error = git_repository_set_head_detached(sub_repo, git_submodule_index_id(sm))) < 0 ||
(error = git_checkout_head(sub_repo, &update_options.checkout_opts)) != 0)
goto done;
diff --git a/src/libgit2/sysdir.c b/src/libgit2/sysdir.c
index 450cb509b..7838a6789 100644
--- a/src/libgit2/sysdir.c
+++ b/src/libgit2/sysdir.c
@@ -12,16 +12,262 @@
#include "fs_path.h"
#include <ctype.h>
#if GIT_WIN32
-#include "win32/findfile.h"
+# include "fs_path.h"
+# include "win32/path_w32.h"
+# include "win32/utf-conv.h"
#else
-#include <unistd.h>
-#include <pwd.h>
+# include <unistd.h>
+# include <pwd.h>
#endif
+#ifdef GIT_WIN32
+# define REG_GITFORWINDOWS_KEY L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Git_is1"
+# define REG_GITFORWINDOWS_KEY_WOW64 L"SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Git_is1"
+
+static int expand_win32_path(git_win32_path dest, const wchar_t *src)
+{
+ DWORD len = ExpandEnvironmentStringsW(src, dest, GIT_WIN_PATH_UTF16);
+
+ if (!len || len > GIT_WIN_PATH_UTF16)
+ return -1;
+
+ return 0;
+}
+
+static int win32_path_to_utf8(git_str *dest, const wchar_t *src)
+{
+ git_win32_utf8_path utf8_path;
+
+ if (git_win32_path_to_utf8(utf8_path, src) < 0) {
+ git_error_set(GIT_ERROR_OS, "unable to convert path to UTF-8");
+ return -1;
+ }
+
+ /* Convert backslashes to forward slashes */
+ git_fs_path_mkposix(utf8_path);
+
+ return git_str_sets(dest, utf8_path);
+}
+
+static git_win32_path mock_registry;
+static bool mock_registry_set;
+
+extern int git_win32__set_registry_system_dir(const wchar_t *mock_sysdir)
+{
+ if (!mock_sysdir) {
+ mock_registry[0] = L'\0';
+ mock_registry_set = false;
+ } else {
+ size_t len = wcslen(mock_sysdir);
+
+ if (len > GIT_WIN_PATH_MAX) {
+ git_error_set(GIT_ERROR_INVALID, "mock path too long");
+ return -1;
+ }
+
+ wcscpy(mock_registry, mock_sysdir);
+ mock_registry_set = true;
+ }
+
+ return 0;
+}
+
+static int lookup_registry_key(
+ git_win32_path out,
+ const HKEY hive,
+ const wchar_t* key,
+ const wchar_t *value)
+{
+ HKEY hkey;
+ DWORD type, size;
+ int error = GIT_ENOTFOUND;
+
+ /*
+ * Registry data may not be NUL terminated, provide room to do
+ * it ourselves.
+ */
+ size = (DWORD)((sizeof(git_win32_path) - 1) * sizeof(wchar_t));
+
+ if (RegOpenKeyExW(hive, key, 0, KEY_READ, &hkey) != 0)
+ return GIT_ENOTFOUND;
+
+ if (RegQueryValueExW(hkey, value, NULL, &type, (LPBYTE)out, &size) == 0 &&
+ type == REG_SZ &&
+ size > 0 &&
+ size < sizeof(git_win32_path)) {
+ size_t wsize = size / sizeof(wchar_t);
+ size_t len = wsize - 1;
+
+ if (out[wsize - 1] != L'\0') {
+ len = wsize;
+ out[wsize] = L'\0';
+ }
+
+ if (out[len - 1] == L'\\')
+ out[len - 1] = L'\0';
+
+ if (_waccess(out, F_OK) == 0)
+ error = 0;
+ }
+
+ RegCloseKey(hkey);
+ return error;
+}
+
+static int find_sysdir_in_registry(git_win32_path out)
+{
+ if (mock_registry_set) {
+ if (mock_registry[0] == L'\0')
+ return GIT_ENOTFOUND;
+
+ wcscpy(out, mock_registry);
+ return 0;
+ }
+
+ if (lookup_registry_key(out, HKEY_CURRENT_USER, REG_GITFORWINDOWS_KEY, L"InstallLocation") == 0 ||
+ lookup_registry_key(out, HKEY_CURRENT_USER, REG_GITFORWINDOWS_KEY_WOW64, L"InstallLocation") == 0 ||
+ lookup_registry_key(out, HKEY_LOCAL_MACHINE, REG_GITFORWINDOWS_KEY, L"InstallLocation") == 0 ||
+ lookup_registry_key(out, HKEY_LOCAL_MACHINE, REG_GITFORWINDOWS_KEY_WOW64, L"InstallLocation") == 0)
+ return 0;
+
+ return GIT_ENOTFOUND;
+}
+
+static int find_sysdir_in_path(git_win32_path out)
+{
+ size_t out_len;
+
+ if (git_win32_path_find_executable(out, L"git.exe") < 0 &&
+ git_win32_path_find_executable(out, L"git.cmd") < 0)
+ return GIT_ENOTFOUND;
+
+ out_len = wcslen(out);
+
+ /* Trim the file name */
+ if (out_len <= CONST_STRLEN(L"git.exe"))
+ return GIT_ENOTFOUND;
+
+ out_len -= CONST_STRLEN(L"git.exe");
+
+ if (out_len && out[out_len - 1] == L'\\')
+ out_len--;
+
+ /*
+ * Git for Windows usually places the command in a 'bin' or
+ * 'cmd' directory, trim that.
+ */
+ if (out_len >= CONST_STRLEN(L"\\bin") &&
+ wcsncmp(&out[out_len - CONST_STRLEN(L"\\bin")], L"\\bin", CONST_STRLEN(L"\\bin")) == 0)
+ out_len -= CONST_STRLEN(L"\\bin");
+ else if (out_len >= CONST_STRLEN(L"\\cmd") &&
+ wcsncmp(&out[out_len - CONST_STRLEN(L"\\cmd")], L"\\cmd", CONST_STRLEN(L"\\cmd")) == 0)
+ out_len -= CONST_STRLEN(L"\\cmd");
+
+ if (!out_len)
+ return GIT_ENOTFOUND;
+
+ out[out_len] = L'\0';
+ return 0;
+}
+
+static int find_win32_dirs(
+ git_str *out,
+ const wchar_t* tmpl[])
+{
+ git_win32_path path16;
+ git_str buf = GIT_STR_INIT;
+
+ git_str_clear(out);
+
+ for (; *tmpl != NULL; tmpl++) {
+ if (!expand_win32_path(path16, *tmpl) &&
+ path16[0] != L'%' &&
+ !_waccess(path16, F_OK)) {
+ win32_path_to_utf8(&buf, path16);
+
+ if (buf.size)
+ git_str_join(out, GIT_PATH_LIST_SEPARATOR, out->ptr, buf.ptr);
+ }
+ }
+
+ git_str_dispose(&buf);
+
+ return (git_str_oom(out) ? -1 : 0);
+}
+
+static int append_subdir(git_str *out, git_str *path, const char *subdir)
+{
+ static const char* architecture_roots[] = {
+ "",
+ "mingw64",
+ "mingw32",
+ NULL
+ };
+ const char **root;
+ size_t orig_path_len = path->size;
+
+ for (root = architecture_roots; *root; root++) {
+ if ((*root[0] && git_str_joinpath(path, path->ptr, *root) < 0) ||
+ git_str_joinpath(path, path->ptr, subdir) < 0)
+ return -1;
+
+ if (git_fs_path_exists(path->ptr) &&
+ git_str_join(out, GIT_PATH_LIST_SEPARATOR, out->ptr, path->ptr) < 0)
+ return -1;
+
+ git_str_truncate(path, orig_path_len);
+ }
+
+ return 0;
+}
+
+int git_win32__find_system_dirs(git_str *out, const char *subdir)
+{
+ git_win32_path pathdir, regdir;
+ git_str path8 = GIT_STR_INIT;
+ bool has_pathdir, has_regdir;
+ int error;
+
+ has_pathdir = (find_sysdir_in_path(pathdir) == 0);
+ has_regdir = (find_sysdir_in_registry(regdir) == 0);
+
+ if (!has_pathdir && !has_regdir)
+ return 0;
+
+ /*
+ * Usually the git in the path is the same git in the registry,
+ * in this case there's no need to duplicate the paths.
+ */
+ if (has_pathdir && has_regdir && wcscmp(pathdir, regdir) == 0)
+ has_regdir = false;
+
+ if (has_pathdir) {
+ if ((error = win32_path_to_utf8(&path8, pathdir)) < 0 ||
+ (error = append_subdir(out, &path8, subdir)) < 0)
+ goto done;
+ }
+
+ if (has_regdir) {
+ if ((error = win32_path_to_utf8(&path8, regdir)) < 0 ||
+ (error = append_subdir(out, &path8, subdir)) < 0)
+ goto done;
+ }
+
+done:
+ git_str_dispose(&path8);
+ return error;
+}
+#endif /* WIN32 */
+
static int git_sysdir_guess_programdata_dirs(git_str *out)
{
#ifdef GIT_WIN32
- return git_win32__find_programdata_dirs(out);
+ static const wchar_t *programdata_tmpls[2] = {
+ L"%PROGRAMDATA%\\Git",
+ NULL,
+ };
+
+ return find_win32_dirs(out, programdata_tmpls);
#else
git_str_clear(out);
return 0;
@@ -75,10 +321,17 @@ out:
}
#endif
-static int git_sysdir_guess_global_dirs(git_str *out)
+static int git_sysdir_guess_home_dirs(git_str *out)
{
#ifdef GIT_WIN32
- return git_win32__find_global_dirs(out);
+ static const wchar_t *global_tmpls[4] = {
+ L"%HOME%\\",
+ L"%HOMEDRIVE%%HOMEPATH%\\",
+ L"%USERPROFILE%\\",
+ NULL,
+ };
+
+ return find_win32_dirs(out, global_tmpls);
#else
int error;
uid_t uid, euid;
@@ -114,10 +367,25 @@ static int git_sysdir_guess_global_dirs(git_str *out)
#endif
}
+static int git_sysdir_guess_global_dirs(git_str *out)
+{
+ return git_sysdir_guess_home_dirs(out);
+}
+
static int git_sysdir_guess_xdg_dirs(git_str *out)
{
#ifdef GIT_WIN32
- return git_win32__find_xdg_dirs(out);
+ static const wchar_t *global_tmpls[7] = {
+ L"%XDG_CONFIG_HOME%\\git",
+ L"%APPDATA%\\git",
+ L"%LOCALAPPDATA%\\git",
+ L"%HOME%\\.config\\git",
+ L"%HOMEDRIVE%%HOMEPATH%\\.config\\git",
+ L"%USERPROFILE%\\.config\\git",
+ NULL,
+ };
+
+ return find_win32_dirs(out, global_tmpls);
#else
git_str env = GIT_STR_INIT;
int error;
@@ -171,6 +439,7 @@ static struct git_sysdir__dir git_sysdir__dirs[] = {
{ GIT_STR_INIT, git_sysdir_guess_xdg_dirs },
{ GIT_STR_INIT, git_sysdir_guess_programdata_dirs },
{ GIT_STR_INIT, git_sysdir_guess_template_dirs },
+ { GIT_STR_INIT, git_sysdir_guess_home_dirs }
};
static void git_sysdir_global_shutdown(void)
@@ -350,6 +619,12 @@ int git_sysdir_find_template_dir(git_str *path)
path, NULL, GIT_SYSDIR_TEMPLATE, "template");
}
+int git_sysdir_find_homedir(git_str *path)
+{
+ return git_sysdir_find_in_dirlist(
+ path, NULL, GIT_SYSDIR_HOME, "home directory");
+}
+
int git_sysdir_expand_global_file(git_str *path, const char *filename)
{
int error;
@@ -361,3 +636,15 @@ int git_sysdir_expand_global_file(git_str *path, const char *filename)
return error;
}
+
+int git_sysdir_expand_homedir_file(git_str *path, const char *filename)
+{
+ int error;
+
+ if ((error = git_sysdir_find_homedir(path)) == 0) {
+ if (filename)
+ error = git_str_joinpath(path, path->ptr, filename);
+ }
+
+ return error;
+}
diff --git a/src/libgit2/sysdir.h b/src/libgit2/sysdir.h
index 568f27940..03f59e1de 100644
--- a/src/libgit2/sysdir.h
+++ b/src/libgit2/sysdir.h
@@ -57,10 +57,22 @@ extern int git_sysdir_find_programdata_file(git_str *path, const char *filename)
extern int git_sysdir_find_template_dir(git_str *path);
/**
- * Expand the name of a "global" file (i.e. one in a user's home
- * directory). Unlike `find_global_file` (above), this makes no
- * attempt to check for the existence of the file, and is useful if
- * you want the full path regardless of existence.
+ * Find the home directory. On Windows, this will look at the `HOME`,
+ * `HOMEPATH`, and `USERPROFILE` environment variables (in that order)
+ * and return the first path that is set and exists. On other systems,
+ * this will simply return the contents of the `HOME` environment variable.
+ *
+ * @param path buffer to write the full path into
+ * @return 0 if found, GIT_ENOTFOUND if not found, or -1 on other OS error
+ */
+extern int git_sysdir_find_homedir(git_str *path);
+
+/**
+ * Expand the name of a "global" file -- by default inside the user's
+ * home directory, but can be overridden by the user configuration.
+ * Unlike `find_global_file` (above), this makes no attempt to check
+ * for the existence of the file, and is useful if you want the full
+ * path regardless of existence.
*
* @param path buffer to write the full path into
* @param filename name of file in the home directory
@@ -68,13 +80,25 @@ extern int git_sysdir_find_template_dir(git_str *path);
*/
extern int git_sysdir_expand_global_file(git_str *path, const char *filename);
+/**
+ * Expand the name of a file in the user's home directory. This
+ * function makes no attempt to check for the existence of the file,
+ * and is useful if you want the full path regardless of existence.
+ *
+ * @param path buffer to write the full path into
+ * @param filename name of file in the home directory
+ * @return 0 on success or -1 on error
+ */
+extern int git_sysdir_expand_homedir_file(git_str *path, const char *filename);
+
typedef enum {
- GIT_SYSDIR_SYSTEM = 0,
- GIT_SYSDIR_GLOBAL = 1,
- GIT_SYSDIR_XDG = 2,
+ GIT_SYSDIR_SYSTEM = 0,
+ GIT_SYSDIR_GLOBAL = 1,
+ GIT_SYSDIR_XDG = 2,
GIT_SYSDIR_PROGRAMDATA = 3,
- GIT_SYSDIR_TEMPLATE = 4,
- GIT_SYSDIR__MAX = 5
+ GIT_SYSDIR_TEMPLATE = 4,
+ GIT_SYSDIR_HOME = 5,
+ GIT_SYSDIR__MAX = 6
} git_sysdir_t;
/**
@@ -110,4 +134,12 @@ extern int git_sysdir_set(git_sysdir_t which, const char *paths);
*/
extern int git_sysdir_reset(void);
+#ifdef GIT_WIN32
+/** Sets the registry system dir to a mock; for testing. */
+extern int git_win32__set_registry_system_dir(const wchar_t *mock_sysdir);
+
+/** Find the given system dir; for testing. */
+extern int git_win32__find_system_dirs(git_str *out, const char *subdir);
+#endif
+
#endif
diff --git a/src/libgit2/tag.c b/src/libgit2/tag.c
index 908adbebf..562ec13ea 100644
--- a/src/libgit2/tag.c
+++ b/src/libgit2/tag.c
@@ -65,7 +65,11 @@ static int tag_error(const char *str)
return GIT_EINVALID;
}
-static int tag_parse(git_tag *tag, const char *buffer, const char *buffer_end)
+static int tag_parse(
+ git_tag *tag,
+ const char *buffer,
+ const char *buffer_end,
+ git_oid_t oid_type)
{
static const char *tag_types[] = {
NULL, "commit\n", "tree\n", "blob\n", "tag\n"
@@ -76,7 +80,7 @@ static int tag_parse(git_tag *tag, const char *buffer, const char *buffer_end)
int error;
if (git_object__parse_oid_header(&tag->target,
- &buffer, buffer_end, "object ", GIT_OID_SHA1) < 0)
+ &buffer, buffer_end, "object ", oid_type) < 0)
return tag_error("object field invalid");
if (buffer + 5 >= buffer_end)
@@ -161,18 +165,25 @@ static int tag_parse(git_tag *tag, const char *buffer, const char *buffer_end)
return 0;
}
-int git_tag__parse_raw(void *_tag, const char *data, size_t size)
+int git_tag__parse_raw(
+ void *_tag,
+ const char *data,
+ size_t size,
+ git_oid_t oid_type)
{
- return tag_parse(_tag, data, data + size);
+ return tag_parse(_tag, data, data + size, oid_type);
}
-int git_tag__parse(void *_tag, git_odb_object *odb_obj)
+int git_tag__parse(
+ void *_tag,
+ git_odb_object *odb_obj,
+ git_oid_t oid_type)
{
git_tag *tag = _tag;
const char *buffer = git_odb_object_data(odb_obj);
const char *buffer_end = buffer + git_odb_object_size(odb_obj);
- return tag_parse(tag, buffer, buffer_end);
+ return tag_parse(tag, buffer, buffer_end, oid_type);
}
static int retrieve_tag_reference(
@@ -299,8 +310,10 @@ static int git_tag_create__internal(
}
if (create_tag_annotation) {
- if (write_tag_annotation(oid, repo, tag_name, target, tagger, message) < 0)
+ if (write_tag_annotation(oid, repo, tag_name, target, tagger, message) < 0) {
+ git_str_dispose(&ref_name);
return -1;
+ }
} else
git_oid_cpy(oid, git_object_id(target));
@@ -372,7 +385,7 @@ int git_tag_create_from_buffer(git_oid *oid, git_repository *repo, const char *b
return -1;
/* validate the buffer */
- if (tag_parse(&tag, buffer, buffer + strlen(buffer)) < 0)
+ if (tag_parse(&tag, buffer, buffer + strlen(buffer), repo->oid_type) < 0)
return -1;
/* validate the target */
@@ -397,14 +410,17 @@ int git_tag_create_from_buffer(git_oid *oid, git_repository *repo, const char *b
/** Ensure the tag name doesn't conflict with an already existing
* reference unless overwriting has explicitly been requested **/
if (error == 0 && !allow_ref_overwrite) {
+ git_str_dispose(&ref_name);
git_error_set(GIT_ERROR_TAG, "tag already exists");
return GIT_EEXISTS;
}
/* write the buffer */
if ((error = git_odb_open_wstream(
- &stream, odb, strlen(buffer), GIT_OBJECT_TAG)) < 0)
+ &stream, odb, strlen(buffer), GIT_OBJECT_TAG)) < 0) {
+ git_str_dispose(&ref_name);
return error;
+ }
if (!(error = git_odb_stream_write(stream, buffer, strlen(buffer))))
error = git_odb_stream_finalize_write(oid, stream);
diff --git a/src/libgit2/tag.h b/src/libgit2/tag.h
index 76ae1508e..fdaaa463c 100644
--- a/src/libgit2/tag.h
+++ b/src/libgit2/tag.h
@@ -25,7 +25,7 @@ struct git_tag {
};
void git_tag__free(void *tag);
-int git_tag__parse(void *tag, git_odb_object *obj);
-int git_tag__parse_raw(void *tag, const char *data, size_t size);
+int git_tag__parse(void *tag, git_odb_object *obj, git_oid_t oid_type);
+int git_tag__parse_raw(void *tag, const char *data, size_t size, git_oid_t oid_type);
#endif
diff --git a/src/libgit2/transports/http.c b/src/libgit2/transports/http.c
index 7db5582ca..cda76ae61 100644
--- a/src/libgit2/transports/http.c
+++ b/src/libgit2/transports/http.c
@@ -655,6 +655,7 @@ static int http_action(
{
http_subtransport *transport = GIT_CONTAINER_OF(t, http_subtransport, parent);
git_remote_connect_options *connect_opts = &transport->owner->connect_opts;
+ git_http_client_options opts = {0};
http_stream *stream;
const http_service *service;
int error;
@@ -683,14 +684,14 @@ static int http_action(
stream = git__calloc(sizeof(http_stream), 1);
GIT_ERROR_CHECK_ALLOC(stream);
- if (!transport->http_client) {
- git_http_client_options opts = {0};
-
- opts.server_certificate_check_cb = connect_opts->callbacks.certificate_check;
- opts.server_certificate_check_payload = connect_opts->callbacks.payload;
- opts.proxy_certificate_check_cb = connect_opts->proxy_opts.certificate_check;
- opts.proxy_certificate_check_payload = connect_opts->proxy_opts.payload;
+ opts.server_certificate_check_cb = connect_opts->callbacks.certificate_check;
+ opts.server_certificate_check_payload = connect_opts->callbacks.payload;
+ opts.proxy_certificate_check_cb = connect_opts->proxy_opts.certificate_check;
+ opts.proxy_certificate_check_payload = connect_opts->proxy_opts.payload;
+ if (transport->http_client) {
+ git_http_client_set_options(transport->http_client, &opts);
+ } else {
if (git_http_client_new(&transport->http_client, &opts) < 0)
return -1;
}
diff --git a/src/libgit2/transports/httpclient.c b/src/libgit2/transports/httpclient.c
index f07923ef2..0ad6cd4dc 100644
--- a/src/libgit2/transports/httpclient.c
+++ b/src/libgit2/transports/httpclient.c
@@ -1541,6 +1541,15 @@ int git_http_client_new(
return 0;
}
+/* Update the options of an existing httpclient instance. */
+void git_http_client_set_options(
+ git_http_client *client,
+ git_http_client_options *opts)
+{
+ if (opts)
+ memcpy(&client->opts, opts, sizeof(git_http_client_options));
+}
+
GIT_INLINE(void) http_server_close(git_http_server *server)
{
if (server->stream) {
diff --git a/src/libgit2/transports/httpclient.h b/src/libgit2/transports/httpclient.h
index 6d0ef9edb..22c4dd093 100644
--- a/src/libgit2/transports/httpclient.h
+++ b/src/libgit2/transports/httpclient.h
@@ -88,6 +88,16 @@ extern int git_http_client_new(
git_http_client **out,
git_http_client_options *opts);
+/**
+ * Update the options of an existing httpclient instance.
+ *
+ * @param client the httpclient instance to modify
+ * @param opts new options or NULL to keep existing options
+ */
+extern void git_http_client_set_options(
+ git_http_client *client,
+ git_http_client_options *opts);
+
/*
* Sends a request to the host specified by the request URL. If the
* method is POST, either the content_length or the chunked flag must
diff --git a/src/libgit2/transports/local.c b/src/libgit2/transports/local.c
index 24f49cc65..f576682a7 100644
--- a/src/libgit2/transports/local.c
+++ b/src/libgit2/transports/local.c
@@ -266,6 +266,17 @@ static int local_capabilities(unsigned int *capabilities, git_transport *transpo
return 0;
}
+#ifdef GIT_EXPERIMENTAL_SHA256
+static int local_oid_type(git_oid_t *out, git_transport *transport)
+{
+ transport_local *t = (transport_local *)transport;
+
+ *out = t->repo->oid_type;
+
+ return 0;
+}
+#endif
+
static int local_ls(const git_remote_head ***out, size_t *size, git_transport *transport)
{
transport_local *t = (transport_local *)transport;
@@ -730,6 +741,9 @@ int git_transport_local(git_transport **out, git_remote *owner, void *param)
t->parent.connect = local_connect;
t->parent.set_connect_opts = local_set_connect_opts;
t->parent.capabilities = local_capabilities;
+#ifdef GIT_EXPERIMENTAL_SHA256
+ t->parent.oid_type = local_oid_type;
+#endif
t->parent.negotiate_fetch = local_negotiate_fetch;
t->parent.download_pack = local_download_pack;
t->parent.push = local_push;
diff --git a/src/libgit2/transports/smart.c b/src/libgit2/transports/smart.c
index 04ee7e740..da6dca039 100644
--- a/src/libgit2/transports/smart.c
+++ b/src/libgit2/transports/smart.c
@@ -54,6 +54,12 @@ GIT_INLINE(int) git_smart__reset_stream(transport_smart *t, bool close_subtransp
return -1;
}
+ git__free(t->caps.object_format);
+ t->caps.object_format = NULL;
+
+ git__free(t->caps.agent);
+ t->caps.agent = NULL;
+
return 0;
}
@@ -242,6 +248,30 @@ static int git_smart__capabilities(unsigned int *capabilities, git_transport *tr
return 0;
}
+#ifdef GIT_EXPERIMENTAL_SHA256
+static int git_smart__oid_type(git_oid_t *out, git_transport *transport)
+{
+ transport_smart *t = GIT_CONTAINER_OF(transport, transport_smart, parent);
+
+ *out = 0;
+
+ if (t->caps.object_format == NULL) {
+ *out = GIT_OID_DEFAULT;
+ } else {
+ *out = git_oid_type_fromstr(t->caps.object_format);
+
+ if (!*out) {
+ git_error_set(GIT_ERROR_INVALID,
+ "unknown object format '%s'",
+ t->caps.object_format);
+ return -1;
+ }
+ }
+
+ return 0;
+}
+#endif
+
static int git_smart__ls(const git_remote_head ***out, size_t *size, git_transport *transport)
{
transport_smart *t = GIT_CONTAINER_OF(transport, transport_smart, parent);
@@ -386,6 +416,8 @@ static void git_smart__free(git_transport *transport)
git_remote_connect_options_dispose(&t->connect_opts);
+ git__free(t->caps.object_format);
+ git__free(t->caps.agent);
git__free(t);
}
@@ -452,6 +484,9 @@ int git_transport_smart(git_transport **out, git_remote *owner, void *param)
t->parent.connect = git_smart__connect;
t->parent.set_connect_opts = git_smart__set_connect_opts;
t->parent.capabilities = git_smart__capabilities;
+#ifdef GIT_EXPERIMENTAL_SHA256
+ t->parent.oid_type = git_smart__oid_type;
+#endif
t->parent.close = git_smart__close;
t->parent.free = git_smart__free;
t->parent.negotiate_fetch = git_smart__negotiate_fetch;
diff --git a/src/libgit2/transports/smart.h b/src/libgit2/transports/smart.h
index bc072d2fe..15b6c9a0a 100644
--- a/src/libgit2/transports/smart.h
+++ b/src/libgit2/transports/smart.h
@@ -34,6 +34,8 @@
#define GIT_CAP_WANT_TIP_SHA1 "allow-tip-sha1-in-want"
#define GIT_CAP_WANT_REACHABLE_SHA1 "allow-reachable-sha1-in-want"
#define GIT_CAP_SHALLOW "shallow"
+#define GIT_CAP_OBJECT_FORMAT "object-format="
+#define GIT_CAP_AGENT "agent="
extern bool git_smart__ofs_delta_enabled;
@@ -143,6 +145,8 @@ typedef struct transport_smart_caps {
want_tip_sha1:1,
want_reachable_sha1:1,
shallow:1;
+ char *object_format;
+ char *agent;
} transport_smart_caps;
typedef int (*packetsize_cb)(size_t received, void *payload);
@@ -191,7 +195,12 @@ int git_smart__get_push_stream(transport_smart *t, git_smart_subtransport_stream
int git_smart__update_heads(transport_smart *t, git_vector *symrefs);
/* smart_pkt.c */
-int git_pkt_parse_line(git_pkt **head, const char **endptr, const char *line, size_t linelen);
+typedef struct {
+ git_oid_t oid_type;
+ int seen_capabilities: 1;
+} git_pkt_parse_data;
+
+int git_pkt_parse_line(git_pkt **head, const char **endptr, const char *line, size_t linelen, git_pkt_parse_data *data);
int git_pkt_buffer_flush(git_str *buf);
int git_pkt_send_flush(GIT_SOCKET s);
int git_pkt_buffer_done(git_str *buf);
diff --git a/src/libgit2/transports/smart_pkt.c b/src/libgit2/transports/smart_pkt.c
index 9e9bda020..ec9764a87 100644
--- a/src/libgit2/transports/smart_pkt.c
+++ b/src/libgit2/transports/smart_pkt.c
@@ -21,11 +21,14 @@
#include <ctype.h>
-#define PKT_LEN_SIZE 4
-static const char pkt_done_str[] = "0009done\n";
-static const char pkt_flush_str[] = "0000";
-static const char pkt_have_prefix[] = "0032have ";
-static const char pkt_want_prefix[] = "0032want ";
+#define PKT_DONE_STR "0009done\n"
+#define PKT_FLUSH_STR "0000"
+#define PKT_HAVE_PREFIX "have "
+#define PKT_WANT_PREFIX "want "
+
+#define PKT_LEN_SIZE 4
+#define PKT_MAX_SIZE 0xffff
+#define PKT_MAX_WANTLEN (PKT_LEN_SIZE + CONST_STRLEN(PKT_WANT_PREFIX) + GIT_OID_MAX_HEXSIZE + 1)
static int flush_pkt(git_pkt **out)
{
@@ -212,26 +215,87 @@ static int sideband_error_pkt(git_pkt **out, const char *line, size_t len)
return 0;
}
+static int set_data(
+ git_pkt_parse_data *data,
+ const char *line,
+ size_t len)
+{
+ const char *caps, *format_str = NULL, *eos;
+ size_t format_len;
+ git_oid_t remote_oid_type;
+
+ GIT_ASSERT_ARG(data);
+
+ if ((caps = memchr(line, '\0', len)) != NULL) {
+ caps++;
+
+ if (strncmp(caps, "object-format=", CONST_STRLEN("object-format=")) == 0)
+ format_str = caps + CONST_STRLEN("object-format=");
+ else if ((format_str = strstr(caps, " object-format=")) != NULL)
+ format_str += CONST_STRLEN(" object-format=");
+ }
+
+ if (format_str) {
+ if ((eos = strchr(format_str, ' ')) == NULL)
+ eos = strchr(format_str, '\0');
+
+ GIT_ASSERT(eos);
+
+ format_len = eos - format_str;
+
+ if ((remote_oid_type = git_oid_type_fromstrn(format_str, format_len)) == 0) {
+ git_error_set(GIT_ERROR_INVALID, "unknown remote object format '%.*s'", (int)format_len, format_str);
+ return -1;
+ }
+ } else {
+ remote_oid_type = GIT_OID_SHA1;
+ }
+
+ if (!data->oid_type) {
+ data->oid_type = remote_oid_type;
+ } else if (data->oid_type != remote_oid_type) {
+ git_error_set(GIT_ERROR_INVALID,
+ "the local object format '%s' does not match the remote object format '%s'",
+ git_oid_type_name(data->oid_type),
+ git_oid_type_name(remote_oid_type));
+ return -1;
+ }
+
+ return 0;
+}
+
/*
* Parse an other-ref line.
*/
-static int ref_pkt(git_pkt **out, const char *line, size_t len)
+static int ref_pkt(
+ git_pkt **out,
+ const char *line,
+ size_t len,
+ git_pkt_parse_data *data)
{
git_pkt_ref *pkt;
- size_t alloclen;
+ size_t alloclen, oid_hexsize;
pkt = git__calloc(1, sizeof(git_pkt_ref));
GIT_ERROR_CHECK_ALLOC(pkt);
pkt->type = GIT_PKT_REF;
- if (len < GIT_OID_SHA1_HEXSIZE ||
- git_oid__fromstr(&pkt->head.oid, line, GIT_OID_SHA1) < 0)
+ /* Determine OID type from capabilities */
+ if (!data->seen_capabilities && set_data(data, line, len) < 0)
+ return -1;
+
+ GIT_ASSERT(data->oid_type);
+ oid_hexsize = git_oid_hexsize(data->oid_type);
+
+ if (len < oid_hexsize ||
+ git_oid__fromstr(&pkt->head.oid, line, data->oid_type) < 0)
goto out_err;
- line += GIT_OID_SHA1_HEXSIZE;
- len -= GIT_OID_SHA1_HEXSIZE;
+ line += oid_hexsize;
+ len -= oid_hexsize;
if (git__prefixncmp(line, len, " "))
goto out_err;
+
line++;
len--;
@@ -248,8 +312,14 @@ static int ref_pkt(git_pkt **out, const char *line, size_t len)
memcpy(pkt->head.name, line, len);
pkt->head.name[len] = '\0';
- if (strlen(pkt->head.name) < len)
- pkt->capabilities = strchr(pkt->head.name, '\0') + 1;
+ if (strlen(pkt->head.name) < len) {
+ if (!data->seen_capabilities)
+ pkt->capabilities = strchr(pkt->head.name, '\0') + 1;
+ else
+ goto out_err;
+ }
+
+ data->seen_capabilities = 1;
*out = (git_pkt *)pkt;
return 0;
@@ -462,7 +532,11 @@ static int parse_len(size_t *out, const char *line, size_t linelen)
*/
int git_pkt_parse_line(
- git_pkt **pkt, const char **endptr, const char *line, size_t linelen)
+ git_pkt **pkt,
+ const char **endptr,
+ const char *line,
+ size_t linelen,
+ git_pkt_parse_data *data)
{
int error;
size_t len;
@@ -541,7 +615,7 @@ int git_pkt_parse_line(
else if (!git__prefixcmp(line, "unshallow"))
error = unshallow_pkt(pkt, line, len);
else
- error = ref_pkt(pkt, line, len);
+ error = ref_pkt(pkt, line, len, data);
*endptr = line + len;
@@ -575,14 +649,21 @@ void git_pkt_free(git_pkt *pkt)
int git_pkt_buffer_flush(git_str *buf)
{
- return git_str_put(buf, pkt_flush_str, strlen(pkt_flush_str));
+ return git_str_put(buf, PKT_FLUSH_STR, CONST_STRLEN(PKT_FLUSH_STR));
}
-static int buffer_want_with_caps(const git_remote_head *head, transport_smart_caps *caps, git_str *buf)
+static int buffer_want_with_caps(
+ const git_remote_head *head,
+ transport_smart_caps *caps,
+ git_oid_t oid_type,
+ git_str *buf)
{
git_str str = GIT_STR_INIT;
- char oid[GIT_OID_SHA1_HEXSIZE +1] = {0};
- size_t len;
+ char oid[GIT_OID_MAX_HEXSIZE];
+ size_t oid_hexsize, len;
+
+ oid_hexsize = git_oid_hexsize(oid_type);
+ git_oid_fmt(oid, &head->oid);
/* Prefer multi_ack_detailed */
if (caps->multi_ack_detailed)
@@ -611,19 +692,20 @@ static int buffer_want_with_caps(const git_remote_head *head, transport_smart_ca
if (git_str_oom(&str))
return -1;
- len = strlen("XXXXwant ") + GIT_OID_SHA1_HEXSIZE + 1 /* NUL */ +
- git_str_len(&str) + 1 /* LF */;
-
- if (len > 0xffff) {
+ if (str.size > (PKT_MAX_SIZE - (PKT_MAX_WANTLEN + 1))) {
git_error_set(GIT_ERROR_NET,
- "tried to produce packet with invalid length %" PRIuZ, len);
+ "tried to produce packet with invalid caps length %" PRIuZ, str.size);
return -1;
}
+ len = PKT_LEN_SIZE + CONST_STRLEN(PKT_WANT_PREFIX) +
+ oid_hexsize + 1 /* NUL */ +
+ git_str_len(&str) + 1 /* LF */;
+
git_str_grow_by(buf, len);
- git_oid_fmt(oid, &head->oid);
git_str_printf(buf,
- "%04xwant %s %s\n", (unsigned int)len, oid, git_str_cstr(&str));
+ "%04x%s%.*s %s\n", (unsigned int)len, PKT_WANT_PREFIX,
+ (int)oid_hexsize, oid, git_str_cstr(&str));
git_str_dispose(&str);
GIT_ERROR_CHECK_ALLOC_STR(buf);
@@ -641,8 +723,21 @@ int git_pkt_buffer_wants(
transport_smart_caps *caps,
git_str *buf)
{
- size_t i = 0;
const git_remote_head *head;
+ char oid[GIT_OID_MAX_HEXSIZE];
+ git_oid_t oid_type;
+ size_t oid_hexsize, want_len, i = 0;
+
+#ifdef GIT_EXPERIMENTAL_SHA256
+ oid_type = wants->count > 0 ? wants->refs[0]->oid.type : GIT_OID_SHA1;
+#else
+ oid_type = GIT_OID_SHA1;
+#endif
+
+ oid_hexsize = git_oid_hexsize(oid_type);
+
+ want_len = PKT_LEN_SIZE + CONST_STRLEN(PKT_WANT_PREFIX) +
+ oid_hexsize + 1 /* LF */;
if (caps->common) {
for (; i < wants->count; ++i) {
@@ -651,23 +746,24 @@ int git_pkt_buffer_wants(
break;
}
- if (buffer_want_with_caps(wants->refs[i], caps, buf) < 0)
+ if (buffer_want_with_caps(wants->refs[i], caps, oid_type, buf) < 0)
return -1;
i++;
}
for (; i < wants->count; ++i) {
- char oid[GIT_OID_SHA1_HEXSIZE];
-
head = wants->refs[i];
+
if (head->local)
continue;
git_oid_fmt(oid, &head->oid);
- git_str_put(buf, pkt_want_prefix, strlen(pkt_want_prefix));
- git_str_put(buf, oid, GIT_OID_SHA1_HEXSIZE);
- git_str_putc(buf, '\n');
+
+ git_str_printf(buf, "%04x%s%.*s\n",
+ (unsigned int)want_len, PKT_WANT_PREFIX,
+ (int)oid_hexsize, oid);
+
if (git_str_oom(buf))
return -1;
}
@@ -707,14 +803,27 @@ int git_pkt_buffer_wants(
int git_pkt_buffer_have(git_oid *oid, git_str *buf)
{
- char oidhex[GIT_OID_SHA1_HEXSIZE + 1];
-
- memset(oidhex, 0x0, sizeof(oidhex));
- git_oid_fmt(oidhex, oid);
- return git_str_printf(buf, "%s%s\n", pkt_have_prefix, oidhex);
+ char oid_str[GIT_OID_MAX_HEXSIZE];
+ git_oid_t oid_type;
+ size_t oid_hexsize, have_len;
+
+#ifdef GIT_EXPERIMENTAL_SHA256
+ oid_type = oid->type;
+#else
+ oid_type = GIT_OID_SHA1;
+#endif
+
+ oid_hexsize = git_oid_hexsize(oid_type);
+ have_len = PKT_LEN_SIZE + CONST_STRLEN(PKT_HAVE_PREFIX) +
+ oid_hexsize + 1 /* LF */;
+
+ git_oid_fmt(oid_str, oid);
+ return git_str_printf(buf, "%04x%s%.*s\n",
+ (unsigned int)have_len, PKT_HAVE_PREFIX,
+ (int)oid_hexsize, oid_str);
}
int git_pkt_buffer_done(git_str *buf)
{
- return git_str_puts(buf, pkt_done_str);
+ return git_str_put(buf, PKT_DONE_STR, CONST_STRLEN(PKT_DONE_STR));
}
diff --git a/src/libgit2/transports/smart_protocol.c b/src/libgit2/transports/smart_protocol.c
index a44d0c853..2ec390101 100644
--- a/src/libgit2/transports/smart_protocol.c
+++ b/src/libgit2/transports/smart_protocol.c
@@ -32,6 +32,7 @@ int git_smart__store_refs(transport_smart *t, int flushes)
int error, flush = 0, recvd;
const char *line_end = NULL;
git_pkt *pkt = NULL;
+ git_pkt_parse_data pkt_parse_data = { 0 };
size_t i;
/* Clear existing refs in case git_remote_connect() is called again
@@ -45,7 +46,7 @@ int git_smart__store_refs(transport_smart *t, int flushes)
do {
if (buf->offset > 0)
- error = git_pkt_parse_line(&pkt, &line_end, buf->data, buf->offset);
+ error = git_pkt_parse_line(&pkt, &line_end, buf->data, buf->offset, &pkt_parse_data);
else
error = GIT_EBUFS;
@@ -133,9 +134,12 @@ on_invalid:
return -1;
}
-int git_smart__detect_caps(git_pkt_ref *pkt, transport_smart_caps *caps, git_vector *symrefs)
+int git_smart__detect_caps(
+ git_pkt_ref *pkt,
+ transport_smart_caps *caps,
+ git_vector *symrefs)
{
- const char *ptr;
+ const char *ptr, *start;
/* No refs or capabilities, odd but not a problem */
if (pkt == NULL || pkt->capabilities == NULL)
@@ -207,15 +211,38 @@ int git_smart__detect_caps(git_pkt_ref *pkt, transport_smart_caps *caps, git_vec
if (!git__prefixcmp(ptr, GIT_CAP_WANT_TIP_SHA1)) {
caps->common = caps->want_tip_sha1 = 1;
- ptr += strlen(GIT_CAP_DELETE_REFS);
+ ptr += strlen(GIT_CAP_WANT_TIP_SHA1);
continue;
}
if (!git__prefixcmp(ptr, GIT_CAP_WANT_REACHABLE_SHA1)) {
caps->common = caps->want_reachable_sha1 = 1;
- ptr += strlen(GIT_CAP_DELETE_REFS);
+ ptr += strlen(GIT_CAP_WANT_REACHABLE_SHA1);
+ continue;
+ }
+
+ if (!git__prefixcmp(ptr, GIT_CAP_OBJECT_FORMAT)) {
+ ptr += strlen(GIT_CAP_OBJECT_FORMAT);
+
+ start = ptr;
+ ptr = strchr(ptr, ' ');
+
+ if ((caps->object_format = git__strndup(start, (ptr - start))) == NULL)
+ return -1;
+ continue;
+ }
+
+ if (!git__prefixcmp(ptr, GIT_CAP_AGENT)) {
+ ptr += strlen(GIT_CAP_AGENT);
+
+ start = ptr;
+ ptr = strchr(ptr, ' ');
+
+ if ((caps->agent = git__strndup(start, (ptr - start))) == NULL)
+ return -1;
+ continue;
}
-
+
if (!git__prefixcmp(ptr, GIT_CAP_SHALLOW)) {
caps->common = caps->shallow = 1;
ptr += strlen(GIT_CAP_SHALLOW);
@@ -233,11 +260,12 @@ static int recv_pkt(git_pkt **out_pkt, git_pkt_type *out_type, gitno_buffer *buf
{
const char *ptr = buf->data, *line_end = ptr;
git_pkt *pkt = NULL;
+ git_pkt_parse_data pkt_parse_data = { 0 };
int error = 0, ret;
do {
if (buf->offset > 0)
- error = git_pkt_parse_line(&pkt, &line_end, ptr, buf->offset);
+ error = git_pkt_parse_line(&pkt, &line_end, ptr, buf->offset, &pkt_parse_data);
else
error = GIT_EBUFS;
@@ -779,6 +807,7 @@ static int add_push_report_pkt(git_push *push, git_pkt *pkt)
static int add_push_report_sideband_pkt(git_push *push, git_pkt_data *data_pkt, git_str *data_pkt_buf)
{
git_pkt *pkt;
+ git_pkt_parse_data pkt_parse_data = { 0 };
const char *line, *line_end = NULL;
size_t line_len;
int error;
@@ -797,7 +826,7 @@ static int add_push_report_sideband_pkt(git_push *push, git_pkt_data *data_pkt,
}
while (line_len > 0) {
- error = git_pkt_parse_line(&pkt, &line_end, line, line_len);
+ error = git_pkt_parse_line(&pkt, &line_end, line, line_len, &pkt_parse_data);
if (error == GIT_EBUFS) {
/* Buffer the data when the inner packet is split
@@ -833,6 +862,7 @@ done:
static int parse_report(transport_smart *transport, git_push *push)
{
git_pkt *pkt = NULL;
+ git_pkt_parse_data pkt_parse_data = { 0 };
const char *line_end = NULL;
gitno_buffer *buf = &transport->buffer;
int error, recvd;
@@ -841,7 +871,8 @@ static int parse_report(transport_smart *transport, git_push *push)
for (;;) {
if (buf->offset > 0)
error = git_pkt_parse_line(&pkt, &line_end,
- buf->data, buf->offset);
+ buf->data, buf->offset,
+ &pkt_parse_data);
else
error = GIT_EBUFS;
diff --git a/src/libgit2/transports/ssh.c b/src/libgit2/transports/ssh.c
index 89f085230..5500ea100 100644
--- a/src/libgit2/transports/ssh.c
+++ b/src/libgit2/transports/ssh.c
@@ -16,6 +16,7 @@
#include "netops.h"
#include "smart.h"
#include "streams/socket.h"
+#include "sysdir.h"
#include "git2/credential.h"
#include "git2/sys/credential.h"
@@ -245,8 +246,10 @@ static int ssh_agent_auth(LIBSSH2_SESSION *session, git_credential_ssh_key *c) {
rc = libssh2_agent_connect(agent);
- if (rc != LIBSSH2_ERROR_NONE)
+ if (rc != LIBSSH2_ERROR_NONE) {
+ rc = LIBSSH2_ERROR_AUTHENTICATION_FAILED;
goto shutdown;
+ }
rc = libssh2_agent_list_identities(agent);
@@ -421,15 +424,116 @@ static int request_creds(git_credential **out, ssh_subtransport *t, const char *
return 0;
}
+#define SSH_DIR ".ssh"
+#define KNOWN_HOSTS_FILE "known_hosts"
+
+/*
+ * Load the known_hosts file.
+ *
+ * Returns success but leaves the output NULL if we couldn't find the file.
+ */
+static int load_known_hosts(LIBSSH2_KNOWNHOSTS **hosts, LIBSSH2_SESSION *session)
+{
+ git_str path = GIT_STR_INIT, sshdir = GIT_STR_INIT;
+ LIBSSH2_KNOWNHOSTS *known_hosts = NULL;
+ int error;
+
+ GIT_ASSERT_ARG(hosts);
+
+ if ((error = git_sysdir_expand_homedir_file(&sshdir, SSH_DIR)) < 0 ||
+ (error = git_str_joinpath(&path, git_str_cstr(&sshdir), KNOWN_HOSTS_FILE)) < 0)
+ goto out;
+
+ if ((known_hosts = libssh2_knownhost_init(session)) == NULL) {
+ ssh_error(session, "error initializing known hosts");
+ error = -1;
+ goto out;
+ }
+
+ /*
+ * Try to read the file and consider not finding it as not trusting the
+ * host rather than an error.
+ */
+ error = libssh2_knownhost_readfile(known_hosts, git_str_cstr(&path), LIBSSH2_KNOWNHOST_FILE_OPENSSH);
+ if (error == LIBSSH2_ERROR_FILE)
+ error = 0;
+ if (error < 0)
+ ssh_error(session, "error reading known_hosts");
+
+out:
+ *hosts = known_hosts;
+
+ git_str_dispose(&sshdir);
+ git_str_dispose(&path);
+
+ return error;
+}
+
+static void add_hostkey_pref_if_avail(
+ LIBSSH2_KNOWNHOSTS *known_hosts,
+ const char *hostname,
+ int port,
+ git_str *prefs,
+ int type,
+ const char *type_name)
+{
+ struct libssh2_knownhost *host = NULL;
+ const char key = '\0';
+ int mask = LIBSSH2_KNOWNHOST_TYPE_PLAIN | LIBSSH2_KNOWNHOST_KEYENC_RAW | type;
+ int error;
+
+ error = libssh2_knownhost_checkp(known_hosts, hostname, port, &key, 1, mask, &host);
+ if (error == LIBSSH2_KNOWNHOST_CHECK_MISMATCH) {
+ if (git_str_len(prefs) > 0) {
+ git_str_putc(prefs, ',');
+ }
+ git_str_puts(prefs, type_name);
+ }
+}
+
+/*
+ * We figure out what kind of key we want to ask the remote for by trying to
+ * look it up with a nonsense key and using that mismatch to figure out what key
+ * we do have stored for the host.
+ *
+ * Populates prefs with the string to pass to libssh2_session_method_pref.
+ */
+static void find_hostkey_preference(
+ LIBSSH2_KNOWNHOSTS *known_hosts,
+ const char *hostname,
+ int port,
+ git_str *prefs)
+{
+ /*
+ * The order here is important as it indicates the priority of what will
+ * be preferred.
+ */
+#ifdef LIBSSH2_KNOWNHOST_KEY_ED25519
+ add_hostkey_pref_if_avail(known_hosts, hostname, port, prefs, LIBSSH2_KNOWNHOST_KEY_ED25519, "ssh-ed25519");
+#endif
+#ifdef LIBSSH2_KNOWNHOST_KEY_ECDSA_256
+ add_hostkey_pref_if_avail(known_hosts, hostname, port, prefs, LIBSSH2_KNOWNHOST_KEY_ECDSA_256, "ecdsa-sha2-nistp256");
+ add_hostkey_pref_if_avail(known_hosts, hostname, port, prefs, LIBSSH2_KNOWNHOST_KEY_ECDSA_384, "ecdsa-sha2-nistp384");
+ add_hostkey_pref_if_avail(known_hosts, hostname, port, prefs, LIBSSH2_KNOWNHOST_KEY_ECDSA_521, "ecdsa-sha2-nistp521");
+#endif
+ add_hostkey_pref_if_avail(known_hosts, hostname, port, prefs, LIBSSH2_KNOWNHOST_KEY_SSHRSA, "ssh-rsa");
+}
+
static int _git_ssh_session_create(
LIBSSH2_SESSION **session,
+ LIBSSH2_KNOWNHOSTS **hosts,
+ const char *hostname,
+ int port,
git_stream *io)
{
- int rc = 0;
- LIBSSH2_SESSION *s;
git_socket_stream *socket = GIT_CONTAINER_OF(io, git_socket_stream, parent);
+ LIBSSH2_SESSION *s;
+ LIBSSH2_KNOWNHOSTS *known_hosts;
+ git_str prefs = GIT_STR_INIT;
+ int rc = 0;
GIT_ASSERT_ARG(session);
+ GIT_ASSERT_ARG(hosts);
s = libssh2_session_init();
if (!s) {
@@ -437,150 +541,276 @@ static int _git_ssh_session_create(
return -1;
}
+ if ((rc = load_known_hosts(&known_hosts, s)) < 0) {
+ ssh_error(s, "error loading known_hosts");
+ libssh2_session_free(s);
+ return -1;
+ }
+
+ find_hostkey_preference(known_hosts, hostname, port, &prefs);
+ if (git_str_len(&prefs) > 0) {
+ do {
+ rc = libssh2_session_method_pref(s, LIBSSH2_METHOD_HOSTKEY, git_str_cstr(&prefs));
+ } while (LIBSSH2_ERROR_EAGAIN == rc || LIBSSH2_ERROR_TIMEOUT == rc);
+ if (rc != LIBSSH2_ERROR_NONE) {
+ ssh_error(s, "failed to set hostkey preference");
+ goto on_error;
+ }
+ }
+ git_str_dispose(&prefs);
+
do {
rc = libssh2_session_handshake(s, socket->s);
} while (LIBSSH2_ERROR_EAGAIN == rc || LIBSSH2_ERROR_TIMEOUT == rc);
if (rc != LIBSSH2_ERROR_NONE) {
ssh_error(s, "failed to start SSH session");
- libssh2_session_free(s);
- return -1;
+ goto on_error;
}
libssh2_session_set_blocking(s, 1);
*session = s;
+ *hosts = known_hosts;
return 0;
+
+on_error:
+ libssh2_knownhost_free(known_hosts);
+ libssh2_session_free(s);
+ return -1;
}
-#define SSH_DEFAULT_PORT "22"
-static int _git_ssh_setup_conn(
- ssh_subtransport *t,
- const char *url,
- const char *cmd,
- git_smart_subtransport_stream **stream)
+/*
+ * Returns the typemask argument to pass to libssh2_knownhost_check{,p} based on
+ * the type of key that libssh2_session_hostkey returns.
+ */
+static int fingerprint_type_mask(int keytype)
{
- int auth_methods, error = 0;
- ssh_stream *s;
- git_credential *cred = NULL;
- LIBSSH2_SESSION *session=NULL;
- LIBSSH2_CHANNEL *channel=NULL;
+ int mask = LIBSSH2_KNOWNHOST_TYPE_PLAIN | LIBSSH2_KNOWNHOST_KEYENC_RAW;
+ return mask;
+
+ switch (keytype) {
+ case LIBSSH2_HOSTKEY_TYPE_RSA:
+ mask |= LIBSSH2_KNOWNHOST_KEY_SSHRSA;
+ break;
+ case LIBSSH2_HOSTKEY_TYPE_DSS:
+ mask |= LIBSSH2_KNOWNHOST_KEY_SSHDSS;
+ break;
+#ifdef LIBSSH2_HOSTKEY_TYPE_ECDSA_256
+ case LIBSSH2_HOSTKEY_TYPE_ECDSA_256:
+ mask |= LIBSSH2_KNOWNHOST_KEY_ECDSA_256;
+ break;
+ case LIBSSH2_HOSTKEY_TYPE_ECDSA_384:
+ mask |= LIBSSH2_KNOWNHOST_KEY_ECDSA_384;
+ break;
+ case LIBSSH2_HOSTKEY_TYPE_ECDSA_521:
+ mask |= LIBSSH2_KNOWNHOST_KEY_ECDSA_521;
+ break;
+#endif
+#ifdef LIBSSH2_HOSTKEY_TYPE_ED25519
+ case LIBSSH2_HOSTKEY_TYPE_ED25519:
+ mask |= LIBSSH2_KNOWNHOST_KEY_ED25519;
+ break;
+#endif
+ }
- t->current_stream = NULL;
+ return mask;
+}
- *stream = NULL;
- if (ssh_stream_alloc(t, cmd, stream) < 0)
+/*
+ * Check the host against the user's known_hosts file.
+ *
+ * Returns 1/0 for valid/''not-valid or <0 for an error
+ */
+static int check_against_known_hosts(
+ LIBSSH2_SESSION *session,
+ LIBSSH2_KNOWNHOSTS *known_hosts,
+ const char *hostname,
+ int port,
+ const char *key,
+ size_t key_len,
+ int key_type)
+{
+ int check, typemask, ret = 0;
+ struct libssh2_knownhost *host = NULL;
+
+ if (known_hosts == NULL)
+ return 0;
+
+ typemask = fingerprint_type_mask(key_type);
+ check = libssh2_knownhost_checkp(known_hosts, hostname, port, key, key_len, typemask, &host);
+ if (check == LIBSSH2_KNOWNHOST_CHECK_FAILURE) {
+ ssh_error(session, "error checking for known host");
return -1;
+ }
- s = (ssh_stream *)*stream;
- s->session = NULL;
- s->channel = NULL;
+ ret = check == LIBSSH2_KNOWNHOST_CHECK_MATCH ? 1 : 0;
- if (git_net_str_is_url(url))
- error = git_net_url_parse(&s->url, url);
- else
- error = git_net_url_parse_scp(&s->url, url);
+ return ret;
+}
- if (error < 0)
- goto done;
+/*
+ * Perform the check for the session's certificate against known hosts if
+ * possible and then ask the user if they have a callback.
+ *
+ * Returns 1/0 for valid/not-valid or <0 for an error
+ */
+static int check_certificate(
+ LIBSSH2_SESSION *session,
+ LIBSSH2_KNOWNHOSTS *known_hosts,
+ git_transport_certificate_check_cb check_cb,
+ void *check_cb_payload,
+ const char *host,
+ int port)
+{
+ git_cert_hostkey cert = {{ 0 }};
+ const char *key;
+ size_t cert_len;
+ int cert_type, cert_valid = 0, error = 0;
- if ((error = git_socket_stream_new(&s->io, s->url.host, s->url.port)) < 0 ||
- (error = git_stream_connect(s->io)) < 0)
- goto done;
+ if ((key = libssh2_session_hostkey(session, &cert_len, &cert_type)) == NULL) {
+ ssh_error(session, "failed to retrieve hostkey");
+ return -1;
+ }
- if ((error = _git_ssh_session_create(&session, s->io)) < 0)
- goto done;
+ if ((cert_valid = check_against_known_hosts(session, known_hosts, host, port, key, cert_len, cert_type)) < 0)
+ return -1;
- if (t->owner->connect_opts.callbacks.certificate_check != NULL) {
- git_cert_hostkey cert = {{ 0 }}, *cert_ptr;
- const char *key;
- size_t cert_len;
- int cert_type;
-
- cert.parent.cert_type = GIT_CERT_HOSTKEY_LIBSSH2;
-
- key = libssh2_session_hostkey(session, &cert_len, &cert_type);
- if (key != NULL) {
- cert.type |= GIT_CERT_SSH_RAW;
- cert.hostkey = key;
- cert.hostkey_len = cert_len;
- switch (cert_type) {
- case LIBSSH2_HOSTKEY_TYPE_RSA:
- cert.raw_type = GIT_CERT_SSH_RAW_TYPE_RSA;
- break;
- case LIBSSH2_HOSTKEY_TYPE_DSS:
- cert.raw_type = GIT_CERT_SSH_RAW_TYPE_DSS;
- break;
+ cert.parent.cert_type = GIT_CERT_HOSTKEY_LIBSSH2;
+ if (key != NULL) {
+ cert.type |= GIT_CERT_SSH_RAW;
+ cert.hostkey = key;
+ cert.hostkey_len = cert_len;
+ switch (cert_type) {
+ case LIBSSH2_HOSTKEY_TYPE_RSA:
+ cert.raw_type = GIT_CERT_SSH_RAW_TYPE_RSA;
+ break;
+ case LIBSSH2_HOSTKEY_TYPE_DSS:
+ cert.raw_type = GIT_CERT_SSH_RAW_TYPE_DSS;
+ break;
#ifdef LIBSSH2_HOSTKEY_TYPE_ECDSA_256
- case LIBSSH2_HOSTKEY_TYPE_ECDSA_256:
- cert.raw_type = GIT_CERT_SSH_RAW_TYPE_KEY_ECDSA_256;
- break;
- case LIBSSH2_HOSTKEY_TYPE_ECDSA_384:
- cert.raw_type = GIT_CERT_SSH_RAW_TYPE_KEY_ECDSA_384;
- break;
- case LIBSSH2_KNOWNHOST_KEY_ECDSA_521:
- cert.raw_type = GIT_CERT_SSH_RAW_TYPE_KEY_ECDSA_521;
- break;
+ case LIBSSH2_HOSTKEY_TYPE_ECDSA_256:
+ cert.raw_type = GIT_CERT_SSH_RAW_TYPE_KEY_ECDSA_256;
+ break;
+ case LIBSSH2_HOSTKEY_TYPE_ECDSA_384:
+ cert.raw_type = GIT_CERT_SSH_RAW_TYPE_KEY_ECDSA_384;
+ break;
+ case LIBSSH2_KNOWNHOST_KEY_ECDSA_521:
+ cert.raw_type = GIT_CERT_SSH_RAW_TYPE_KEY_ECDSA_521;
+ break;
#endif
#ifdef LIBSSH2_HOSTKEY_TYPE_ED25519
- case LIBSSH2_HOSTKEY_TYPE_ED25519:
- cert.raw_type = GIT_CERT_SSH_RAW_TYPE_KEY_ED25519;
- break;
+ case LIBSSH2_HOSTKEY_TYPE_ED25519:
+ cert.raw_type = GIT_CERT_SSH_RAW_TYPE_KEY_ED25519;
+ break;
#endif
- default:
- cert.raw_type = GIT_CERT_SSH_RAW_TYPE_UNKNOWN;
- }
+ default:
+ cert.raw_type = GIT_CERT_SSH_RAW_TYPE_UNKNOWN;
}
+ }
#ifdef LIBSSH2_HOSTKEY_HASH_SHA256
- key = libssh2_hostkey_hash(session, LIBSSH2_HOSTKEY_HASH_SHA256);
- if (key != NULL) {
- cert.type |= GIT_CERT_SSH_SHA256;
- memcpy(&cert.hash_sha256, key, 32);
- }
+ key = libssh2_hostkey_hash(session, LIBSSH2_HOSTKEY_HASH_SHA256);
+ if (key != NULL) {
+ cert.type |= GIT_CERT_SSH_SHA256;
+ memcpy(&cert.hash_sha256, key, 32);
+ }
#endif
- key = libssh2_hostkey_hash(session, LIBSSH2_HOSTKEY_HASH_SHA1);
- if (key != NULL) {
- cert.type |= GIT_CERT_SSH_SHA1;
- memcpy(&cert.hash_sha1, key, 20);
- }
+ key = libssh2_hostkey_hash(session, LIBSSH2_HOSTKEY_HASH_SHA1);
+ if (key != NULL) {
+ cert.type |= GIT_CERT_SSH_SHA1;
+ memcpy(&cert.hash_sha1, key, 20);
+ }
- key = libssh2_hostkey_hash(session, LIBSSH2_HOSTKEY_HASH_MD5);
- if (key != NULL) {
- cert.type |= GIT_CERT_SSH_MD5;
- memcpy(&cert.hash_md5, key, 16);
- }
+ key = libssh2_hostkey_hash(session, LIBSSH2_HOSTKEY_HASH_MD5);
+ if (key != NULL) {
+ cert.type |= GIT_CERT_SSH_MD5;
+ memcpy(&cert.hash_md5, key, 16);
+ }
- if (cert.type == 0) {
- git_error_set(GIT_ERROR_SSH, "unable to get the host key");
- error = -1;
- goto done;
+ if (cert.type == 0) {
+ git_error_set(GIT_ERROR_SSH, "unable to get the host key");
+ return -1;
+ }
+
+ git_error_clear();
+ error = 0;
+ if (!cert_valid) {
+ git_error_set(GIT_ERROR_SSH, "invalid or unknown remote ssh hostkey");
+ error = GIT_ECERTIFICATE;
+ }
+
+ if (check_cb != NULL) {
+ git_cert_hostkey *cert_ptr = &cert;
+ git_error_state previous_error = {0};
+
+ git_error_state_capture(&previous_error, error);
+ error = check_cb((git_cert *) cert_ptr, cert_valid, host, check_cb_payload);
+ if (error == GIT_PASSTHROUGH) {
+ error = git_error_state_restore(&previous_error);
+ } else if (error < 0 && !git_error_last()) {
+ git_error_set(GIT_ERROR_NET, "unknown remote host key");
}
- /* We don't currently trust any hostkeys */
- git_error_clear();
+ git_error_state_free(&previous_error);
+ }
- cert_ptr = &cert;
+ return error;
+}
- error = t->owner->connect_opts.callbacks.certificate_check(
- (git_cert *)cert_ptr,
- 0,
- s->url.host,
- t->owner->connect_opts.callbacks.payload);
+#define SSH_DEFAULT_PORT "22"
- if (error < 0 && error != GIT_PASSTHROUGH) {
- if (!git_error_last())
- git_error_set(GIT_ERROR_NET, "user cancelled hostkey check");
+static int _git_ssh_setup_conn(
+ ssh_subtransport *t,
+ const char *url,
+ const char *cmd,
+ git_smart_subtransport_stream **stream)
+{
+ int auth_methods, error = 0, port;
+ ssh_stream *s;
+ git_credential *cred = NULL;
+ LIBSSH2_SESSION *session=NULL;
+ LIBSSH2_CHANNEL *channel=NULL;
+ LIBSSH2_KNOWNHOSTS *known_hosts = NULL;
- goto done;
- }
+ t->current_stream = NULL;
+
+ *stream = NULL;
+ if (ssh_stream_alloc(t, cmd, stream) < 0)
+ return -1;
+
+ s = (ssh_stream *)*stream;
+ s->session = NULL;
+ s->channel = NULL;
+
+ if ((error = git_net_url_parse_standard_or_scp(&s->url, url)) < 0 ||
+ (error = git_socket_stream_new(&s->io, s->url.host, s->url.port)) < 0 ||
+ (error = git_stream_connect(s->io)) < 0)
+ goto done;
+
+ /*
+ * Try to parse the port as a number, if we can't then fall back to
+ * default. It would be nice if we could get the port that was resolved
+ * as part of the stream connection, but that's not something that's
+ * exposed.
+ */
+ if (git__strntol32(&port, s->url.port, strlen(s->url.port), NULL, 10) < 0) {
+ git_error_set(GIT_ERROR_NET, "invalid port to ssh: %s", s->url.port);
+ error = -1;
+ goto done;
}
+ if ((error = _git_ssh_session_create(&session, &known_hosts, s->url.host, port, s->io)) < 0)
+ goto done;
+
+ if ((error = check_certificate(session, known_hosts, t->owner->connect_opts.callbacks.certificate_check, t->owner->connect_opts.callbacks.payload, s->url.host, port)) < 0)
+ goto done;
+
/* we need the username to ask for auth methods */
if (!s->url.username) {
if ((error = request_creds(&cred, t, NULL, GIT_CREDENTIAL_USERNAME)) < 0)
@@ -651,6 +881,8 @@ done:
if (error < 0) {
ssh_stream_free(*stream);
+ if (known_hosts)
+ libssh2_knownhost_free(known_hosts);
if (session)
libssh2_session_free(session);
}
@@ -774,7 +1006,7 @@ static int list_auth_methods(int *out, LIBSSH2_SESSION *session, const char *use
/* either error, or the remote accepts NONE auth, which is bizarre, let's punt */
if (list == NULL && !libssh2_userauth_authenticated(session)) {
- ssh_error(session, "Failed to retrieve list of SSH authentication methods");
+ ssh_error(session, "remote rejected authentication");
return GIT_EAUTH;
}
diff --git a/src/libgit2/transports/winhttp.c b/src/libgit2/transports/winhttp.c
index 8ec5b37c5..098227607 100644
--- a/src/libgit2/transports/winhttp.c
+++ b/src/libgit2/transports/winhttp.c
@@ -562,18 +562,23 @@ static int winhttp_stream_connect(winhttp_stream *s)
for (i = 0; i < t->owner->connect_opts.custom_headers.count; i++) {
if (t->owner->connect_opts.custom_headers.strings[i]) {
+ wchar_t *custom_header_wide = NULL;
+
git_str_clear(&buf);
git_str_puts(&buf, t->owner->connect_opts.custom_headers.strings[i]);
- if (git__utf8_to_16(ct, MAX_CONTENT_TYPE_LEN, git_str_cstr(&buf)) < 0) {
- git_error_set(GIT_ERROR_OS, "failed to convert custom header to wide characters");
+
+ /* Convert header to wide characters */
+ if ((error = git__utf8_to_16_alloc(&custom_header_wide, git_str_cstr(&buf))) < 0)
goto on_error;
- }
- if (!WinHttpAddRequestHeaders(s->request, ct, (ULONG)-1L,
+ if (!WinHttpAddRequestHeaders(s->request, custom_header_wide, (ULONG)-1L,
WINHTTP_ADDREQ_FLAG_ADD | WINHTTP_ADDREQ_FLAG_REPLACE)) {
git_error_set(GIT_ERROR_OS, "failed to add a header to the request");
+ git__free(custom_header_wide);
goto on_error;
}
+
+ git__free(custom_header_wide);
}
}
diff --git a/src/libgit2/tree.c b/src/libgit2/tree.c
index 9a43d585c..9293d9422 100644
--- a/src/libgit2/tree.c
+++ b/src/libgit2/tree.c
@@ -85,11 +85,17 @@ static git_tree_entry *alloc_entry(const char *filename, size_t filename_len, co
char *filename_ptr;
size_t tree_len;
+#ifdef GIT_EXPERIMENTAL_SHA256
+ size_t oid_size = git_oid_size(id->type);
+#else
+ size_t oid_size = GIT_OID_SHA1_SIZE;
+#endif
+
TREE_ENTRY_CHECK_NAMELEN(filename_len);
if (GIT_ADD_SIZET_OVERFLOW(&tree_len, sizeof(git_tree_entry), filename_len) ||
GIT_ADD_SIZET_OVERFLOW(&tree_len, tree_len, 1) ||
- GIT_ADD_SIZET_OVERFLOW(&tree_len, tree_len, GIT_OID_SHA1_SIZE))
+ GIT_ADD_SIZET_OVERFLOW(&tree_len, tree_len, oid_size))
return NULL;
entry = git__calloc(1, tree_len);
@@ -383,11 +389,12 @@ static int parse_mode(uint16_t *mode_out, const char *buffer, size_t buffer_len,
return 0;
}
-int git_tree__parse_raw(void *_tree, const char *data, size_t size)
+int git_tree__parse_raw(void *_tree, const char *data, size_t size, git_oid_t oid_type)
{
git_tree *tree = _tree;
const char *buffer;
const char *buffer_end;
+ const long oid_size = (long)git_oid_size(oid_type);
buffer = data;
buffer_end = buffer + size;
@@ -414,35 +421,33 @@ int git_tree__parse_raw(void *_tree, const char *data, size_t size)
if ((filename_len = nul - buffer) == 0 || filename_len > UINT16_MAX)
return tree_parse_error("failed to parse tree: can't parse filename", NULL);
- if ((buffer_end - (nul + 1)) < GIT_OID_SHA1_SIZE)
+ if ((buffer_end - (nul + 1)) < (long)oid_size)
return tree_parse_error("failed to parse tree: can't parse OID", NULL);
/* Allocate the entry */
- {
- entry = git_array_alloc(tree->entries);
- GIT_ERROR_CHECK_ALLOC(entry);
-
- entry->attr = attr;
- entry->filename_len = (uint16_t)filename_len;
- entry->filename = buffer;
- git_oid__fromraw(&entry->oid, ((unsigned char *) buffer + filename_len + 1), GIT_OID_SHA1);
- }
+ entry = git_array_alloc(tree->entries);
+ GIT_ERROR_CHECK_ALLOC(entry);
+ entry->attr = attr;
+ entry->filename_len = (uint16_t)filename_len;
+ entry->filename = buffer;
buffer += filename_len + 1;
- buffer += GIT_OID_SHA1_SIZE;
+
+ git_oid__fromraw(&entry->oid, (unsigned char *)buffer, oid_type);
+ buffer += oid_size;
}
return 0;
}
-int git_tree__parse(void *_tree, git_odb_object *odb_obj)
+int git_tree__parse(void *_tree, git_odb_object *odb_obj, git_oid_t oid_type)
{
git_tree *tree = _tree;
const char *data = git_odb_object_data(odb_obj);
size_t size = git_odb_object_size(odb_obj);
int error;
- if ((error = git_tree__parse_raw(tree, data, size)) < 0 ||
+ if ((error = git_tree__parse_raw(tree, data, size, oid_type)) < 0 ||
(error = git_odb_object_dup(&tree->odb_obj, odb_obj)) < 0)
return error;
@@ -506,6 +511,7 @@ static int git_treebuilder__write_with_buffer(
git_odb *odb;
git_tree_entry *entry;
git_vector entries = GIT_VECTOR_INIT;
+ size_t oid_size = git_oid_size(bld->repo->oid_type);
git_str_clear(buf);
@@ -529,7 +535,7 @@ static int git_treebuilder__write_with_buffer(
git_str_printf(buf, "%o ", entry->attr);
git_str_put(buf, entry->filename, entry->filename_len + 1);
- git_str_put(buf, (char *)entry->oid.id, GIT_OID_SHA1_SIZE);
+ git_str_put(buf, (char *)entry->oid.id, oid_size);
if (git_str_oom(buf)) {
error = -1;
diff --git a/src/libgit2/tree.h b/src/libgit2/tree.h
index 0dd963ff2..5088450ab 100644
--- a/src/libgit2/tree.h
+++ b/src/libgit2/tree.h
@@ -41,8 +41,8 @@ GIT_INLINE(bool) git_tree_entry__is_tree(const struct git_tree_entry *e)
}
void git_tree__free(void *tree);
-int git_tree__parse(void *tree, git_odb_object *obj);
-int git_tree__parse_raw(void *_tree, const char *data, size_t size);
+int git_tree__parse(void *tree, git_odb_object *obj, git_oid_t oid_type);
+int git_tree__parse_raw(void *_tree, const char *data, size_t size, git_oid_t oid_type);
/**
* Write a tree to the given repository
diff --git a/src/libgit2/worktree.c b/src/libgit2/worktree.c
index 2ac2274f1..82e1d2d7e 100644
--- a/src/libgit2/worktree.c
+++ b/src/libgit2/worktree.c
@@ -187,6 +187,11 @@ int git_worktree_lookup(git_worktree **out, git_repository *repo, const char *na
if ((error = git_str_join3(&path, '/', repo->commondir, "worktrees", name)) < 0)
goto out;
+ if (!git_fs_path_isdir(path.ptr)) {
+ error = GIT_ENOTFOUND;
+ goto out;
+ }
+
if ((error = (open_worktree_dir(out, git_repository_workdir(repo), path.ptr, name))) < 0)
goto out;
diff --git a/src/util/CMakeLists.txt b/src/util/CMakeLists.txt
index b12ce409b..2207041ef 100644
--- a/src/util/CMakeLists.txt
+++ b/src/util/CMakeLists.txt
@@ -38,6 +38,7 @@ if(USE_SHA1 STREQUAL "CollisionDetection")
target_compile_definitions(util PRIVATE SHA1DC_CUSTOM_INCLUDE_SHA1_C=\"git2_util.h\")
target_compile_definitions(util PRIVATE SHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C=\"git2_util.h\")
elseif(USE_SHA1 STREQUAL "OpenSSL" OR USE_SHA1 STREQUAL "OpenSSL-Dynamic")
+ add_definitions(-DOPENSSL_API_COMPAT=0x10100000L)
file(GLOB UTIL_SRC_SHA1 hash/openssl.*)
elseif(USE_SHA1 STREQUAL "CommonCrypto")
file(GLOB UTIL_SRC_SHA1 hash/common_crypto.*)
@@ -54,6 +55,7 @@ list(SORT UTIL_SRC_SHA1)
if(USE_SHA256 STREQUAL "Builtin")
file(GLOB UTIL_SRC_SHA256 hash/builtin.* hash/rfc6234/*)
elseif(USE_SHA256 STREQUAL "OpenSSL" OR USE_SHA256 STREQUAL "OpenSSL-Dynamic")
+ add_definitions(-DOPENSSL_API_COMPAT=0x10100000L)
file(GLOB UTIL_SRC_SHA256 hash/openssl.*)
elseif(USE_SHA256 STREQUAL "CommonCrypto")
file(GLOB UTIL_SRC_SHA256 hash/common_crypto.*)
diff --git a/src/util/fs_path.c b/src/util/fs_path.c
index 6c87bfd01..b52867e77 100644
--- a/src/util/fs_path.c
+++ b/src/util/fs_path.c
@@ -1855,7 +1855,7 @@ static int file_owner_sid(PSID *out, const char *path)
PSECURITY_DESCRIPTOR descriptor = NULL;
PSID owner_sid;
DWORD ret;
- int error = -1;
+ int error = GIT_EINVALID;
if (git_win32_path_from_utf8(path_w32, path) < 0)
return -1;
diff --git a/src/util/futils.c b/src/util/futils.c
index cb872de09..084f1cd28 100644
--- a/src/util/futils.c
+++ b/src/util/futils.c
@@ -13,9 +13,6 @@
#include "rand.h"
#include <ctype.h>
-#if GIT_WIN32
-#include "win32/findfile.h"
-#endif
#define GIT_FILEMODE_DEFAULT 0100666
diff --git a/src/util/hash.h b/src/util/hash.h
index 387c5a66f..21fcaf045 100644
--- a/src/util/hash.h
+++ b/src/util/hash.h
@@ -23,6 +23,8 @@ typedef enum {
GIT_HASH_ALGORITHM_SHA256
} git_hash_algorithm_t;
+#define GIT_HASH_MAX_SIZE GIT_HASH_SHA256_SIZE
+
typedef struct git_hash_ctx {
union {
git_hash_sha1_ctx sha1;
@@ -45,4 +47,15 @@ int git_hash_vec(unsigned char *out, git_str_vec *vec, size_t n, git_hash_algori
int git_hash_fmt(char *out, unsigned char *hash, size_t hash_len);
+GIT_INLINE(size_t) git_hash_size(git_hash_algorithm_t algorithm) {
+ switch (algorithm) {
+ case GIT_HASH_ALGORITHM_SHA1:
+ return GIT_HASH_SHA1_SIZE;
+ case GIT_HASH_ALGORITHM_SHA256:
+ return GIT_HASH_SHA256_SIZE;
+ default:
+ return 0;
+ }
+}
+
#endif
diff --git a/src/util/hash/openssl.c b/src/util/hash/openssl.c
index 649358ca2..eaf91e74c 100644
--- a/src/util/hash/openssl.c
+++ b/src/util/hash/openssl.c
@@ -10,8 +10,8 @@
#ifdef GIT_OPENSSL_DYNAMIC
# include <dlfcn.h>
-int handle_count;
-void *openssl_handle;
+static int handle_count;
+static void *openssl_handle;
static int git_hash_openssl_global_shutdown(void)
{
@@ -30,7 +30,8 @@ static int git_hash_openssl_global_init(void)
(openssl_handle = dlopen("libssl.1.1.dylib", RTLD_NOW)) == NULL &&
(openssl_handle = dlopen("libssl.so.1.0.0", RTLD_NOW)) == NULL &&
(openssl_handle = dlopen("libssl.1.0.0.dylib", RTLD_NOW)) == NULL &&
- (openssl_handle = dlopen("libssl.so.10", RTLD_NOW)) == NULL) {
+ (openssl_handle = dlopen("libssl.so.10", RTLD_NOW)) == NULL &&
+ (openssl_handle = dlopen("libssl.so.3", RTLD_NOW)) == NULL) {
git_error_set(GIT_ERROR_SSL, "could not load ssl libraries");
return -1;
}
diff --git a/src/util/hash/rfc6234/sha.h b/src/util/hash/rfc6234/sha.h
index e0c400ca1..0fbcc50d3 100644
--- a/src/util/hash/rfc6234/sha.h
+++ b/src/util/hash/rfc6234/sha.h
@@ -192,49 +192,6 @@ typedef struct SHA256Context SHA224Context;
typedef struct SHA512Context SHA384Context;
/*
- * This structure holds context information for all SHA
- * hashing operations.
- */
-typedef struct USHAContext {
- int whichSha; /* which SHA is being used */
- union {
- SHA1Context sha1Context;
- SHA224Context sha224Context; SHA256Context sha256Context;
- SHA384Context sha384Context; SHA512Context sha512Context;
- } ctx;
-} USHAContext;
-
-/*
- * This structure will hold context information for the HMAC
- * keyed-hashing operation.
- */
-typedef struct HMACContext {
- int whichSha; /* which SHA is being used */
- int hashSize; /* hash size of SHA being used */
- int blockSize; /* block size of SHA being used */
- USHAContext shaContext; /* SHA context */
- unsigned char k_opad[USHA_Max_Message_Block_Size];
- /* outer padding - key XORd with opad */
- int Computed; /* Is the MAC computed? */
- int Corrupted; /* Cumulative corruption code */
-
-} HMACContext;
-
-/*
- * This structure will hold context information for the HKDF
- * extract-and-expand Key Derivation Functions.
- */
-typedef struct HKDFContext {
- int whichSha; /* which SHA is being used */
- HMACContext hmacContext;
- int hashSize; /* hash size of SHA being used */
- unsigned char prk[USHAMaxHashSize];
- /* pseudo-random key - output of hkdfInput */
- int Computed; /* Is the key material computed? */
- int Corrupted; /* Cumulative corruption code */
-} HKDFContext;
-
-/*
* Function Prototypes
*/
@@ -283,73 +240,4 @@ extern int SHA512FinalBits(SHA512Context *, uint8_t bits,
extern int SHA512Result(SHA512Context *,
uint8_t Message_Digest[SHA512HashSize]);
-/* Unified SHA functions, chosen by whichSha */
-extern int USHAReset(USHAContext *context, SHAversion whichSha);
-extern int USHAInput(USHAContext *context,
- const uint8_t *bytes, unsigned int bytecount);
-extern int USHAFinalBits(USHAContext *context,
- uint8_t bits, unsigned int bit_count);
-extern int USHAResult(USHAContext *context,
- uint8_t Message_Digest[USHAMaxHashSize]);
-extern int USHABlockSize(enum SHAversion whichSha);
-extern int USHAHashSize(enum SHAversion whichSha);
-extern int USHAHashSizeBits(enum SHAversion whichSha);
-extern const char *USHAHashName(enum SHAversion whichSha);
-
-/*
- * HMAC Keyed-Hashing for Message Authentication, RFC 2104,
- * for all SHAs.
- * This interface allows a fixed-length text input to be used.
- */
-extern int hmac(SHAversion whichSha, /* which SHA algorithm to use */
- const unsigned char *text, /* pointer to data stream */
- int text_len, /* length of data stream */
- const unsigned char *key, /* pointer to authentication key */
- int key_len, /* length of authentication key */
- uint8_t digest[USHAMaxHashSize]); /* caller digest to fill in */
-
-/*
- * HMAC Keyed-Hashing for Message Authentication, RFC 2104,
- * for all SHAs.
- * This interface allows any length of text input to be used.
- */
-extern int hmacReset(HMACContext *context, enum SHAversion whichSha,
- const unsigned char *key, int key_len);
-extern int hmacInput(HMACContext *context, const unsigned char *text,
- int text_len);
-extern int hmacFinalBits(HMACContext *context, uint8_t bits,
- unsigned int bit_count);
-extern int hmacResult(HMACContext *context,
- uint8_t digest[USHAMaxHashSize]);
-
-/*
- * HKDF HMAC-based Extract-and-Expand Key Derivation Function,
- * RFC 5869, for all SHAs.
- */
-extern int hkdf(SHAversion whichSha, const unsigned char *salt,
- int salt_len, const unsigned char *ikm, int ikm_len,
- const unsigned char *info, int info_len,
- uint8_t okm[ ], int okm_len);
-extern int hkdfExtract(SHAversion whichSha, const unsigned char *salt,
- int salt_len, const unsigned char *ikm,
- int ikm_len, uint8_t prk[USHAMaxHashSize]);
-extern int hkdfExpand(SHAversion whichSha, const uint8_t prk[ ],
- int prk_len, const unsigned char *info,
- int info_len, uint8_t okm[ ], int okm_len);
-
-/*
- * HKDF HMAC-based Extract-and-Expand Key Derivation Function,
- * RFC 5869, for all SHAs.
- * This interface allows any length of text input to be used.
- */
-extern int hkdfReset(HKDFContext *context, enum SHAversion whichSha,
- const unsigned char *salt, int salt_len);
-extern int hkdfInput(HKDFContext *context, const unsigned char *ikm,
- int ikm_len);
-extern int hkdfFinalBits(HKDFContext *context, uint8_t ikm_bits,
- unsigned int ikm_bit_count);
-extern int hkdfResult(HKDFContext *context,
- uint8_t prk[USHAMaxHashSize],
- const unsigned char *info, int info_len,
- uint8_t okm[USHAMaxHashSize], int okm_len);
#endif /* _SHA_H_ */
diff --git a/src/util/net.c b/src/util/net.c
index b2236daf8..ac7befe07 100644
--- a/src/util/net.c
+++ b/src/util/net.c
@@ -93,121 +93,367 @@ int git_net_url_dup(git_net_url *out, git_net_url *in)
return 0;
}
-int git_net_url_parse(git_net_url *url, const char *given)
+static int url_invalid(const char *message)
{
- struct http_parser_url u = {0};
- bool has_scheme, has_host, has_port, has_path, has_query, has_userinfo;
- git_str scheme = GIT_STR_INIT,
- host = GIT_STR_INIT,
- port = GIT_STR_INIT,
- path = GIT_STR_INIT,
- username = GIT_STR_INIT,
- password = GIT_STR_INIT,
- query = GIT_STR_INIT;
- int error = GIT_EINVALIDSPEC;
-
- if (http_parser_parse_url(given, strlen(given), false, &u)) {
- git_error_set(GIT_ERROR_NET, "malformed URL '%s'", given);
- goto done;
- }
+ git_error_set(GIT_ERROR_NET, "invalid url: %s", message);
+ return GIT_EINVALIDSPEC;
+}
- has_scheme = !!(u.field_set & (1 << UF_SCHEMA));
- has_host = !!(u.field_set & (1 << UF_HOST));
- has_port = !!(u.field_set & (1 << UF_PORT));
- has_path = !!(u.field_set & (1 << UF_PATH));
- has_query = !!(u.field_set & (1 << UF_QUERY));
- has_userinfo = !!(u.field_set & (1 << UF_USERINFO));
+static int url_parse_authority(
+ const char **user_start, size_t *user_len,
+ const char **password_start, size_t *password_len,
+ const char **host_start, size_t *host_len,
+ const char **port_start, size_t *port_len,
+ const char *authority_start, size_t len,
+ const char *scheme_start, size_t scheme_len)
+{
+ const char *c, *hostport_end, *host_end = NULL,
+ *userpass_end, *user_end = NULL;
- if (has_scheme) {
- const char *url_scheme = given + u.field_data[UF_SCHEMA].off;
- size_t url_scheme_len = u.field_data[UF_SCHEMA].len;
- git_str_put(&scheme, url_scheme, url_scheme_len);
- git__strntolower(scheme.ptr, scheme.size);
- } else {
- git_error_set(GIT_ERROR_NET, "malformed URL '%s'", given);
- goto done;
- }
+ enum {
+ HOSTPORT, HOST, IPV6, HOST_END, USERPASS, USER
+ } state = HOSTPORT;
- if (has_host) {
- const char *url_host = given + u.field_data[UF_HOST].off;
- size_t url_host_len = u.field_data[UF_HOST].len;
- git_str_decode_percent(&host, url_host, url_host_len);
- }
+ if (len == 0)
+ return 0;
- if (has_port) {
- const char *url_port = given + u.field_data[UF_PORT].off;
- size_t url_port_len = u.field_data[UF_PORT].len;
- git_str_put(&port, url_port, url_port_len);
- } else {
- const char *default_port = default_port_for_scheme(scheme.ptr);
+ /*
+ * walk the authority backwards so that we can parse google code's
+ * ssh urls that are not rfc compliant and allow @ in the username
+ */
+ for (hostport_end = authority_start + len, c = hostport_end - 1;
+ c >= authority_start && !user_end;
+ c--) {
+ switch (state) {
+ case HOSTPORT:
+ if (*c == ':') {
+ *port_start = c + 1;
+ *port_len = hostport_end - *port_start;
+ host_end = c;
+ state = HOST;
+ break;
+ }
- if (default_port == NULL) {
- git_error_set(GIT_ERROR_NET, "unknown scheme for URL '%s'", given);
- goto done;
- }
+ /*
+ * if we've only seen digits then we don't know
+ * if we're parsing just a host or a host and port.
+ * if we see a non-digit, then we're in a host,
+ * otherwise, fall through to possibly match the
+ * "@" (user/host separator).
+ */
+
+ if (*c < '0' || *c > '9') {
+ host_end = hostport_end;
+ state = HOST;
+ }
- git_str_puts(&port, default_port);
- }
+ /* fall through */
- if (has_path) {
- const char *url_path = given + u.field_data[UF_PATH].off;
- size_t url_path_len = u.field_data[UF_PATH].len;
- git_str_put(&path, url_path, url_path_len);
- } else {
- git_str_puts(&path, "/");
+ case HOST:
+ if (*c == ']' && host_end == c + 1) {
+ host_end = c;
+ state = IPV6;
+ }
+
+ else if (*c == '@') {
+ *host_start = c + 1;
+ *host_len = host_end ? host_end - *host_start :
+ hostport_end - *host_start;
+ userpass_end = c;
+ state = USERPASS;
+ }
+
+ else if (*c == '[' || *c == ']' || *c == ':') {
+ return url_invalid("malformed hostname");
+ }
+
+ break;
+
+ case IPV6:
+ if (*c == '[') {
+ *host_start = c + 1;
+ *host_len = host_end - *host_start;
+ state = HOST_END;
+ }
+
+ else if ((*c < '0' || *c > '9') &&
+ (*c < 'a' || *c > 'f') &&
+ (*c < 'A' || *c > 'F') &&
+ (*c != ':')) {
+ return url_invalid("malformed hostname");
+ }
+
+ break;
+
+ case HOST_END:
+ if (*c == '@') {
+ userpass_end = c;
+ state = USERPASS;
+ break;
+ }
+
+ return url_invalid("malformed hostname");
+
+ case USERPASS:
+ if (*c == '@' &&
+ strncasecmp(scheme_start, "ssh", scheme_len))
+ return url_invalid("malformed hostname");
+
+ if (*c == ':') {
+ *password_start = c + 1;
+ *password_len = userpass_end - *password_start;
+ user_end = c;
+ state = USER;
+ break;
+ }
+
+ break;
+
+ default:
+ GIT_ASSERT(!"unhandled state");
+ }
}
- if (has_query) {
- const char *url_query = given + u.field_data[UF_QUERY].off;
- size_t url_query_len = u.field_data[UF_QUERY].len;
- git_str_decode_percent(&query, url_query, url_query_len);
+ switch (state) {
+ case HOSTPORT:
+ *host_start = authority_start;
+ *host_len = (hostport_end - *host_start);
+ break;
+ case HOST:
+ *host_start = authority_start;
+ *host_len = (host_end - *host_start);
+ break;
+ case IPV6:
+ return url_invalid("malformed hostname");
+ case HOST_END:
+ break;
+ case USERPASS:
+ *user_start = authority_start;
+ *user_len = (userpass_end - *user_start);
+ break;
+ case USER:
+ *user_start = authority_start;
+ *user_len = (user_end - *user_start);
+ break;
+ default:
+ GIT_ASSERT(!"unhandled state");
}
- if (has_userinfo) {
- const char *url_userinfo = given + u.field_data[UF_USERINFO].off;
- size_t url_userinfo_len = u.field_data[UF_USERINFO].len;
- const char *colon = memchr(url_userinfo, ':', url_userinfo_len);
+ return 0;
+}
+
+int git_net_url_parse(git_net_url *url, const char *given)
+{
+ const char *c, *scheme_start, *authority_start, *user_start,
+ *password_start, *host_start, *port_start, *path_start,
+ *query_start, *fragment_start, *default_port;
+ git_str scheme = GIT_STR_INIT, user = GIT_STR_INIT,
+ password = GIT_STR_INIT, host = GIT_STR_INIT,
+ port = GIT_STR_INIT, path = GIT_STR_INIT,
+ query = GIT_STR_INIT, fragment = GIT_STR_INIT;
+ size_t scheme_len = 0, user_len = 0, password_len = 0, host_len = 0,
+ port_len = 0, path_len = 0, query_len = 0, fragment_len = 0;
+ bool hierarchical = false;
+ int error = 0;
+
+ enum {
+ SCHEME,
+ AUTHORITY_START, AUTHORITY,
+ PATH_START, PATH,
+ QUERY,
+ FRAGMENT
+ } state = SCHEME;
+
+ memset(url, 0, sizeof(git_net_url));
+
+ for (c = scheme_start = given; *c; c++) {
+ switch (state) {
+ case SCHEME:
+ if (*c == ':') {
+ scheme_len = (c - scheme_start);
+
+ if (*(c+1) == '/' && *(c+2) == '/') {
+ c += 2;
+ hierarchical = true;
+ state = AUTHORITY_START;
+ } else {
+ state = PATH_START;
+ }
+ } else if ((*c < 'A' || *c > 'Z') &&
+ (*c < 'a' || *c > 'z') &&
+ (*c < '0' || *c > '9') &&
+ (*c != '+' && *c != '-' && *c != '.')) {
+ /*
+ * an illegal scheme character means that we
+ * were just given a relative path
+ */
+ path_start = given;
+ state = PATH;
+ break;
+ }
+ break;
+
+ case AUTHORITY_START:
+ authority_start = c;
+ state = AUTHORITY;
+
+ /* fall through */
+
+ case AUTHORITY:
+ if (*c != '/')
+ break;
+
+ /*
+ * authority is sufficiently complex that we parse
+ * it separately
+ */
+ if ((error = url_parse_authority(
+ &user_start, &user_len,
+ &password_start,&password_len,
+ &host_start, &host_len,
+ &port_start, &port_len,
+ authority_start, (c - authority_start),
+ scheme_start, scheme_len)) < 0)
+ goto done;
+
+ /* fall through */
+
+ case PATH_START:
+ path_start = c;
+ state = PATH;
+ /* fall through */
+
+ case PATH:
+ switch (*c) {
+ case '?':
+ path_len = (c - path_start);
+ query_start = c + 1;
+ state = QUERY;
+ break;
+ case '#':
+ path_len = (c - path_start);
+ fragment_start = c + 1;
+ state = FRAGMENT;
+ break;
+ }
+ break;
+
+ case QUERY:
+ if (*c == '#') {
+ query_len = (c - query_start);
+ fragment_start = c + 1;
+ state = FRAGMENT;
+ }
+ break;
- if (colon) {
- const char *url_username = url_userinfo;
- size_t url_username_len = colon - url_userinfo;
- const char *url_password = colon + 1;
- size_t url_password_len = url_userinfo_len - (url_username_len + 1);
+ case FRAGMENT:
+ break;
- git_str_decode_percent(&username, url_username, url_username_len);
- git_str_decode_percent(&password, url_password, url_password_len);
- } else {
- git_str_decode_percent(&username, url_userinfo, url_userinfo_len);
+ default:
+ GIT_ASSERT(!"unhandled state");
}
}
- if (git_str_oom(&scheme) ||
- git_str_oom(&host) ||
- git_str_oom(&port) ||
- git_str_oom(&path) ||
- git_str_oom(&query) ||
- git_str_oom(&username) ||
- git_str_oom(&password))
- return -1;
+ switch (state) {
+ case SCHEME:
+ /*
+ * if we never saw a ':' then we were given a relative
+ * path, not a bare scheme
+ */
+ path_start = given;
+ path_len = (c - scheme_start);
+ break;
+ case AUTHORITY_START:
+ break;
+ case AUTHORITY:
+ if ((error = url_parse_authority(
+ &user_start, &user_len,
+ &password_start,&password_len,
+ &host_start, &host_len,
+ &port_start, &port_len,
+ authority_start, (c - authority_start),
+ scheme_start, scheme_len)) < 0)
+ goto done;
+ break;
+ case PATH_START:
+ break;
+ case PATH:
+ path_len = (c - path_start);
+ break;
+ case QUERY:
+ query_len = (c - query_start);
+ break;
+ case FRAGMENT:
+ fragment_len = (c - fragment_start);
+ break;
+ default:
+ GIT_ASSERT(!"unhandled state");
+ }
+
+ if (scheme_len) {
+ if ((error = git_str_put(&scheme, scheme_start, scheme_len)) < 0)
+ goto done;
+
+ git__strntolower(scheme.ptr, scheme.size);
+ }
+
+ if (user_len &&
+ (error = git_str_decode_percent(&user, user_start, user_len)) < 0)
+ goto done;
+
+ if (password_len &&
+ (error = git_str_decode_percent(&password, password_start, password_len)) < 0)
+ goto done;
+
+ if (host_len &&
+ (error = git_str_decode_percent(&host, host_start, host_len)) < 0)
+ goto done;
+
+ if (port_len)
+ error = git_str_put(&port, port_start, port_len);
+ else if (scheme_len && (default_port = default_port_for_scheme(scheme.ptr)) != NULL)
+ error = git_str_puts(&port, default_port);
+
+ if (error < 0)
+ goto done;
+
+ if (path_len)
+ error = git_str_put(&path, path_start, path_len);
+ else if (hierarchical)
+ error = git_str_puts(&path, "/");
+
+ if (error < 0)
+ goto done;
+
+ if (query_len &&
+ (error = git_str_decode_percent(&query, query_start, query_len)) < 0)
+ goto done;
+
+ if (fragment_len &&
+ (error = git_str_decode_percent(&fragment, fragment_start, fragment_len)) < 0)
+ goto done;
url->scheme = git_str_detach(&scheme);
url->host = git_str_detach(&host);
url->port = git_str_detach(&port);
url->path = git_str_detach(&path);
url->query = git_str_detach(&query);
- url->username = git_str_detach(&username);
+ url->fragment = git_str_detach(&fragment);
+ url->username = git_str_detach(&user);
url->password = git_str_detach(&password);
error = 0;
done:
git_str_dispose(&scheme);
+ git_str_dispose(&user);
+ git_str_dispose(&password);
git_str_dispose(&host);
git_str_dispose(&port);
git_str_dispose(&path);
git_str_dispose(&query);
- git_str_dispose(&username);
- git_str_dispose(&password);
+ git_str_dispose(&fragment);
+
return error;
}
@@ -374,7 +620,7 @@ int git_net_url_parse_scp(git_net_url *url, const char *given)
break;
default:
- GIT_ASSERT("unhandled state");
+ GIT_ASSERT(!"unhandled state");
}
}
@@ -400,6 +646,13 @@ int git_net_url_parse_scp(git_net_url *url, const char *given)
return 0;
}
+int git_net_url_parse_standard_or_scp(git_net_url *url, const char *given)
+{
+ return git_net_str_is_url(given) ?
+ git_net_url_parse(url, given) :
+ git_net_url_parse_scp(url, given);
+}
+
int git_net_url_joinpath(
git_net_url *out,
git_net_url *one,
@@ -588,7 +841,7 @@ bool git_net_url_is_default_port(git_net_url *url)
{
const char *default_port;
- if ((default_port = default_port_for_scheme(url->scheme)) != NULL)
+ if (url->scheme && (default_port = default_port_for_scheme(url->scheme)) != NULL)
return (strcmp(url->port, default_port) == 0);
else
return false;
@@ -744,6 +997,7 @@ void git_net_url_dispose(git_net_url *url)
git__free(url->port); url->port = NULL;
git__free(url->path); url->path = NULL;
git__free(url->query); url->query = NULL;
+ git__free(url->fragment); url->fragment = NULL;
git__free(url->username); url->username = NULL;
git__free(url->password); url->password = NULL;
}
diff --git a/src/util/net.h b/src/util/net.h
index 88030a952..17f0bc4f0 100644
--- a/src/util/net.h
+++ b/src/util/net.h
@@ -15,6 +15,7 @@ typedef struct git_net_url {
char *port;
char *path;
char *query;
+ char *fragment;
char *username;
char *password;
} git_net_url;
@@ -33,6 +34,12 @@ extern int git_net_url_parse(git_net_url *url, const char *str);
/** Parses a string containing an SCP style path into a URL structure. */
extern int git_net_url_parse_scp(git_net_url *url, const char *str);
+/**
+ * Parses a string containing a standard URL or an SCP style path into
+ * a URL structure.
+ */
+extern int git_net_url_parse_standard_or_scp(git_net_url *url, const char *str);
+
/** Appends a path and/or query string to the given URL */
extern int git_net_url_joinpath(
git_net_url *out,
diff --git a/src/util/posix.h b/src/util/posix.h
index c8f8cd9d2..607aa9dce 100644
--- a/src/util/posix.h
+++ b/src/util/posix.h
@@ -104,6 +104,8 @@ typedef __int64 off64_t;
typedef __haiku_std_int64 off64_t;
#elif defined(__APPLE__)
typedef __int64_t off64_t;
+#elif defined(_AIX)
+typedef long long off64_t;
#else
typedef int64_t off64_t;
#endif
diff --git a/src/util/rand.c b/src/util/rand.c
index d28e4aa97..940faf947 100644
--- a/src/util/rand.c
+++ b/src/util/rand.c
@@ -14,6 +14,10 @@ See <http://creativecommons.org/publicdomain/zero/1.0/>. */
# include <sys/random.h>
#endif
+#if defined(GIT_WIN32)
+# include <wincrypt.h>
+#endif
+
static uint64_t state[4];
static git_mutex state_lock;
diff --git a/src/util/regexp.c b/src/util/regexp.c
index 2569dea0a..08700882b 100644
--- a/src/util/regexp.c
+++ b/src/util/regexp.c
@@ -108,11 +108,11 @@ int git_regexp_match(const git_regexp *r, const char *string)
data = pcre2_match_data_create(1, NULL);
GIT_ERROR_CHECK_ALLOC(data);
- if ((error = pcre2_match(*r, (const unsigned char *) string, strlen(string),
- 0, 0, data, NULL)) < 0)
+ error = pcre2_match(*r, (const unsigned char *) string, strlen(string), 0, 0, data, NULL);
+ pcre2_match_data_free(data);
+ if (error < 0)
return (error == PCRE2_ERROR_NOMATCH) ? GIT_ENOTFOUND : GIT_EINVALIDSPEC;
- pcre2_match_data_free(data);
return 0;
}
diff --git a/src/util/thread.h b/src/util/thread.h
index 4bbac9fd8..c32554bfd 100644
--- a/src/util/thread.h
+++ b/src/util/thread.h
@@ -260,36 +260,37 @@ GIT_INLINE(int64_t) git_atomic64_get(git_atomic64 *a)
#else
-#define git_threads_global_init git__noop
+#define git_threads_global_init git__noop
#define git_thread unsigned int
-#define git_thread_create(thread, start_routine, arg) git__noop()
-#define git_thread_join(id, status) git__noop()
+#define git_thread_create(t, s, a) git__noop(t, s, a)
+#define git_thread_join(i, s) git__noop_args(i, s)
/* Pthreads Mutex */
#define git_mutex unsigned int
-#define git_mutex_init(a) git__noop()
-#define git_mutex_init(a) git__noop()
-#define git_mutex_lock(a) git__noop()
-#define git_mutex_unlock(a) git__noop()
-#define git_mutex_free(a) git__noop()
+#define git_mutex_init(a) git__noop_args(a)
+#define git_mutex_init(a) git__noop_args(a)
+#define git_mutex_lock(a) git__noop_args(a)
+#define git_mutex_unlock(a) git__noop_args(a)
+#define git_mutex_free(a) git__noop_args(a)
/* Pthreads condition vars */
#define git_cond unsigned int
-#define git_cond_init(c) git__noop()
-#define git_cond_free(c) git__noop()
-#define git_cond_wait(c, l) git__noop()
-#define git_cond_signal(c) git__noop()
-#define git_cond_broadcast(c) git__noop()
+#define git_cond_init(c) git__noop_args(c)
+#define git_cond_free(c) git__noop_args(c)
+#define git_cond_wait(c, l) git__noop_args(c, l)
+#define git_cond_signal(c) git__noop_args(c)
+#define git_cond_broadcast(c) git__noop_args(c)
/* Pthreads rwlock */
#define git_rwlock unsigned int
-#define git_rwlock_init(a) git__noop()
-#define git_rwlock_rdlock(a) git__noop()
-#define git_rwlock_rdunlock(a) git__noop()
-#define git_rwlock_wrlock(a) git__noop()
-#define git_rwlock_wrunlock(a) git__noop()
-#define git_rwlock_free(a) git__noop()
+#define git_rwlock_init(a) git__noop_args(a)
+#define git_rwlock_rdlock(a) git__noop_args(a)
+#define git_rwlock_rdunlock(a) git__noop_args(a)
+#define git_rwlock_wrlock(a) git__noop_args(a)
+#define git_rwlock_wrunlock(a) git__noop_args(a)
+#define git_rwlock_free(a) git__noop_args(a)
+
#define GIT_RWLOCK_STATIC_INIT 0
diff --git a/src/util/util.h b/src/util/util.h
index 8d6d1d6b6..63d6080f7 100644
--- a/src/util/util.h
+++ b/src/util/util.h
@@ -381,6 +381,7 @@ extern int git__getenv(git_str *out, const char *name);
extern int git__online_cpus(void);
GIT_INLINE(int) git__noop(void) { return 0; }
+GIT_INLINE(int) git__noop_args(void *a, ...) { GIT_UNUSED(a); return 0; }
#include "alloc.h"
diff --git a/src/util/win32/findfile.c b/src/util/win32/findfile.c
deleted file mode 100644
index 725a90167..000000000
--- a/src/util/win32/findfile.c
+++ /dev/null
@@ -1,286 +0,0 @@
-/*
- * Copyright (C) the libgit2 contributors. All rights reserved.
- *
- * This file is part of libgit2, distributed under the GNU GPL v2 with
- * a Linking Exception. For full terms see the included COPYING file.
- */
-
-#include "findfile.h"
-
-#include "path_w32.h"
-#include "utf-conv.h"
-#include "fs_path.h"
-
-#define REG_GITFORWINDOWS_KEY L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Git_is1"
-#define REG_GITFORWINDOWS_KEY_WOW64 L"SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Git_is1"
-
-static int git_win32__expand_path(git_win32_path dest, const wchar_t *src)
-{
- DWORD len = ExpandEnvironmentStringsW(src, dest, GIT_WIN_PATH_UTF16);
-
- if (!len || len > GIT_WIN_PATH_UTF16)
- return -1;
-
- return 0;
-}
-
-static int win32_path_to_8(git_str *dest, const wchar_t *src)
-{
- git_win32_utf8_path utf8_path;
-
- if (git_win32_path_to_utf8(utf8_path, src) < 0) {
- git_error_set(GIT_ERROR_OS, "unable to convert path to UTF-8");
- return -1;
- }
-
- /* Convert backslashes to forward slashes */
- git_fs_path_mkposix(utf8_path);
-
- return git_str_sets(dest, utf8_path);
-}
-
-static git_win32_path mock_registry;
-static bool mock_registry_set;
-
-extern int git_win32__set_registry_system_dir(const wchar_t *mock_sysdir)
-{
- if (!mock_sysdir) {
- mock_registry[0] = L'\0';
- mock_registry_set = false;
- } else {
- size_t len = wcslen(mock_sysdir);
-
- if (len > GIT_WIN_PATH_MAX) {
- git_error_set(GIT_ERROR_INVALID, "mock path too long");
- return -1;
- }
-
- wcscpy(mock_registry, mock_sysdir);
- mock_registry_set = true;
- }
-
- return 0;
-}
-
-static int lookup_registry_key(
- git_win32_path out,
- const HKEY hive,
- const wchar_t* key,
- const wchar_t *value)
-{
- HKEY hkey;
- DWORD type, size;
- int error = GIT_ENOTFOUND;
-
- /*
- * Registry data may not be NUL terminated, provide room to do
- * it ourselves.
- */
- size = (DWORD)((sizeof(git_win32_path) - 1) * sizeof(wchar_t));
-
- if (RegOpenKeyExW(hive, key, 0, KEY_READ, &hkey) != 0)
- return GIT_ENOTFOUND;
-
- if (RegQueryValueExW(hkey, value, NULL, &type, (LPBYTE)out, &size) == 0 &&
- type == REG_SZ &&
- size > 0 &&
- size < sizeof(git_win32_path)) {
- size_t wsize = size / sizeof(wchar_t);
- size_t len = wsize - 1;
-
- if (out[wsize - 1] != L'\0') {
- len = wsize;
- out[wsize] = L'\0';
- }
-
- if (out[len - 1] == L'\\')
- out[len - 1] = L'\0';
-
- if (_waccess(out, F_OK) == 0)
- error = 0;
- }
-
- RegCloseKey(hkey);
- return error;
-}
-
-static int find_sysdir_in_registry(git_win32_path out)
-{
- if (mock_registry_set) {
- if (mock_registry[0] == L'\0')
- return GIT_ENOTFOUND;
-
- wcscpy(out, mock_registry);
- return 0;
- }
-
- if (lookup_registry_key(out, HKEY_CURRENT_USER, REG_GITFORWINDOWS_KEY, L"InstallLocation") == 0 ||
- lookup_registry_key(out, HKEY_CURRENT_USER, REG_GITFORWINDOWS_KEY_WOW64, L"InstallLocation") == 0 ||
- lookup_registry_key(out, HKEY_LOCAL_MACHINE, REG_GITFORWINDOWS_KEY, L"InstallLocation") == 0 ||
- lookup_registry_key(out, HKEY_LOCAL_MACHINE, REG_GITFORWINDOWS_KEY_WOW64, L"InstallLocation") == 0)
- return 0;
-
- return GIT_ENOTFOUND;
-}
-
-static int find_sysdir_in_path(git_win32_path out)
-{
- size_t out_len;
-
- if (git_win32_path_find_executable(out, L"git.exe") < 0 &&
- git_win32_path_find_executable(out, L"git.cmd") < 0)
- return GIT_ENOTFOUND;
-
- out_len = wcslen(out);
-
- /* Trim the file name */
- if (out_len <= CONST_STRLEN(L"git.exe"))
- return GIT_ENOTFOUND;
-
- out_len -= CONST_STRLEN(L"git.exe");
-
- if (out_len && out[out_len - 1] == L'\\')
- out_len--;
-
- /*
- * Git for Windows usually places the command in a 'bin' or
- * 'cmd' directory, trim that.
- */
- if (out_len >= CONST_STRLEN(L"\\bin") &&
- wcsncmp(&out[out_len - CONST_STRLEN(L"\\bin")], L"\\bin", CONST_STRLEN(L"\\bin")) == 0)
- out_len -= CONST_STRLEN(L"\\bin");
- else if (out_len >= CONST_STRLEN(L"\\cmd") &&
- wcsncmp(&out[out_len - CONST_STRLEN(L"\\cmd")], L"\\cmd", CONST_STRLEN(L"\\cmd")) == 0)
- out_len -= CONST_STRLEN(L"\\cmd");
-
- if (!out_len)
- return GIT_ENOTFOUND;
-
- out[out_len] = L'\0';
- return 0;
-}
-
-static int win32_find_existing_dirs(
- git_str* out,
- const wchar_t* tmpl[])
-{
- git_win32_path path16;
- git_str buf = GIT_STR_INIT;
-
- git_str_clear(out);
-
- for (; *tmpl != NULL; tmpl++) {
- if (!git_win32__expand_path(path16, *tmpl) &&
- path16[0] != L'%' &&
- !_waccess(path16, F_OK)) {
- win32_path_to_8(&buf, path16);
-
- if (buf.size)
- git_str_join(out, GIT_PATH_LIST_SEPARATOR, out->ptr, buf.ptr);
- }
- }
-
- git_str_dispose(&buf);
-
- return (git_str_oom(out) ? -1 : 0);
-}
-
-static int append_subdir(git_str *out, git_str *path, const char *subdir)
-{
- static const char* architecture_roots[] = {
- "",
- "mingw64",
- "mingw32",
- NULL
- };
- const char **root;
- size_t orig_path_len = path->size;
-
- for (root = architecture_roots; *root; root++) {
- if ((*root[0] && git_str_joinpath(path, path->ptr, *root) < 0) ||
- git_str_joinpath(path, path->ptr, subdir) < 0)
- return -1;
-
- if (git_fs_path_exists(path->ptr) &&
- git_str_join(out, GIT_PATH_LIST_SEPARATOR, out->ptr, path->ptr) < 0)
- return -1;
-
- git_str_truncate(path, orig_path_len);
- }
-
- return 0;
-}
-
-int git_win32__find_system_dirs(git_str *out, const char *subdir)
-{
- git_win32_path pathdir, regdir;
- git_str path8 = GIT_STR_INIT;
- bool has_pathdir, has_regdir;
- int error;
-
- has_pathdir = (find_sysdir_in_path(pathdir) == 0);
- has_regdir = (find_sysdir_in_registry(regdir) == 0);
-
- if (!has_pathdir && !has_regdir)
- return 0;
-
- /*
- * Usually the git in the path is the same git in the registry,
- * in this case there's no need to duplicate the paths.
- */
- if (has_pathdir && has_regdir && wcscmp(pathdir, regdir) == 0)
- has_regdir = false;
-
- if (has_pathdir) {
- if ((error = win32_path_to_8(&path8, pathdir)) < 0 ||
- (error = append_subdir(out, &path8, subdir)) < 0)
- goto done;
- }
-
- if (has_regdir) {
- if ((error = win32_path_to_8(&path8, regdir)) < 0 ||
- (error = append_subdir(out, &path8, subdir)) < 0)
- goto done;
- }
-
-done:
- git_str_dispose(&path8);
- return error;
-}
-
-int git_win32__find_global_dirs(git_str *out)
-{
- static const wchar_t *global_tmpls[4] = {
- L"%HOME%\\",
- L"%HOMEDRIVE%%HOMEPATH%\\",
- L"%USERPROFILE%\\",
- NULL,
- };
-
- return win32_find_existing_dirs(out, global_tmpls);
-}
-
-int git_win32__find_xdg_dirs(git_str *out)
-{
- static const wchar_t *global_tmpls[7] = {
- L"%XDG_CONFIG_HOME%\\git",
- L"%APPDATA%\\git",
- L"%LOCALAPPDATA%\\git",
- L"%HOME%\\.config\\git",
- L"%HOMEDRIVE%%HOMEPATH%\\.config\\git",
- L"%USERPROFILE%\\.config\\git",
- NULL,
- };
-
- return win32_find_existing_dirs(out, global_tmpls);
-}
-
-int git_win32__find_programdata_dirs(git_str *out)
-{
- static const wchar_t *programdata_tmpls[2] = {
- L"%PROGRAMDATA%\\Git",
- NULL,
- };
-
- return win32_find_existing_dirs(out, programdata_tmpls);
-}
diff --git a/src/util/win32/findfile.h b/src/util/win32/findfile.h
deleted file mode 100644
index 7b191d1fe..000000000
--- a/src/util/win32/findfile.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright (C) the libgit2 contributors. All rights reserved.
- *
- * This file is part of libgit2, distributed under the GNU GPL v2 with
- * a Linking Exception. For full terms see the included COPYING file.
- */
-
-#ifndef INCLUDE_win32_findfile_h__
-#define INCLUDE_win32_findfile_h__
-
-#include "git2_util.h"
-
-/** Sets the mock registry root for Git for Windows for testing. */
-extern int git_win32__set_registry_system_dir(const wchar_t *mock_sysdir);
-
-extern int git_win32__find_system_dirs(git_str *out, const char *subpath);
-extern int git_win32__find_global_dirs(git_str *out);
-extern int git_win32__find_xdg_dirs(git_str *out);
-extern int git_win32__find_programdata_dirs(git_str *out);
-
-#endif
-
diff --git a/tests/clar/clar.c b/tests/clar/clar.c
index ca508d073..c9c3fde38 100644
--- a/tests/clar/clar.c
+++ b/tests/clar/clar.c
@@ -12,6 +12,7 @@
#include <math.h>
#include <stdarg.h>
#include <wchar.h>
+#include <time.h>
/* required for sandboxing */
#include <sys/types.h>
@@ -86,6 +87,8 @@
typedef struct stat STAT_T;
#endif
+#define MAX(x, y) (((x) > (y)) ? (x) : (y))
+
#include "clar.h"
static void fs_rm(const char *_source);
@@ -117,6 +120,8 @@ struct clar_report {
const char *suite;
enum cl_test_status status;
+ time_t start;
+ double elapsed;
struct clar_error *errors;
struct clar_error *last_error;
@@ -145,7 +150,7 @@ static struct {
int report_errors_only;
int exit_on_error;
- int report_suite_names;
+ int verbosity;
int write_summary;
char *summary_filename;
@@ -186,7 +191,7 @@ struct clar_suite {
static void clar_print_init(int test_count, int suite_count, const char *suite_names);
static void clar_print_shutdown(int test_count, int suite_count, int error_count);
static void clar_print_error(int num, const struct clar_report *report, const struct clar_error *error);
-static void clar_print_ontest(const char *test_name, int test_number, enum cl_test_status failed);
+static void clar_print_ontest(const char *suite_name, const char *test_name, int test_number, enum cl_test_status failed);
static void clar_print_onsuite(const char *suite_name, int suite_index);
static void clar_print_onabort(const char *msg, ...);
@@ -245,16 +250,53 @@ clar_report_all(void)
}
}
+#ifdef WIN32
+# define clar_time DWORD
+
+static void clar_time_now(clar_time *out)
+{
+ *out = GetTickCount();
+}
+
+static double clar_time_diff(clar_time *start, clar_time *end)
+{
+ return ((double)*end - (double)*start) / 1000;
+}
+#else
+# include <sys/time.h>
+
+# define clar_time struct timeval
+
+static void clar_time_now(clar_time *out)
+{
+ struct timezone tz;
+
+ gettimeofday(out, &tz);
+}
+
+static double clar_time_diff(clar_time *start, clar_time *end)
+{
+ return ((double)end->tv_sec + (double)end->tv_usec / 1.0E6) -
+ ((double)start->tv_sec + (double)start->tv_usec / 1.0E6);
+}
+#endif
+
static void
clar_run_test(
+ const struct clar_suite *suite,
const struct clar_func *test,
const struct clar_func *initialize,
const struct clar_func *cleanup)
{
+ clar_time start, end;
+
_clar.trampoline_enabled = 1;
CL_TRACE(CL_TRACE__TEST__BEGIN);
+ _clar.last_report->start = time(NULL);
+ clar_time_now(&start);
+
if (setjmp(_clar.trampoline) == 0) {
if (initialize->ptr != NULL)
initialize->ptr();
@@ -264,11 +306,15 @@ clar_run_test(
CL_TRACE(CL_TRACE__TEST__RUN_END);
}
+ clar_time_now(&end);
+
_clar.trampoline_enabled = 0;
if (_clar.last_report->status == CL_TEST_NOTRUN)
_clar.last_report->status = CL_TEST_OK;
+ _clar.last_report->elapsed = clar_time_diff(&start, &end);
+
if (_clar.local_cleanup != NULL)
_clar.local_cleanup(_clar.local_cleanup_payload);
@@ -286,7 +332,7 @@ clar_run_test(
if (_clar.report_errors_only) {
clar_report_errors(_clar.last_report);
} else {
- clar_print_ontest(test->name, _clar.tests_ran, _clar.last_report->status);
+ clar_print_ontest(suite->name, test->name, _clar.tests_ran, _clar.last_report->status);
}
}
@@ -352,7 +398,7 @@ clar_run_suite(const struct clar_suite *suite, const char *filter)
_clar.last_report = report;
- clar_run_test(&test[i], &suite->initialize, &suite->cleanup);
+ clar_run_test(suite, &test[i], &suite->initialize, &suite->cleanup);
if (_clar.exit_on_error && _clar.total_errors)
return;
@@ -427,7 +473,7 @@ clar_parse_args(int argc, char **argv)
++found;
if (!exact)
- _clar.report_suite_names = 1;
+ _clar.verbosity = MAX(_clar.verbosity, 1);
switch (action) {
case 's': {
@@ -486,13 +532,13 @@ clar_parse_args(int argc, char **argv)
}
case 'v':
- _clar.report_suite_names = 1;
+ _clar.verbosity++;
break;
case 'r':
_clar.write_summary = 1;
free(_clar.summary_filename);
- _clar.summary_filename = strdup(*(argument + 2) ? (argument + 2) : "summary.xml");
+ _clar.summary_filename = *(argument + 2) ? strdup(argument + 2) : NULL;
break;
default:
@@ -504,6 +550,8 @@ clar_parse_args(int argc, char **argv)
void
clar_test_init(int argc, char **argv)
{
+ const char *summary_env;
+
if (argc > 1)
clar_parse_args(argc, argv);
@@ -513,11 +561,15 @@ clar_test_init(int argc, char **argv)
""
);
- if ((_clar.summary_filename = getenv("CLAR_SUMMARY")) != NULL) {
+ if (!_clar.summary_filename &&
+ (summary_env = getenv("CLAR_SUMMARY")) != NULL) {
_clar.write_summary = 1;
- _clar.summary_filename = strdup(_clar.summary_filename);
+ _clar.summary_filename = strdup(summary_env);
}
+ if (_clar.write_summary && !_clar.summary_filename)
+ _clar.summary_filename = strdup("summary.xml");
+
if (_clar.write_summary &&
!(_clar.summary = clar_summary_init(_clar.summary_filename))) {
clar_print_onabort("Failed to open the summary file\n");
diff --git a/tests/clar/clar.h b/tests/clar/clar.h
index 3f659c2f6..8c22382bd 100644
--- a/tests/clar/clar.h
+++ b/tests/clar/clar.h
@@ -13,12 +13,12 @@ enum cl_test_status {
CL_TEST_OK,
CL_TEST_FAILURE,
CL_TEST_SKIP,
- CL_TEST_NOTRUN
+ CL_TEST_NOTRUN,
};
enum cl_output_format {
CL_OUTPUT_CLAP,
- CL_OUTPUT_TAP
+ CL_OUTPUT_TAP,
};
/** Setup clar environment */
@@ -60,7 +60,7 @@ typedef enum cl_trace_event {
CL_TRACE__TEST__END,
CL_TRACE__TEST__RUN_BEGIN,
CL_TRACE__TEST__RUN_END,
- CL_TRACE__TEST__LONGJMP
+ CL_TRACE__TEST__LONGJMP,
} cl_trace_event;
typedef void (cl_trace_cb)(
diff --git a/tests/clar/clar/print.h b/tests/clar/clar/print.h
index dbfd27655..c17e2f693 100644
--- a/tests/clar/clar/print.h
+++ b/tests/clar/clar/print.h
@@ -36,24 +36,35 @@ static void clar_print_clap_error(int num, const struct clar_report *report, con
fflush(stdout);
}
-static void clar_print_clap_ontest(const char *test_name, int test_number, enum cl_test_status status)
+static void clar_print_clap_ontest(const char *suite_name, const char *test_name, int test_number, enum cl_test_status status)
{
(void)test_name;
(void)test_number;
- switch(status) {
- case CL_TEST_OK: printf("."); break;
- case CL_TEST_FAILURE: printf("F"); break;
- case CL_TEST_SKIP: printf("S"); break;
- case CL_TEST_NOTRUN: printf("N"); break;
+ if (_clar.verbosity > 1) {
+ printf("%s::%s: ", suite_name, test_name);
+
+ switch (status) {
+ case CL_TEST_OK: printf("ok\n"); break;
+ case CL_TEST_FAILURE: printf("fail\n"); break;
+ case CL_TEST_SKIP: printf("skipped"); break;
+ case CL_TEST_NOTRUN: printf("notrun"); break;
+ }
+ } else {
+ switch (status) {
+ case CL_TEST_OK: printf("."); break;
+ case CL_TEST_FAILURE: printf("F"); break;
+ case CL_TEST_SKIP: printf("S"); break;
+ case CL_TEST_NOTRUN: printf("N"); break;
+ }
+
+ fflush(stdout);
}
-
- fflush(stdout);
}
static void clar_print_clap_onsuite(const char *suite_name, int suite_index)
{
- if (_clar.report_suite_names)
+ if (_clar.verbosity == 1)
printf("\n%s", suite_name);
(void)suite_index;
@@ -102,7 +113,7 @@ static void print_escaped(const char *str)
printf("%s", str);
}
-static void clar_print_tap_ontest(const char *test_name, int test_number, enum cl_test_status status)
+static void clar_print_tap_ontest(const char *suite_name, const char *test_name, int test_number, enum cl_test_status status)
{
const struct clar_error *error = _clar.last_report->errors;
@@ -111,10 +122,10 @@ static void clar_print_tap_ontest(const char *test_name, int test_number, enum c
switch(status) {
case CL_TEST_OK:
- printf("ok %d - %s::%s\n", test_number, _clar.active_suite, test_name);
+ printf("ok %d - %s::%s\n", test_number, suite_name, test_name);
break;
case CL_TEST_FAILURE:
- printf("not ok %d - %s::%s\n", test_number, _clar.active_suite, test_name);
+ printf("not ok %d - %s::%s\n", test_number, suite_name, test_name);
printf(" ---\n");
printf(" reason: |\n");
@@ -132,7 +143,7 @@ static void clar_print_tap_ontest(const char *test_name, int test_number, enum c
break;
case CL_TEST_SKIP:
case CL_TEST_NOTRUN:
- printf("ok %d - # SKIP %s::%s\n", test_number, _clar.active_suite, test_name);
+ printf("ok %d - # SKIP %s::%s\n", test_number, suite_name, test_name);
break;
}
@@ -181,9 +192,9 @@ static void clar_print_error(int num, const struct clar_report *report, const st
PRINT(error, num, report, error);
}
-static void clar_print_ontest(const char *test_name, int test_number, enum cl_test_status status)
+static void clar_print_ontest(const char *suite_name, const char *test_name, int test_number, enum cl_test_status status)
{
- PRINT(ontest, test_name, test_number, status);
+ PRINT(ontest, suite_name, test_name, test_number, status);
}
static void clar_print_onsuite(const char *suite_name, int suite_index)
diff --git a/tests/clar/clar/summary.h b/tests/clar/clar/summary.h
index 6279f5057..4dd352e28 100644
--- a/tests/clar/clar/summary.h
+++ b/tests/clar/clar/summary.h
@@ -20,8 +20,8 @@ static int clar_summary_testsuites(struct clar_summary *summary)
}
static int clar_summary_testsuite(struct clar_summary *summary,
- int idn, const char *name, const char *pkg, time_t timestamp,
- double elapsed, int test_count, int fail_count, int error_count)
+ int idn, const char *name, time_t timestamp,
+ int test_count, int fail_count, int error_count)
{
struct tm *tm = localtime(&timestamp);
char iso_dt[20];
@@ -29,17 +29,15 @@ static int clar_summary_testsuite(struct clar_summary *summary,
if (strftime(iso_dt, sizeof(iso_dt), "%Y-%m-%dT%H:%M:%S", tm) == 0)
return -1;
- return fprintf(summary->fp, "\t<testsuite "
+ return fprintf(summary->fp, "\t<testsuite"
" id=\"%d\""
" name=\"%s\""
- " package=\"%s\""
" hostname=\"localhost\""
" timestamp=\"%s\""
- " time=\"%.2f\""
" tests=\"%d\""
" failures=\"%d\""
" errors=\"%d\">\n",
- idn, name, pkg, iso_dt, elapsed, test_count, fail_count, error_count);
+ idn, name, iso_dt, test_count, fail_count, error_count);
}
static int clar_summary_testcase(struct clar_summary *summary,
@@ -58,15 +56,23 @@ static int clar_summary_failure(struct clar_summary *summary,
type, message, desc);
}
+static int clar_summary_skipped(struct clar_summary *summary)
+{
+ return fprintf(summary->fp, "\t\t\t<skipped />\n");
+}
+
struct clar_summary *clar_summary_init(const char *filename)
{
struct clar_summary *summary;
FILE *fp;
- if ((fp = fopen(filename, "w")) == NULL)
+ if ((fp = fopen(filename, "w")) == NULL) {
+ perror("fopen");
return NULL;
+ }
if ((summary = malloc(sizeof(struct clar_summary))) == NULL) {
+ perror("malloc");
fclose(fp);
return NULL;
}
@@ -90,14 +96,14 @@ int clar_summary_shutdown(struct clar_summary *summary)
struct clar_error *error = report->errors;
if (last_suite == NULL || strcmp(last_suite, report->suite) != 0) {
- if (clar_summary_testsuite(summary, 0, report->suite, "",
- time(NULL), 0, _clar.tests_ran, _clar.total_errors, 0) < 0)
+ if (clar_summary_testsuite(summary, 0, report->suite,
+ report->start, _clar.tests_ran, _clar.total_errors, 0) < 0)
goto on_error;
}
last_suite = report->suite;
- clar_summary_testcase(summary, report->test, "what", 0);
+ clar_summary_testcase(summary, report->test, report->suite, report->elapsed);
while (error != NULL) {
if (clar_summary_failure(summary, "assert",
@@ -107,6 +113,9 @@ int clar_summary_shutdown(struct clar_summary *summary)
error = error->next;
}
+ if (report->status == CL_TEST_SKIP)
+ clar_summary_skipped(summary);
+
if (clar_summary_close_tag(summary, "testcase", 2) < 0)
goto on_error;
diff --git a/tests/clar/clar_libgit2.c b/tests/clar/clar_libgit2.c
index 783b457f9..54122997d 100644
--- a/tests/clar/clar_libgit2.c
+++ b/tests/clar/clar_libgit2.c
@@ -1,6 +1,7 @@
#include "clar_libgit2.h"
#include "posix.h"
#include "fs_path.h"
+#include "futils.h"
#include "git2/sys/repository.h"
void cl_git_report_failure(
@@ -476,6 +477,25 @@ int cl_repo_get_bool(git_repository *repo, const char *cfg)
return val;
}
+void cl_repo_set_int(git_repository *repo, const char *cfg, int value)
+{
+ git_config *config;
+ cl_git_pass(git_repository_config(&config, repo));
+ cl_git_pass(git_config_set_int32(config, cfg, value));
+ git_config_free(config);
+}
+
+int cl_repo_get_int(git_repository *repo, const char *cfg)
+{
+ int val = 0;
+ git_config *config;
+ cl_git_pass(git_repository_config(&config, repo));
+ if (git_config_get_int32(&val, config, cfg) < 0)
+ git_error_clear();
+ git_config_free(config);
+ return val;
+}
+
void cl_repo_set_string(git_repository *repo, const char *cfg, const char *value)
{
git_config *config;
@@ -548,33 +568,95 @@ void clar__assert_equal_file(
(size_t)expected_bytes, (size_t)total_bytes);
}
-static git_buf _cl_restore_home = GIT_BUF_INIT;
+#define FAKE_HOMEDIR_NAME "cl_fake_home"
-void cl_fake_home_cleanup(void *payload)
+static git_buf _cl_restore_homedir = GIT_BUF_INIT;
+
+void cl_fake_homedir_cleanup(void *payload)
{
GIT_UNUSED(payload);
- if (_cl_restore_home.ptr) {
- cl_git_pass(git_libgit2_opts(
- GIT_OPT_SET_SEARCH_PATH, GIT_CONFIG_LEVEL_GLOBAL, _cl_restore_home.ptr));
- git_buf_dispose(&_cl_restore_home);
+ if (_cl_restore_homedir.ptr) {
+ cl_git_pass(git_futils_rmdir_r(FAKE_HOMEDIR_NAME, NULL, GIT_RMDIR_REMOVE_FILES));
+
+ cl_git_pass(git_libgit2_opts(GIT_OPT_SET_HOMEDIR, _cl_restore_homedir.ptr));
+ git_buf_dispose(&_cl_restore_homedir);
}
}
-void cl_fake_home(void)
+void cl_fake_homedir(git_str *out)
{
git_str path = GIT_STR_INIT;
cl_git_pass(git_libgit2_opts(
- GIT_OPT_GET_SEARCH_PATH, GIT_CONFIG_LEVEL_GLOBAL, &_cl_restore_home));
+ GIT_OPT_GET_HOMEDIR, &_cl_restore_homedir));
- cl_set_cleanup(cl_fake_home_cleanup, NULL);
+ cl_set_cleanup(cl_fake_homedir_cleanup, NULL);
+
+ /* TOC/TOU but merely attempts to prevent accidental cleanup. */
+ cl_assert(!git_fs_path_exists(FAKE_HOMEDIR_NAME));
+ cl_must_pass(p_mkdir(FAKE_HOMEDIR_NAME, 0777));
+ cl_git_pass(git_fs_path_prettify(&path, FAKE_HOMEDIR_NAME, NULL));
+ cl_git_pass(git_libgit2_opts(GIT_OPT_SET_HOMEDIR, path.ptr));
+
+ if (out)
+ git_str_swap(out, &path);
+
+ git_str_dispose(&path);
+}
+
+#define FAKE_GLOBALCONFIG_NAME "cl_fake_global"
+
+static git_buf _cl_restore_globalconfig = GIT_BUF_INIT;
+
+void cl_fake_globalconfig_cleanup(void *payload)
+{
+ GIT_UNUSED(payload);
+
+ if (_cl_restore_globalconfig.ptr) {
+ cl_git_pass(git_futils_rmdir_r(FAKE_GLOBALCONFIG_NAME, NULL, GIT_RMDIR_REMOVE_FILES));
+
+ cl_git_pass(git_libgit2_opts(GIT_OPT_SET_HOMEDIR, _cl_restore_globalconfig.ptr));
+ git_buf_dispose(&_cl_restore_globalconfig);
+ }
+}
+
+void cl_fake_globalconfig(git_str *out)
+{
+ git_str path = GIT_STR_INIT;
- if (!git_fs_path_exists("home"))
- cl_must_pass(p_mkdir("home", 0777));
- cl_git_pass(git_fs_path_prettify(&path, "home", NULL));
cl_git_pass(git_libgit2_opts(
- GIT_OPT_SET_SEARCH_PATH, GIT_CONFIG_LEVEL_GLOBAL, path.ptr));
+ GIT_OPT_GET_SEARCH_PATH, GIT_CONFIG_LEVEL_GLOBAL, &_cl_restore_globalconfig));
+
+ cl_set_cleanup(cl_fake_globalconfig_cleanup, NULL);
+
+ /* TOC/TOU but merely attempts to prevent accidental cleanup. */
+ cl_assert(!git_fs_path_exists(FAKE_GLOBALCONFIG_NAME));
+ cl_must_pass(p_mkdir(FAKE_GLOBALCONFIG_NAME, 0777));
+ cl_git_pass(git_fs_path_prettify(&path, FAKE_GLOBALCONFIG_NAME, NULL));
+ cl_git_pass(git_libgit2_opts(GIT_OPT_SET_SEARCH_PATH, GIT_CONFIG_LEVEL_GLOBAL, path.ptr));
+
+ if (out)
+ git_str_swap(out, &path);
+
+ git_str_dispose(&path);
+}
+
+void cl_sandbox_set_homedir(const char *home)
+{
+ git_str path = GIT_STR_INIT;
+
+ if (home) {
+ git_libgit2_opts(GIT_OPT_SET_HOMEDIR, home);
+ } else {
+ git_str_joinpath(&path, clar_sandbox_path(), "__home");
+
+ if (!git_fs_path_exists(path.ptr))
+ cl_must_pass(p_mkdir(path.ptr, 0777));
+
+ git_libgit2_opts(GIT_OPT_SET_HOMEDIR, path.ptr);
+ }
+
git_str_dispose(&path);
}
diff --git a/tests/clar/clar_libgit2.h b/tests/clar/clar_libgit2.h
index d2d9da0aa..c33b5d28b 100644
--- a/tests/clar/clar_libgit2.h
+++ b/tests/clar/clar_libgit2.h
@@ -231,16 +231,28 @@ void cl_repo_commit_from_index(
void cl_repo_set_bool(git_repository *repo, const char *cfg, int value);
int cl_repo_get_bool(git_repository *repo, const char *cfg);
+void cl_repo_set_int(git_repository *repo, const char *cfg, int value);
+int cl_repo_get_int(git_repository *repo, const char *cfg);
+
void cl_repo_set_string(git_repository *repo, const char *cfg, const char *value);
-/* set up a fake "home" directory and set libgit2 GLOBAL search path.
- *
- * automatically configures cleanup function to restore the regular search
- * path, although you can call it explicitly if you wish (with NULL).
+/*
+ * set up a fake "home" directory -- automatically configures cleanup
+ * function to restore the home directory, although you can call it
+ * explicitly if you wish (with NULL).
+ */
+void cl_fake_homedir(git_str *);
+void cl_fake_homedir_cleanup(void *);
+
+/*
+ * set up a fake global configuration directory -- automatically
+ * configures cleanup function to restore the global config
+ * although you can call it explicitly if you wish (with NULL).
*/
-void cl_fake_home(void);
-void cl_fake_home_cleanup(void *);
+void cl_fake_globalconfig(git_str *);
+void cl_fake_globalconfig_cleanup(void *);
+void cl_sandbox_set_homedir(const char *);
void cl_sandbox_set_search_path_defaults(void);
void cl_sandbox_disable_ownership_validation(void);
diff --git a/tests/clar/main.c b/tests/clar/main.c
index d879073a8..e3f4fe740 100644
--- a/tests/clar/main.c
+++ b/tests/clar/main.c
@@ -25,6 +25,7 @@ int main(int argc, char *argv[])
}
cl_global_trace_register();
+ cl_sandbox_set_homedir(getenv("CLAR_HOMEDIR"));
cl_sandbox_set_search_path_defaults();
cl_sandbox_disable_ownership_validation();
diff --git a/tests/libgit2/CMakeLists.txt b/tests/libgit2/CMakeLists.txt
index 7f6fafe77..866122d1c 100644
--- a/tests/libgit2/CMakeLists.txt
+++ b/tests/libgit2/CMakeLists.txt
@@ -69,7 +69,9 @@ add_clar_test(libgit2_tests invasive -v -sfilter::stream::bigfile -so
add_clar_test(libgit2_tests online -v -sonline -xonline::customcert)
add_clar_test(libgit2_tests online_customcert -v -sonline::customcert)
add_clar_test(libgit2_tests gitdaemon -v -sonline::push)
-add_clar_test(libgit2_tests ssh -v -sonline::push -sonline::clone::ssh_cert -sonline::clone::ssh_with_paths -sonline::clone::path_whitespace_ssh)
+add_clar_test(libgit2_tests gitdaemon_namespace -v -sonline::clone::namespace)
+add_clar_test(libgit2_tests gitdaemon_sha256 -v -sonline::clone::sha256)
+add_clar_test(libgit2_tests ssh -v -sonline::push -sonline::clone::ssh_cert -sonline::clone::ssh_with_paths -sonline::clone::path_whitespace_ssh -sonline::clone::ssh_auth_methods)
add_clar_test(libgit2_tests proxy -v -sonline::clone::proxy)
add_clar_test(libgit2_tests auth_clone -v -sonline::clone::cred)
add_clar_test(libgit2_tests auth_clone_and_push -v -sonline::clone::push -sonline::push)
diff --git a/tests/libgit2/commit/parse.c b/tests/libgit2/commit/parse.c
index b313fc308..3a1fc3d26 100644
--- a/tests/libgit2/commit/parse.c
+++ b/tests/libgit2/commit/parse.c
@@ -287,7 +287,7 @@ static int parse_commit(git_commit **out, const char *buffer)
fake_odb_object.buffer = (char *)buffer;
fake_odb_object.cached.size = strlen(fake_odb_object.buffer);
- error = git_commit__parse(commit, &fake_odb_object);
+ error = git_commit__parse(commit, &fake_odb_object, GIT_OID_SHA1);
*out = commit;
return error;
diff --git a/tests/libgit2/config/include.c b/tests/libgit2/config/include.c
index 9328f3cf6..1b55fdc86 100644
--- a/tests/libgit2/config/include.c
+++ b/tests/libgit2/config/include.c
@@ -42,8 +42,13 @@ void test_config_include__absolute(void)
void test_config_include__homedir(void)
{
- cl_git_pass(git_libgit2_opts(GIT_OPT_SET_SEARCH_PATH, GIT_CONFIG_LEVEL_GLOBAL, cl_fixture("config")));
+ git_str homefile = GIT_STR_INIT;
+
+ cl_fake_homedir(&homefile);
+ cl_git_pass(git_str_joinpath(&homefile, homefile.ptr, "config-included"));
+
cl_git_mkfile("config-include-homedir", "[include]\npath = ~/config-included");
+ cl_git_mkfile(homefile.ptr, "[foo \"bar\"]\n\tbaz = huzzah\n");
cl_git_pass(git_config_open_ondisk(&cfg, "config-include-homedir"));
@@ -53,6 +58,8 @@ void test_config_include__homedir(void)
cl_sandbox_set_search_path_defaults();
cl_git_pass(p_unlink("config-include-homedir"));
+
+ git_str_dispose(&homefile);
}
/* We need to pretend that the variables were defined where the file was included */
@@ -113,7 +120,8 @@ void test_config_include__missing(void)
void test_config_include__missing_homedir(void)
{
- cl_git_pass(git_libgit2_opts(GIT_OPT_SET_SEARCH_PATH, GIT_CONFIG_LEVEL_GLOBAL, cl_fixture("config")));
+ cl_fake_homedir(NULL);
+
cl_git_mkfile("including", "[include]\npath = ~/.nonexistentfile\n[foo]\nbar = baz");
git_error_clear();
diff --git a/tests/libgit2/config/read.c b/tests/libgit2/config/read.c
index a2e668c20..ac6459b9e 100644
--- a/tests/libgit2/config/read.c
+++ b/tests/libgit2/config/read.c
@@ -728,14 +728,11 @@ void test_config_read__path(void)
{
git_config *cfg;
git_buf path = GIT_BUF_INIT;
- git_buf old_path = GIT_BUF_INIT;
git_str home_path = GIT_STR_INIT;
git_str expected_path = GIT_STR_INIT;
- cl_git_pass(p_mkdir("fakehome", 0777));
- cl_git_pass(git_fs_path_prettify(&home_path, "fakehome", NULL));
- cl_git_pass(git_libgit2_opts(GIT_OPT_GET_SEARCH_PATH, GIT_CONFIG_LEVEL_GLOBAL, &old_path));
- cl_git_pass(git_libgit2_opts(GIT_OPT_SET_SEARCH_PATH, GIT_CONFIG_LEVEL_GLOBAL, home_path.ptr));
+ cl_fake_homedir(&home_path);
+
cl_git_mkfile("./testconfig", "[some]\n path = ~/somefile");
cl_git_pass(git_fs_path_join_unrooted(&expected_path, "somefile", home_path.ptr, NULL));
@@ -761,8 +758,6 @@ void test_config_read__path(void)
cl_git_mkfile("./testconfig", "[some]\n path = ~user/foo");
cl_git_fail(git_config_get_path(&path, cfg, "some.path"));
- cl_git_pass(git_libgit2_opts(GIT_OPT_SET_SEARCH_PATH, GIT_CONFIG_LEVEL_GLOBAL, old_path.ptr));
- git_buf_dispose(&old_path);
git_str_dispose(&home_path);
git_str_dispose(&expected_path);
git_config_free(cfg);
diff --git a/tests/libgit2/core/oid.c b/tests/libgit2/core/oid.c
index 9fe4413b7..a405b3344 100644
--- a/tests/libgit2/core/oid.c
+++ b/tests/libgit2/core/oid.c
@@ -52,7 +52,9 @@ void test_core_oid__streq_sha1(void)
void test_core_oid__streq_sha256(void)
{
-#ifdef GIT_EXPERIMENTAL_SHA256
+#ifndef GIT_EXPERIMENTAL_SHA256
+ cl_skip();
+#else
cl_assert_equal_i(0, git_oid_streq(&id_sha256, str_oid_sha256));
cl_assert_equal_i(-1, git_oid_streq(&id_sha256, "deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef"));
@@ -90,7 +92,9 @@ void test_core_oid__strcmp_sha1(void)
void test_core_oid__strcmp_sha256(void)
{
-#ifdef GIT_EXPERIMENTAL_SHA256
+#ifndef GIT_EXPERIMENTAL_SHA256
+ cl_skip();
+#else
cl_assert_equal_i(0, git_oid_strcmp(&id_sha256, str_oid_sha256));
cl_assert(git_oid_strcmp(&id_sha256, "deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef") < 0);
@@ -129,7 +133,9 @@ void test_core_oid__ncmp_sha1(void)
void test_core_oid__ncmp_sha256(void)
{
-#ifdef GIT_EXPERIMENTAL_SHA256
+#ifndef GIT_EXPERIMENTAL_SHA256
+ cl_skip();
+#else
cl_assert(!git_oid_ncmp(&id_sha256, &idp_sha256, 0));
cl_assert(!git_oid_ncmp(&id_sha256, &idp_sha256, 1));
cl_assert(!git_oid_ncmp(&id_sha256, &idp_sha256, 2));
@@ -186,3 +192,22 @@ void test_core_oid__fmt_substr_sha1(void)
git_oid_fmt_substr(buf, &id_sha1, 5, 6);
cl_assert_equal_s(buf, "12eea6");
}
+
+void test_core_oid__type_lookup(void)
+{
+ cl_assert_equal_i(GIT_OID_SHA1, git_oid_type_fromstr("sha1"));
+ cl_assert_equal_i(GIT_OID_SHA1, git_oid_type_fromstrn("sha1...", 4));
+ cl_assert_equal_s("sha1", git_oid_type_name(GIT_OID_SHA1));
+
+#ifdef GIT_EXPERIMENTAL_SHA256
+ cl_assert_equal_i(GIT_OID_SHA256, git_oid_type_fromstr("sha256"));
+ cl_assert_equal_i(GIT_OID_SHA256, git_oid_type_fromstrn("sha256...", 6));
+ cl_assert_equal_s("sha256", git_oid_type_name(GIT_OID_SHA256));
+#endif
+
+ cl_assert_equal_i(0, git_oid_type_fromstr("sha42"));
+ cl_assert_equal_i(0, git_oid_type_fromstrn("sha1", 3));
+ cl_assert_equal_i(0, git_oid_type_fromstrn("sha1...", 5));
+ cl_assert_equal_s("unknown", git_oid_type_name(0));
+ cl_assert_equal_s("unknown", git_oid_type_name(42));
+}
diff --git a/tests/libgit2/core/opts.c b/tests/libgit2/core/opts.c
index e8f65d510..486ff58c6 100644
--- a/tests/libgit2/core/opts.c
+++ b/tests/libgit2/core/opts.c
@@ -34,8 +34,9 @@ void test_core_opts__extensions_query(void)
cl_git_pass(git_libgit2_opts(GIT_OPT_GET_EXTENSIONS, &out));
- cl_assert_equal_sz(out.count, 1);
+ cl_assert_equal_sz(out.count, 2);
cl_assert_equal_s("noop", out.strings[0]);
+ cl_assert_equal_s("objectformat", out.strings[1]);
git_strarray_dispose(&out);
}
@@ -48,9 +49,10 @@ void test_core_opts__extensions_add(void)
cl_git_pass(git_libgit2_opts(GIT_OPT_SET_EXTENSIONS, in, ARRAY_SIZE(in)));
cl_git_pass(git_libgit2_opts(GIT_OPT_GET_EXTENSIONS, &out));
- cl_assert_equal_sz(out.count, 2);
+ cl_assert_equal_sz(out.count, 3);
cl_assert_equal_s("noop", out.strings[0]);
- cl_assert_equal_s("foo", out.strings[1]);
+ cl_assert_equal_s("objectformat", out.strings[1]);
+ cl_assert_equal_s("foo", out.strings[2]);
git_strarray_dispose(&out);
}
@@ -63,9 +65,10 @@ void test_core_opts__extensions_remove(void)
cl_git_pass(git_libgit2_opts(GIT_OPT_SET_EXTENSIONS, in, ARRAY_SIZE(in)));
cl_git_pass(git_libgit2_opts(GIT_OPT_GET_EXTENSIONS, &out));
- cl_assert_equal_sz(out.count, 2);
- cl_assert_equal_s("bar", out.strings[0]);
- cl_assert_equal_s("baz", out.strings[1]);
+ cl_assert_equal_sz(out.count, 3);
+ cl_assert_equal_s("objectformat", out.strings[0]);
+ cl_assert_equal_s("bar", out.strings[1]);
+ cl_assert_equal_s("baz", out.strings[2]);
git_strarray_dispose(&out);
}
diff --git a/tests/libgit2/core/structinit.c b/tests/libgit2/core/structinit.c
index 160e2f612..8a6e48d2a 100644
--- a/tests/libgit2/core/structinit.c
+++ b/tests/libgit2/core/structinit.c
@@ -160,6 +160,11 @@ void test_core_structinit__compare(void)
git_stash_apply_options, GIT_STASH_APPLY_OPTIONS_VERSION, \
GIT_STASH_APPLY_OPTIONS_INIT, git_stash_apply_options_init);
+ /* stash save */
+ CHECK_MACRO_FUNC_INIT_EQUAL( \
+ git_stash_save_options, GIT_STASH_SAVE_OPTIONS_VERSION, \
+ GIT_STASH_SAVE_OPTIONS_INIT, git_stash_save_options_init);
+
/* status */
CHECK_MACRO_FUNC_INIT_EQUAL( \
git_status_options, GIT_STATUS_OPTIONS_VERSION, \
diff --git a/tests/libgit2/diff/workdir.c b/tests/libgit2/diff/workdir.c
index 8ccde41ff..21c5b0de9 100644
--- a/tests/libgit2/diff/workdir.c
+++ b/tests/libgit2/diff/workdir.c
@@ -1232,6 +1232,42 @@ void test_diff_workdir__checks_options_version(void)
cl_assert_equal_i(GIT_ERROR_INVALID, err->klass);
}
+void test_diff_workdir__can_diff_empty_untracked_file(void)
+{
+ git_diff_options opts = GIT_DIFF_OPTIONS_INIT;
+ git_diff *diff = NULL;
+ git_patch *patch = NULL;
+
+ g_repo = cl_git_sandbox_init("empty_standard_repo");
+
+ cl_git_mkfile("empty_standard_repo/emptyfile.txt", "");
+
+ opts.context_lines = 3;
+ opts.interhunk_lines = 1;
+ opts.flags |= GIT_DIFF_INCLUDE_UNTRACKED | GIT_DIFF_SHOW_UNTRACKED_CONTENT;
+
+ cl_git_pass(git_diff_index_to_workdir(&diff, g_repo, NULL, &opts));
+
+ /* without filters */
+ git_patch_from_diff(&patch, diff, 0);
+ cl_assert(NULL != patch);
+ cl_assert(0 == git_patch_get_delta(patch)->new_file.size);
+ cl_assert(0 == strcmp("emptyfile.txt", git_patch_get_delta(patch)->new_file.path));
+ git_patch_free(patch);
+ patch = NULL;
+
+ /* with a filter */
+ cl_repo_set_bool(g_repo, "core.autocrlf", true); /* install some filter */
+ git_patch_from_diff(&patch, diff, 0);
+ cl_assert(NULL != patch);
+ cl_assert(0 == git_patch_get_delta(patch)->new_file.size);
+ cl_assert(0 == strcmp("emptyfile.txt", git_patch_get_delta(patch)->new_file.path));
+ git_patch_free(patch);
+ patch = NULL;
+
+ git_diff_free(diff);
+}
+
void test_diff_workdir__can_diff_empty_file(void)
{
git_diff *diff;
diff --git a/tests/libgit2/email/create.c.bak b/tests/libgit2/email/create.c.bak
deleted file mode 100644
index cbb140bd2..000000000
--- a/tests/libgit2/email/create.c.bak
+++ /dev/null
@@ -1,386 +0,0 @@
-#include "clar.h"
-#include "clar_libgit2.h"
-
-#include "buffer.h"
-#include "diff_generate.h"
-
-static git_repository *repo;
-
-void test_email_create__initialize(void)
-{
- repo = cl_git_sandbox_init("diff_format_email");
-}
-
-void test_email_create__cleanup(void)
-{
- cl_git_sandbox_cleanup();
-}
-
-static void email_for_commit(
- git_buf *out,
- const char *commit_id,
- git_email_create_options *opts)
-{
- git_oid oid;
- git_commit *commit = NULL;
- git_diff *diff = NULL;
-
- git_oid_fromstr(&oid, commit_id, GIT_OID_SHA1);
-
- cl_git_pass(git_commit_lookup(&commit, repo, &oid));
-
- cl_git_pass(git_email_create_from_commit(out, commit, opts));
-
- git_diff_free(diff);
- git_commit_free(commit);
-}
-
-static void assert_email_match(
- const char *expected,
- const char *commit_id,
- git_email_create_options *opts)
-{
- git_buf buf = GIT_BUF_INIT;
-
- email_for_commit(&buf, commit_id, opts);
- cl_assert_equal_s(expected, git_buf_cstr(&buf));
-
- git_buf_dispose(&buf);
-}
-
-static void assert_subject_match(
- const char *expected,
- const char *commit_id,
- git_email_create_options *opts)
-{
- git_buf buf = GIT_BUF_INIT;
- const char *loc;
-
- email_for_commit(&buf, commit_id, opts);
-
- cl_assert((loc = strstr(buf.ptr, "\nSubject: ")) != NULL);
- git_buf_consume(&buf, (loc + 10));
- git_buf_truncate_at_char(&buf, '\n');
-
- cl_assert_equal_s(expected, git_buf_cstr(&buf));
-
- git_buf_dispose(&buf);
-}
-
-void test_email_create__commit(void)
-{
- const char *expected =
- "From 9264b96c6d104d0e07ae33d3007b6a48246c6f92 Mon Sep 17 00:00:00 2001\n" \
- "From: Jacques Germishuys <jacquesg@striata.com>\n" \
- "Date: Wed, 9 Apr 2014 20:57:01 +0200\n" \
- "Subject: [PATCH] Modify some content\n" \
- "\n" \
- "---\n" \
- " file1.txt | 8 +++++---\n" \
- " 1 file changed, 5 insertions(+), 3 deletions(-)\n" \
- "\n" \
- "diff --git a/file1.txt b/file1.txt\n" \
- "index 94aaae8..af8f41d 100644\n" \
- "--- a/file1.txt\n" \
- "+++ b/file1.txt\n" \
- "@@ -1,15 +1,17 @@\n" \
- " file1.txt\n" \
- " file1.txt\n" \
- "+_file1.txt_\n" \
- " file1.txt\n" \
- " file1.txt\n" \
- " file1.txt\n" \
- " file1.txt\n" \
- "+\n" \
- "+\n" \
- " file1.txt\n" \
- " file1.txt\n" \
- " file1.txt\n" \
- " file1.txt\n" \
- " file1.txt\n" \
- "-file1.txt\n" \
- "-file1.txt\n" \
- "-file1.txt\n" \
- "+_file1.txt_\n" \
- "+_file1.txt_\n" \
- " file1.txt\n" \
- "--\n" \
- "libgit2 " LIBGIT2_VERSION "\n" \
- "\n";
-
- assert_email_match(
- expected, "9264b96c6d104d0e07ae33d3007b6a48246c6f92", NULL);
-}
-
-void test_email_create__custom_summary_and_body(void)
-{
- const char *expected = "From 627e7e12d87e07a83fad5b6bfa25e86ead4a5270 Mon Sep 17 00:00:00 2001\n" \
- "From: Patrick Steinhardt <ps@pks.im>\n" \
- "Date: Tue, 24 Nov 2015 13:34:39 +0100\n" \
- "Subject: [PPPPPATCH 2/4] This is a subject\n" \
- "\n" \
- "Modify content of file3.txt by appending a new line. Make this\n" \
- "commit message somewhat longer to test behavior with newlines\n" \
- "embedded in the message body.\n" \
- "\n" \
- "Also test if new paragraphs are included correctly.\n" \
- "---\n" \
- " file3.txt | 1 +\n" \
- " 1 file changed, 1 insertion(+)\n" \
- "\n" \
- "diff --git a/file3.txt b/file3.txt\n" \
- "index 9a2d780..7309653 100644\n" \
- "--- a/file3.txt\n" \
- "+++ b/file3.txt\n" \
- "@@ -3,3 +3,4 @@ file3!\n" \
- " file3\n" \
- " file3\n" \
- " file3\n" \
- "+file3\n" \
- "--\n" \
- "libgit2 " LIBGIT2_VERSION "\n" \
- "\n";
-
- const char *summary = "This is a subject\nwith\nnewlines";
- const char *body = "Modify content of file3.txt by appending a new line. Make this\n" \
- "commit message somewhat longer to test behavior with newlines\n" \
- "embedded in the message body.\n" \
- "\n" \
- "Also test if new paragraphs are included correctly.";
-
- git_oid oid;
- git_commit *commit = NULL;
- git_diff *diff = NULL;
- git_buf buf = GIT_BUF_INIT;
- git_email_create_options opts = GIT_EMAIL_CREATE_OPTIONS_INIT;
-
- opts.subject_prefix = "PPPPPATCH";
-
- git_oid_fromstr(&oid, "627e7e12d87e07a83fad5b6bfa25e86ead4a5270", GIT_OID_SHA1);
- cl_git_pass(git_commit_lookup(&commit, repo, &oid));
- cl_git_pass(git_diff__commit(&diff, repo, commit, NULL));
- cl_git_pass(git_email_create_from_diff(&buf, diff, 2, 4, &oid, summary, body, git_commit_author(commit), &opts));
-
- cl_assert_equal_s(expected, git_buf_cstr(&buf));
-
- git_diff_free(diff);
- git_commit_free(commit);
- git_buf_dispose(&buf);
-}
-
-void test_email_create__mode_change(void)
-{
- const char *expected =
- "From 7ade76dd34bba4733cf9878079f9fd4a456a9189 Mon Sep 17 00:00:00 2001\n" \
- "From: Jacques Germishuys <jacquesg@striata.com>\n" \
- "Date: Thu, 10 Apr 2014 10:05:03 +0200\n" \
- "Subject: [PATCH] Update permissions\n" \
- "\n" \
- "---\n" \
- " file1.txt.renamed | 0\n" \
- " 1 file changed, 0 insertions(+), 0 deletions(-)\n" \
- " mode change 100644 => 100755 file1.txt.renamed\n" \
- "\n" \
- "diff --git a/file1.txt.renamed b/file1.txt.renamed\n" \
- "old mode 100644\n" \
- "new mode 100755\n" \
- "--\n" \
- "libgit2 " LIBGIT2_VERSION "\n" \
- "\n";
-
- assert_email_match(expected, "7ade76dd34bba4733cf9878079f9fd4a456a9189", NULL);
-}
-
-void test_email_create__rename(void)
-{
- const char *expected =
- "From 6e05acc5a5dab507d91a0a0cc0fb05a3dd98892d Mon Sep 17 00:00:00 2001\n" \
- "From: Jacques Germishuys <jacquesg@striata.com>\n" \
- "Date: Wed, 9 Apr 2014 21:15:56 +0200\n" \
- "Subject: [PATCH] Renamed file1.txt -> file1.txt.renamed\n" \
- "\n" \
- "---\n" \
- " file1.txt => file1.txt.renamed | 4 ++--\n" \
- " 1 file changed, 2 insertions(+), 2 deletions(-)\n" \
- "\n" \
- "diff --git a/file1.txt b/file1.txt.renamed\n" \
- "similarity index 86%\n" \
- "rename from file1.txt\n" \
- "rename to file1.txt.renamed\n" \
- "index af8f41d..a97157a 100644\n" \
- "--- a/file1.txt\n" \
- "+++ b/file1.txt.renamed\n" \
- "@@ -3,13 +3,13 @@ file1.txt\n" \
- " _file1.txt_\n" \
- " file1.txt\n" \
- " file1.txt\n" \
- "-file1.txt\n" \
- "+file1.txt_renamed\n" \
- " file1.txt\n" \
- " \n" \
- " \n" \
- " file1.txt\n" \
- " file1.txt\n" \
- "-file1.txt\n" \
- "+file1.txt_renamed\n" \
- " file1.txt\n" \
- " file1.txt\n" \
- " _file1.txt_\n" \
- "--\n" \
- "libgit2 " LIBGIT2_VERSION "\n" \
- "\n";
-
- assert_email_match(expected, "6e05acc5a5dab507d91a0a0cc0fb05a3dd98892d", NULL);
-}
-
-void test_email_create__rename_as_add_delete(void)
-{
- const char *expected =
- "From 6e05acc5a5dab507d91a0a0cc0fb05a3dd98892d Mon Sep 17 00:00:00 2001\n" \
- "From: Jacques Germishuys <jacquesg@striata.com>\n" \
- "Date: Wed, 9 Apr 2014 21:15:56 +0200\n" \
- "Subject: [PATCH] Renamed file1.txt -> file1.txt.renamed\n" \
- "\n" \
- "---\n" \
- " file1.txt | 17 -----------------\n" \
- " file1.txt.renamed | 17 +++++++++++++++++\n" \
- " 2 files changed, 17 insertions(+), 17 deletions(-)\n" \
- " delete mode 100644 file1.txt\n" \
- " create mode 100644 file1.txt.renamed\n" \
- "\n" \
- "diff --git a/file1.txt b/file1.txt\n" \
- "deleted file mode 100644\n" \
- "index af8f41d..0000000\n" \
- "--- a/file1.txt\n" \
- "+++ /dev/null\n" \
- "@@ -1,17 +0,0 @@\n" \
- "-file1.txt\n" \
- "-file1.txt\n" \
- "-_file1.txt_\n" \
- "-file1.txt\n" \
- "-file1.txt\n" \
- "-file1.txt\n" \
- "-file1.txt\n" \
- "-\n" \
- "-\n" \
- "-file1.txt\n" \
- "-file1.txt\n" \
- "-file1.txt\n" \
- "-file1.txt\n" \
- "-file1.txt\n" \
- "-_file1.txt_\n" \
- "-_file1.txt_\n" \
- "-file1.txt\n" \
- "diff --git a/file1.txt.renamed b/file1.txt.renamed\n" \
- "new file mode 100644\n" \
- "index 0000000..a97157a\n" \
- "--- /dev/null\n" \
- "+++ b/file1.txt.renamed\n" \
- "@@ -0,0 +1,17 @@\n" \
- "+file1.txt\n" \
- "+file1.txt\n" \
- "+_file1.txt_\n" \
- "+file1.txt\n" \
- "+file1.txt\n" \
- "+file1.txt_renamed\n" \
- "+file1.txt\n" \
- "+\n" \
- "+\n" \
- "+file1.txt\n" \
- "+file1.txt\n" \
- "+file1.txt_renamed\n" \
- "+file1.txt\n" \
- "+file1.txt\n" \
- "+_file1.txt_\n" \
- "+_file1.txt_\n" \
- "+file1.txt\n" \
- "--\n" \
- "libgit2 " LIBGIT2_VERSION "\n" \
- "\n";
-
- git_email_create_options opts = GIT_EMAIL_CREATE_OPTIONS_INIT;
- opts.flags |= GIT_EMAIL_CREATE_NO_RENAMES;
-
- assert_email_match(expected, "6e05acc5a5dab507d91a0a0cc0fb05a3dd98892d", &opts);
-}
-
-void test_email_create__binary(void)
-{
- const char *expected =
- "From 8d7523f6fcb2404257889abe0d96f093d9f524f9 Mon Sep 17 00:00:00 2001\n" \
- "From: Jacques Germishuys <jacquesg@striata.com>\n" \
- "Date: Sun, 13 Apr 2014 18:10:18 +0200\n" \
- "Subject: [PATCH] Modified binary file\n" \
- "\n" \
- "---\n" \
- " binary.bin | Bin 3 -> 5 bytes\n" \
- " 1 file changed, 0 insertions(+), 0 deletions(-)\n" \
- "\n" \
- "diff --git a/binary.bin b/binary.bin\n" \
- "index bd474b2519cc15eab801ff851cc7d50f0dee49a1..9ac35ff15cd8864aeafd889e4826a3150f0b06c4 100644\n" \
- "GIT binary patch\n" \
- "literal 5\n" \
- "Mc${NkU}WL~000&M4gdfE\n" \
- "\n" \
- "literal 3\n" \
- "Kc${Nk-~s>u4FC%O\n" \
- "\n" \
- "--\n" \
- "libgit2 " LIBGIT2_VERSION "\n" \
- "\n";
-
- assert_email_match(expected, "8d7523f6fcb2404257889abe0d96f093d9f524f9", NULL);
-}
-
-void test_email_create__binary_not_included(void)
-{
- const char *expected =
- "From 8d7523f6fcb2404257889abe0d96f093d9f524f9 Mon Sep 17 00:00:00 2001\n" \
- "From: Jacques Germishuys <jacquesg@striata.com>\n" \
- "Date: Sun, 13 Apr 2014 18:10:18 +0200\n" \
- "Subject: [PATCH] Modified binary file\n" \
- "\n" \
- "---\n" \
- " binary.bin | Bin 3 -> 5 bytes\n" \
- " 1 file changed, 0 insertions(+), 0 deletions(-)\n" \
- "\n" \
- "diff --git a/binary.bin b/binary.bin\n" \
- "index bd474b2..9ac35ff 100644\n" \
- "Binary files a/binary.bin and b/binary.bin differ\n" \
- "--\n" \
- "libgit2 " LIBGIT2_VERSION "\n" \
- "\n";
-
- git_email_create_options opts = GIT_EMAIL_CREATE_OPTIONS_INIT;
- opts.diff_opts.flags &= ~GIT_DIFF_SHOW_BINARY;
-
- assert_email_match(expected, "8d7523f6fcb2404257889abe0d96f093d9f524f9", &opts);
-}
-
-void test_email_create__commit_subjects(void)
-{
- git_email_create_options opts = GIT_EMAIL_CREATE_OPTIONS_INIT;
-
- assert_subject_match("[PATCH] Modify some content", "9264b96c6d104d0e07ae33d3007b6a48246c6f92", &opts);
-
- opts.reroll_number = 42;
- assert_subject_match("[PATCH v42] Modify some content", "9264b96c6d104d0e07ae33d3007b6a48246c6f92", &opts);
-
- opts.flags |= GIT_EMAIL_CREATE_ALWAYS_NUMBER;
- assert_subject_match("[PATCH v42 1/1] Modify some content", "9264b96c6d104d0e07ae33d3007b6a48246c6f92", &opts);
-
- opts.start_number = 9;
- assert_subject_match("[PATCH v42 9/9] Modify some content", "9264b96c6d104d0e07ae33d3007b6a48246c6f92", &opts);
-
- opts.subject_prefix = "";
- assert_subject_match("[v42 9/9] Modify some content", "9264b96c6d104d0e07ae33d3007b6a48246c6f92", &opts);
-
- opts.reroll_number = 0;
- assert_subject_match("[9/9] Modify some content", "9264b96c6d104d0e07ae33d3007b6a48246c6f92", &opts);
-
- opts.start_number = 0;
- assert_subject_match("[1/1] Modify some content", "9264b96c6d104d0e07ae33d3007b6a48246c6f92", &opts);
-
- opts.flags = GIT_EMAIL_CREATE_OMIT_NUMBERS;
- assert_subject_match("Modify some content", "9264b96c6d104d0e07ae33d3007b6a48246c6f92", &opts);
-}
diff --git a/tests/libgit2/graph/commitgraph.c b/tests/libgit2/graph/commitgraph.c
index e2452000d..82f7f936f 100644
--- a/tests/libgit2/graph/commitgraph.c
+++ b/tests/libgit2/graph/commitgraph.c
@@ -124,3 +124,44 @@ void test_graph_commitgraph__writer(void)
git_commit_graph_writer_free(w);
git_repository_free(repo);
}
+
+void test_graph_commitgraph__validate(void)
+{
+ git_repository *repo;
+ struct git_commit_graph *cgraph;
+ git_str objects_dir = GIT_STR_INIT;
+
+ cl_git_pass(git_repository_open(&repo, cl_fixture("testrepo.git")));
+ cl_git_pass(git_str_joinpath(&objects_dir, git_repository_path(repo), "objects"));
+
+ /* git_commit_graph_open() calls git_commit_graph_validate() */
+ cl_git_pass(git_commit_graph_open(&cgraph, git_str_cstr(&objects_dir)));
+
+ git_commit_graph_free(cgraph);
+ git_str_dispose(&objects_dir);
+ git_repository_free(repo);
+}
+
+void test_graph_commitgraph__validate_corrupt(void)
+{
+ git_repository *repo;
+ struct git_commit_graph *cgraph;
+ int fd = -1;
+
+ cl_fixture_sandbox("testrepo.git");
+ cl_git_pass(git_repository_open(&repo, cl_git_sandbox_path(1, "testrepo.git", NULL)));
+
+ /* corrupt commit graph checksum at the end of the file */
+ cl_assert((fd = p_open(cl_git_sandbox_path(0, "testrepo.git", "objects", "info", "commit-graph", NULL), O_WRONLY)) > 0);
+ cl_assert(p_lseek(fd, -5, SEEK_END) > 0);
+ cl_must_pass(p_write(fd, "\0\0", 2));
+ cl_must_pass(p_close(fd));
+
+ /* git_commit_graph_open() calls git_commit_graph_validate() */
+ cl_git_fail(git_commit_graph_open(&cgraph, cl_git_sandbox_path(1, "testrepo.git", "objects", NULL)));
+
+ git_commit_graph_free(cgraph);
+ git_repository_free(repo);
+
+ cl_fixture_cleanup("testrepo.git");
+}
diff --git a/tests/libgit2/ignore/path.c b/tests/libgit2/ignore/path.c
index a574d1d79..17f28bc5d 100644
--- a/tests/libgit2/ignore/path.c
+++ b/tests/libgit2/ignore/path.c
@@ -286,14 +286,16 @@ void test_ignore_path__subdirectory_gitignore(void)
void test_ignore_path__expand_tilde_to_homedir(void)
{
+ git_str homefile = GIT_STR_INIT;
git_config *cfg;
assert_is_ignored(false, "example.global_with_tilde");
- cl_fake_home();
+ cl_fake_homedir(&homefile);
+ cl_git_pass(git_str_joinpath(&homefile, homefile.ptr, "globalexclude"));
/* construct fake home with fake global excludes */
- cl_git_mkfile("home/globalexclude", "# found me\n*.global_with_tilde\n");
+ cl_git_mkfile(homefile.ptr, "# found me\n*.global_with_tilde\n");
cl_git_pass(git_repository_config(&cfg, g_repo));
cl_git_pass(git_config_set_string(cfg, "core.excludesfile", "~/globalexclude"));
@@ -305,11 +307,13 @@ void test_ignore_path__expand_tilde_to_homedir(void)
cl_git_pass(git_futils_rmdir_r("home", NULL, GIT_RMDIR_REMOVE_FILES));
- cl_fake_home_cleanup(NULL);
+ cl_fake_homedir_cleanup(NULL);
git_attr_cache_flush(g_repo); /* must reset to pick up change */
assert_is_ignored(false, "example.global_with_tilde");
+
+ git_str_dispose(&homefile);
}
/* Ensure that the .gitignore in the subdirectory only affects
diff --git a/tests/libgit2/ignore/status.c b/tests/libgit2/ignore/status.c
index deb717590..a007774d7 100644
--- a/tests/libgit2/ignore/status.c
+++ b/tests/libgit2/ignore/status.c
@@ -363,6 +363,7 @@ void test_ignore_status__subdirectories_not_at_root(void)
void test_ignore_status__leading_slash_ignores(void)
{
+ git_str homedir = GIT_STR_INIT;
git_status_options opts = GIT_STATUS_OPTIONS_INIT;
status_entry_counts counts;
static const char *paths_2[] = {
@@ -385,8 +386,9 @@ void test_ignore_status__leading_slash_ignores(void)
make_test_data(test_repo_1, test_files_1);
- cl_fake_home();
- cl_git_mkfile("home/.gitignore", "/ignore_me\n");
+ cl_fake_homedir(&homedir);
+ cl_git_pass(git_str_joinpath(&homedir, homedir.ptr, ".gitignore"));
+ cl_git_mkfile(homedir.ptr, "/ignore_me\n");
{
git_config *cfg;
cl_git_pass(git_repository_config(&cfg, g_repo));
@@ -412,6 +414,8 @@ void test_ignore_status__leading_slash_ignores(void)
cl_assert_equal_i(counts.expected_entry_count, counts.entry_count);
cl_assert_equal_i(0, counts.wrong_status_flags_count);
cl_assert_equal_i(0, counts.wrong_sorted_path);
+
+ git_str_dispose(&homedir);
}
void test_ignore_status__multiple_leading_slash(void)
diff --git a/tests/libgit2/index/addall.c b/tests/libgit2/index/addall.c
index 6f95f6386..e76b6e81d 100644
--- a/tests/libgit2/index/addall.c
+++ b/tests/libgit2/index/addall.c
@@ -441,6 +441,52 @@ void test_index_addall__callback_filtering(void)
git_index_free(index);
}
+void test_index_addall__handles_ignored_files_in_directory(void)
+{
+ git_index *index;
+
+ g_repo = cl_git_sandbox_init_new(TEST_DIR);
+
+ cl_git_mkfile(TEST_DIR "/file.foo", "a file");
+ cl_git_mkfile(TEST_DIR "/file.bar", "another file");
+ cl_must_pass(p_mkdir(TEST_DIR "/folder", 0777));
+ cl_git_mkfile(TEST_DIR "/folder/asdf", "yet another file");
+
+ cl_git_mkfile(TEST_DIR "/.gitignore", "folder/\n");
+
+ check_status(g_repo, 0, 0, 0, 3, 0, 0, 1, 0);
+
+ cl_git_pass(git_repository_index(&index, g_repo));
+ cl_git_pass(git_index_add_all(index, NULL, 0, NULL, NULL));
+
+ check_status(g_repo, 3, 0, 0, 0, 0, 0, 1, 0);
+
+ git_index_free(index);
+}
+
+void test_index_addall__force_adds_ignored_directories(void)
+{
+ git_index *index;
+
+ g_repo = cl_git_sandbox_init_new(TEST_DIR);
+
+ cl_git_mkfile(TEST_DIR "/file.foo", "a file");
+ cl_git_mkfile(TEST_DIR "/file.bar", "another file");
+ cl_must_pass(p_mkdir(TEST_DIR "/folder", 0777));
+ cl_git_mkfile(TEST_DIR "/folder/asdf", "yet another file");
+
+ cl_git_mkfile(TEST_DIR "/.gitignore", "folder/\n");
+
+ check_status(g_repo, 0, 0, 0, 3, 0, 0, 1, 0);
+
+ cl_git_pass(git_repository_index(&index, g_repo));
+ cl_git_pass(git_index_add_all(index, NULL, GIT_INDEX_ADD_FORCE, NULL, NULL));
+
+ check_status(g_repo, 4, 0, 0, 0, 0, 0, 0, 0);
+
+ git_index_free(index);
+}
+
void test_index_addall__adds_conflicts(void)
{
git_index *index;
diff --git a/tests/libgit2/object/commit/parse.c b/tests/libgit2/object/commit/parse.c
index 28a3ccd85..6f9a65507 100644
--- a/tests/libgit2/object/commit/parse.c
+++ b/tests/libgit2/object/commit/parse.c
@@ -3,7 +3,10 @@
#include "object.h"
#include "signature.h"
-static void assert_commit_parses(const char *data, size_t datalen,
+static void assert_commit_parses(
+ const char *data,
+ size_t datalen,
+ git_oid_t oid_type,
const char *expected_treeid,
const char *expected_author,
const char *expected_committer,
@@ -14,7 +17,7 @@ static void assert_commit_parses(const char *data, size_t datalen,
git_commit *commit;
if (!datalen)
datalen = strlen(data);
- cl_git_pass(git_object__from_raw((git_object **) &commit, data, datalen, GIT_OBJECT_COMMIT));
+ cl_git_pass(git_object__from_raw((git_object **) &commit, data, datalen, GIT_OBJECT_COMMIT, oid_type));
if (expected_author) {
git_signature *author;
@@ -51,7 +54,7 @@ static void assert_commit_parses(const char *data, size_t datalen,
if (expected_treeid) {
git_oid tree_oid;
- cl_git_pass(git_oid__fromstr(&tree_oid, expected_treeid, GIT_OID_SHA1));
+ cl_git_pass(git_oid__fromstr(&tree_oid, expected_treeid, oid_type));
cl_assert_equal_oid(&tree_oid, &commit->tree_id);
}
@@ -60,15 +63,18 @@ static void assert_commit_parses(const char *data, size_t datalen,
git_object__free(&commit->object);
}
-static void assert_commit_fails(const char *data, size_t datalen)
+static void assert_commit_fails(
+ const char *data,
+ size_t datalen,
+ git_oid_t oid_type)
{
git_object *object;
if (!datalen)
datalen = strlen(data);
- cl_git_fail(git_object__from_raw(&object, data, datalen, GIT_OBJECT_COMMIT));
+ cl_git_fail(git_object__from_raw(&object, data, datalen, GIT_OBJECT_COMMIT, oid_type));
}
-void test_object_commit_parse__parsing_commit_succeeds(void)
+void test_object_commit_parse__sha1_parsing_commit_succeeds(void)
{
const char *commit =
"tree 3e7ac388cadacccdf1c6c5f3445895b71d9cb0f8\n"
@@ -77,7 +83,7 @@ void test_object_commit_parse__parsing_commit_succeeds(void)
"encoding Encoding\n"
"\n"
"Message";
- assert_commit_parses(commit, 0,
+ assert_commit_parses(commit, 0, GIT_OID_SHA1,
"3e7ac388cadacccdf1c6c5f3445895b71d9cb0f8",
"Author <author@example.com>",
"Committer <committer@example.com>",
@@ -85,7 +91,7 @@ void test_object_commit_parse__parsing_commit_succeeds(void)
"Message", 0);
}
-void test_object_commit_parse__parsing_commit_without_encoding_succeeds(void)
+void test_object_commit_parse__sha1_parsing_commit_without_encoding_succeeds(void)
{
const char *commit =
"tree 3e7ac388cadacccdf1c6c5f3445895b71d9cb0f8\n"
@@ -93,7 +99,7 @@ void test_object_commit_parse__parsing_commit_without_encoding_succeeds(void)
"committer Committer <committer@example.com>\n"
"\n"
"Message";
- assert_commit_parses(commit, 0,
+ assert_commit_parses(commit, 0, GIT_OID_SHA1,
"3e7ac388cadacccdf1c6c5f3445895b71d9cb0f8",
"Author <author@example.com>",
"Committer <committer@example.com>",
@@ -101,7 +107,7 @@ void test_object_commit_parse__parsing_commit_without_encoding_succeeds(void)
"Message", 0);
}
-void test_object_commit_parse__parsing_commit_with_multiple_authors_succeeds(void)
+void test_object_commit_parse__sha1_parsing_commit_with_multiple_authors_succeeds(void)
{
const char *commit =
"tree 3e7ac388cadacccdf1c6c5f3445895b71d9cb0f8\n"
@@ -112,7 +118,7 @@ void test_object_commit_parse__parsing_commit_with_multiple_authors_succeeds(voi
"committer Committer <committer@example.com>\n"
"\n"
"Message";
- assert_commit_parses(commit, 0,
+ assert_commit_parses(commit, 0, GIT_OID_SHA1,
"3e7ac388cadacccdf1c6c5f3445895b71d9cb0f8",
"Author1 <author@example.com>",
"Committer <committer@example.com>",
@@ -120,7 +126,7 @@ void test_object_commit_parse__parsing_commit_with_multiple_authors_succeeds(voi
"Message", 0);
}
-void test_object_commit_parse__parsing_commit_with_multiple_committers_succeeds(void)
+void test_object_commit_parse__sha1_parsing_commit_with_multiple_committers_succeeds(void)
{
const char *commit =
"tree 3e7ac388cadacccdf1c6c5f3445895b71d9cb0f8\n"
@@ -131,7 +137,7 @@ void test_object_commit_parse__parsing_commit_with_multiple_committers_succeeds(
"committer Committer4 <committer@example.com>\n"
"\n"
"Message";
- assert_commit_parses(commit, 0,
+ assert_commit_parses(commit, 0, GIT_OID_SHA1,
"3e7ac388cadacccdf1c6c5f3445895b71d9cb0f8",
"Author <author@example.com>",
"Committer1 <committer@example.com>",
@@ -139,13 +145,13 @@ void test_object_commit_parse__parsing_commit_with_multiple_committers_succeeds(
"Message", 0);
}
-void test_object_commit_parse__parsing_commit_without_message_succeeds(void)
+void test_object_commit_parse__sha1_parsing_commit_without_message_succeeds(void)
{
const char *commit =
"tree 3e7ac388cadacccdf1c6c5f3445895b71d9cb0f8\n"
"author Author <author@example.com>\n"
"committer Committer <committer@example.com>\n";
- assert_commit_parses(commit, 0,
+ assert_commit_parses(commit, 0, GIT_OID_SHA1,
"3e7ac388cadacccdf1c6c5f3445895b71d9cb0f8",
"Author <author@example.com>",
"Committer <committer@example.com>",
@@ -153,7 +159,7 @@ void test_object_commit_parse__parsing_commit_without_message_succeeds(void)
"", 0);
}
-void test_object_commit_parse__parsing_commit_with_unknown_fields_succeeds(void)
+void test_object_commit_parse__sha1_parsing_commit_with_unknown_fields_succeeds(void)
{
const char *commit =
"tree 3e7ac388cadacccdf1c6c5f3445895b71d9cb0f8\n"
@@ -163,7 +169,7 @@ void test_object_commit_parse__parsing_commit_with_unknown_fields_succeeds(void)
"more garbage\n"
"\n"
"Message";
- assert_commit_parses(commit, 0,
+ assert_commit_parses(commit, 0, GIT_OID_SHA1,
"3e7ac388cadacccdf1c6c5f3445895b71d9cb0f8",
"Author <author@example.com>",
"Committer <committer@example.com>",
@@ -171,7 +177,7 @@ void test_object_commit_parse__parsing_commit_with_unknown_fields_succeeds(void)
"Message", 0);
}
-void test_object_commit_parse__parsing_commit_with_invalid_tree_fails(void)
+void test_object_commit_parse__sha1_parsing_commit_with_invalid_tree_fails(void)
{
const char *commit =
"tree 3e7ac388cadacccdf1xxx5f3445895b71d9cb0f8\n"
@@ -179,40 +185,51 @@ void test_object_commit_parse__parsing_commit_with_invalid_tree_fails(void)
"committer Committer <committer@example.com>\n"
"\n"
"Message";
- assert_commit_fails(commit, 0);
+ assert_commit_fails(commit, 0, GIT_OID_SHA1);
}
-void test_object_commit_parse__parsing_commit_without_tree_fails(void)
+void test_object_commit_parse__sha1_parsing_commit_with_sha256_tree_fails(void)
{
const char *commit =
+ "tree f2a108f86a3b4fd9ad75ed55e9cb3cb46e348fca3b9dba3db64f7c9f64b8a736\n"
"author Author <author@example.com>\n"
"committer Committer <committer@example.com>\n"
"\n"
"Message";
- assert_commit_fails(commit, 0);
+ assert_commit_fails(commit, 0, GIT_OID_SHA1);
}
-void test_object_commit_parse__parsing_commit_without_author_fails(void)
+void test_object_commit_parse__sha1_parsing_commit_without_tree_fails(void)
+{
+ const char *commit =
+ "author Author <author@example.com>\n"
+ "committer Committer <committer@example.com>\n"
+ "\n"
+ "Message";
+ assert_commit_fails(commit, 0, GIT_OID_SHA1);
+}
+
+void test_object_commit_parse__sha1_parsing_commit_without_author_fails(void)
{
const char *commit =
"tree 3e7ac388cadacccdf1c6c5f3445895b71d9cb0f8\n"
"committer Committer <committer@example.com>\n"
"\n"
"Message";
- assert_commit_fails(commit, 0);
+ assert_commit_fails(commit, 0, GIT_OID_SHA1);
}
-void test_object_commit_parse__parsing_commit_without_committer_fails(void)
+void test_object_commit_parse__sha1_parsing_commit_without_committer_fails(void)
{
const char *commit =
"tree 3e7ac388cadacccdf1c6c5f3445895b71d9cb0f8\n"
"author Author <author@example.com>\n"
"\n"
"Message";
- assert_commit_fails(commit, 0);
+ assert_commit_fails(commit, 0, GIT_OID_SHA1);
}
-void test_object_commit_parse__parsing_encoding_will_not_cause_oob_read(void)
+void test_object_commit_parse__sha1_parsing_encoding_will_not_cause_oob_read(void)
{
const char *commit =
"tree 3e7ac388cadacccdf1c6c5f3445895b71d9cb0f8\n"
@@ -223,10 +240,237 @@ void test_object_commit_parse__parsing_encoding_will_not_cause_oob_read(void)
* As we ignore unknown fields, the cut-off encoding field will be
* parsed just fine.
*/
- assert_commit_parses(commit, strlen(commit) - strlen("ncoding foo\n"),
+ assert_commit_parses(
+ commit, strlen(commit) - strlen("ncoding foo\n"),
+ GIT_OID_SHA1,
"3e7ac388cadacccdf1c6c5f3445895b71d9cb0f8",
"<>",
"<>",
NULL,
"", 0);
}
+
+
+void test_object_commit_parse__sha256_parsing_commit_succeeds(void)
+{
+#ifndef GIT_EXPERIMENTAL_SHA256
+ cl_skip();
+#else
+ const char *commit =
+ "tree f2a108f86a3b4fd9ad75ed55e9cb3cb46e348fca3b9dba3db64f7c9f64b8a736\n"
+ "author Author <author@example.com>\n"
+ "committer Committer <committer@example.com>\n"
+ "encoding Encoding\n"
+ "\n"
+ "Message";
+ assert_commit_parses(commit, 0, GIT_OID_SHA256,
+ "f2a108f86a3b4fd9ad75ed55e9cb3cb46e348fca3b9dba3db64f7c9f64b8a736",
+ "Author <author@example.com>",
+ "Committer <committer@example.com>",
+ "Encoding",
+ "Message", 0);
+#endif
+}
+
+void test_object_commit_parse__sha256_parsing_commit_without_encoding_succeeds(void)
+{
+#ifndef GIT_EXPERIMENTAL_SHA256
+ cl_skip();
+#else
+ const char *commit =
+ "tree f2a108f86a3b4fd9ad75ed55e9cb3cb46e348fca3b9dba3db64f7c9f64b8a736\n"
+ "author Author <author@example.com>\n"
+ "committer Committer <committer@example.com>\n"
+ "\n"
+ "Message";
+ assert_commit_parses(commit, 0, GIT_OID_SHA256,
+ "f2a108f86a3b4fd9ad75ed55e9cb3cb46e348fca3b9dba3db64f7c9f64b8a736",
+ "Author <author@example.com>",
+ "Committer <committer@example.com>",
+ NULL,
+ "Message", 0);
+#endif
+}
+
+void test_object_commit_parse__sha256_parsing_commit_with_multiple_authors_succeeds(void)
+{
+#ifndef GIT_EXPERIMENTAL_SHA256
+ cl_skip();
+#else
+ const char *commit =
+ "tree f2a108f86a3b4fd9ad75ed55e9cb3cb46e348fca3b9dba3db64f7c9f64b8a736\n"
+ "author Author1 <author@example.com>\n"
+ "author Author2 <author@example.com>\n"
+ "author Author3 <author@example.com>\n"
+ "author Author4 <author@example.com>\n"
+ "committer Committer <committer@example.com>\n"
+ "\n"
+ "Message";
+ assert_commit_parses(commit, 0, GIT_OID_SHA256,
+ "f2a108f86a3b4fd9ad75ed55e9cb3cb46e348fca3b9dba3db64f7c9f64b8a736",
+ "Author1 <author@example.com>",
+ "Committer <committer@example.com>",
+ NULL,
+ "Message", 0);
+#endif
+}
+
+void test_object_commit_parse__sha256_parsing_commit_with_multiple_committers_succeeds(void)
+{
+#ifndef GIT_EXPERIMENTAL_SHA256
+ cl_skip();
+#else
+ const char *commit =
+ "tree f2a108f86a3b4fd9ad75ed55e9cb3cb46e348fca3b9dba3db64f7c9f64b8a736\n"
+ "author Author <author@example.com>\n"
+ "committer Committer1 <committer@example.com>\n"
+ "committer Committer2 <committer@example.com>\n"
+ "committer Committer3 <committer@example.com>\n"
+ "committer Committer4 <committer@example.com>\n"
+ "\n"
+ "Message";
+ assert_commit_parses(commit, 0, GIT_OID_SHA256,
+ "f2a108f86a3b4fd9ad75ed55e9cb3cb46e348fca3b9dba3db64f7c9f64b8a736",
+ "Author <author@example.com>",
+ "Committer1 <committer@example.com>",
+ NULL,
+ "Message", 0);
+#endif
+}
+
+void test_object_commit_parse__sha256_parsing_commit_without_message_succeeds(void)
+{
+#ifndef GIT_EXPERIMENTAL_SHA256
+ cl_skip();
+#else
+ const char *commit =
+ "tree f2a108f86a3b4fd9ad75ed55e9cb3cb46e348fca3b9dba3db64f7c9f64b8a736\n"
+ "author Author <author@example.com>\n"
+ "committer Committer <committer@example.com>\n";
+ assert_commit_parses(commit, 0, GIT_OID_SHA256,
+ "f2a108f86a3b4fd9ad75ed55e9cb3cb46e348fca3b9dba3db64f7c9f64b8a736",
+ "Author <author@example.com>",
+ "Committer <committer@example.com>",
+ NULL,
+ "", 0);
+#endif
+}
+
+void test_object_commit_parse__sha256_parsing_commit_with_unknown_fields_succeeds(void)
+{
+#ifndef GIT_EXPERIMENTAL_SHA256
+ cl_skip();
+#else
+ const char *commit =
+ "tree f2a108f86a3b4fd9ad75ed55e9cb3cb46e348fca3b9dba3db64f7c9f64b8a736\n"
+ "author Author <author@example.com>\n"
+ "committer Committer <committer@example.com>\n"
+ "foo bar\n"
+ "more garbage\n"
+ "\n"
+ "Message";
+ assert_commit_parses(commit, 0, GIT_OID_SHA256,
+ "f2a108f86a3b4fd9ad75ed55e9cb3cb46e348fca3b9dba3db64f7c9f64b8a736",
+ "Author <author@example.com>",
+ "Committer <committer@example.com>",
+ NULL,
+ "Message", 0);
+#endif
+}
+
+void test_object_commit_parse__sha256_parsing_commit_with_invalid_tree_fails(void)
+{
+#ifndef GIT_EXPERIMENTAL_SHA256
+ cl_skip();
+#else
+ const char *commit =
+ "tree f2a108f86a3b4fd9adxxxd55e9cb3cb46e348fca3b9dba3db64f7c9f64b8a736\n"
+ "author Author <author@example.com>\n"
+ "committer Committer <committer@example.com>\n"
+ "\n"
+ "Message";
+ assert_commit_fails(commit, 0, GIT_OID_SHA256);
+#endif
+}
+
+void test_object_commit_parse__sha256_parsing_commit_with_sha1_tree_fails(void)
+{
+#ifndef GIT_EXPERIMENTAL_SHA256
+ cl_skip();
+#else
+ const char *commit =
+ "tree 3e7ac388cadacccdf1c6c5f3445895b71d9cb0f8\n"
+ "author Author <author@example.com>\n"
+ "committer Committer <committer@example.com>\n"
+ "\n"
+ "Message";
+ assert_commit_fails(commit, 0, GIT_OID_SHA256);
+#endif
+}
+
+void test_object_commit_parse__sha256_parsing_commit_without_tree_fails(void)
+{
+#ifndef GIT_EXPERIMENTAL_SHA256
+ cl_skip();
+#else
+ const char *commit =
+ "author Author <author@example.com>\n"
+ "committer Committer <committer@example.com>\n"
+ "\n"
+ "Message";
+ assert_commit_fails(commit, 0, GIT_OID_SHA256);
+#endif
+}
+
+void test_object_commit_parse__sha256_parsing_commit_without_author_fails(void)
+{
+#ifndef GIT_EXPERIMENTAL_SHA256
+ cl_skip();
+#else
+ const char *commit =
+ "tree f2a108f86a3b4fd9ad75ed55e9cb3cb46e348fca3b9dba3db64f7c9f64b8a736\n"
+ "committer Committer <committer@example.com>\n"
+ "\n"
+ "Message";
+ assert_commit_fails(commit, 0, GIT_OID_SHA256);
+#endif
+}
+
+void test_object_commit_parse__sha256_parsing_commit_without_committer_fails(void)
+{
+#ifndef GIT_EXPERIMENTAL_SHA256
+ cl_skip();
+#else
+ const char *commit =
+ "tree f2a108f86a3b4fd9ad75ed55e9cb3cb46e348fca3b9dba3db64f7c9f64b8a736\n"
+ "author Author <author@example.com>\n"
+ "\n"
+ "Message";
+ assert_commit_fails(commit, 0, GIT_OID_SHA256);
+#endif
+}
+
+void test_object_commit_parse__sha256_parsing_encoding_will_not_cause_oob_read(void)
+{
+#ifndef GIT_EXPERIMENTAL_SHA256
+ cl_skip();
+#else
+ const char *commit =
+ "tree f2a108f86a3b4fd9ad75ed55e9cb3cb46e348fca3b9dba3db64f7c9f64b8a736\n"
+ "author <>\n"
+ "committer <>\n"
+ "encoding foo\n";
+ /*
+ * As we ignore unknown fields, the cut-off encoding field will be
+ * parsed just fine.
+ */
+ assert_commit_parses(
+ commit, strlen(commit) - strlen("ncoding foo\n"),
+ GIT_OID_SHA256,
+ "f2a108f86a3b4fd9ad75ed55e9cb3cb46e348fca3b9dba3db64f7c9f64b8a736",
+ "<>",
+ "<>",
+ NULL,
+ "", 0);
+#endif
+}
diff --git a/tests/libgit2/object/lookup256.c b/tests/libgit2/object/lookup256.c
new file mode 100644
index 000000000..3e1dab661
--- /dev/null
+++ b/tests/libgit2/object/lookup256.c
@@ -0,0 +1,153 @@
+#include "clar_libgit2.h"
+
+#include "repository.h"
+
+#ifdef GIT_EXPERIMENTAL_SHA256
+static git_repository *g_repo;
+#endif
+
+void test_object_lookup256__initialize(void)
+{
+#ifdef GIT_EXPERIMENTAL_SHA256
+ g_repo = cl_git_sandbox_init("testrepo_256.git");
+#endif
+}
+
+void test_object_lookup256__cleanup(void)
+{
+#ifdef GIT_EXPERIMENTAL_SHA256
+ cl_git_sandbox_cleanup();
+#endif
+}
+
+void test_object_lookup256__lookup_wrong_type_returns_enotfound(void)
+{
+#ifndef GIT_EXPERIMENTAL_SHA256
+ cl_skip();
+#else
+ const char *commit = "4d46d9719e425ef2dfb5bfba098d0b62e21b2b92d0731892eef70db0870e3744";
+ git_oid oid;
+ git_object *object;
+
+ cl_git_pass(git_oid__fromstr(&oid, commit, GIT_OID_SHA256));
+ cl_assert_equal_i(
+ GIT_ENOTFOUND, git_object_lookup(&object, g_repo, &oid, GIT_OBJECT_TAG));
+#endif
+}
+
+void test_object_lookup256__lookup_nonexisting_returns_enotfound(void)
+{
+#ifndef GIT_EXPERIMENTAL_SHA256
+ cl_skip();
+#else
+ const char *unknown = "deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef";
+ git_oid oid;
+ git_object *object;
+
+ cl_git_pass(git_oid__fromstr(&oid, unknown, GIT_OID_SHA256));
+ cl_assert_equal_i(
+ GIT_ENOTFOUND, git_object_lookup(&object, g_repo, &oid, GIT_OBJECT_ANY));
+#endif
+}
+
+void test_object_lookup256__lookup_wrong_type_by_abbreviated_id_returns_enotfound(void)
+{
+#ifndef GIT_EXPERIMENTAL_SHA256
+ cl_skip();
+#else
+ const char *commit = "4d46d97";
+ git_oid oid;
+ git_object *object;
+
+ cl_git_pass(git_oid__fromstrn(&oid, commit, strlen(commit), GIT_OID_SHA256));
+ cl_assert_equal_i(
+ GIT_ENOTFOUND, git_object_lookup_prefix(&object, g_repo, &oid, strlen(commit), GIT_OBJECT_TAG));
+#endif
+}
+
+void test_object_lookup256__lookup_wrong_type_eventually_returns_enotfound(void)
+{
+#ifndef GIT_EXPERIMENTAL_SHA256
+ cl_skip();
+#else
+ const char *commit = "4d46d9719e425ef2dfb5bfba098d0b62e21b2b92d0731892eef70db0870e3744";
+ git_oid oid;
+ git_object *object;
+
+ cl_git_pass(git_oid__fromstr(&oid, commit, GIT_OID_SHA256));
+
+ cl_git_pass(git_object_lookup(&object, g_repo, &oid, GIT_OBJECT_COMMIT));
+ git_object_free(object);
+
+ cl_assert_equal_i(
+ GIT_ENOTFOUND, git_object_lookup(&object, g_repo, &oid, GIT_OBJECT_TAG));
+#endif
+}
+
+void test_object_lookup256__lookup_corrupt_object_returns_error(void)
+{
+#ifndef GIT_EXPERIMENTAL_SHA256
+ cl_skip();
+#else
+ const char *commit = "5ca8959deb2b8327458e0344523eb1ddeeef4bce03e35864640b452f84d26848",
+ *file = "objects/5c/a8959deb2b8327458e0344523eb1ddeeef4bce03e35864640b452f84d26848";
+ git_str path = GIT_STR_INIT, contents = GIT_STR_INIT;
+ git_oid oid;
+ git_object *object;
+ size_t i;
+
+ cl_git_pass(git_oid__fromstr(&oid, commit, GIT_OID_SHA256));
+ cl_git_pass(git_str_joinpath(&path, git_repository_path(g_repo), file));
+ cl_git_pass(git_futils_readbuffer(&contents, path.ptr));
+
+ /* Corrupt and try to read the object */
+ for (i = 0; i < contents.size; i++) {
+ contents.ptr[i] ^= 0x1;
+ cl_git_pass(git_futils_writebuffer(&contents, path.ptr, O_RDWR, 0644));
+ cl_git_fail(git_object_lookup(&object, g_repo, &oid, GIT_OBJECT_COMMIT));
+ contents.ptr[i] ^= 0x1;
+ }
+
+ /* Restore original content and assert we can read the object */
+ cl_git_pass(git_futils_writebuffer(&contents, path.ptr, O_RDWR, 0644));
+ cl_git_pass(git_object_lookup(&object, g_repo, &oid, GIT_OBJECT_COMMIT));
+
+ git_object_free(object);
+ git_str_dispose(&path);
+ git_str_dispose(&contents);
+#endif
+}
+
+void test_object_lookup256__lookup_object_with_wrong_hash_returns_error(void)
+{
+#ifndef GIT_EXPERIMENTAL_SHA256
+ cl_skip();
+#else
+ const char *oldloose = "objects/5c/a8959deb2b8327458e0344523eb1ddeeef4bce03e35864640b452f84d26848",
+ *newloose = "objects/5c/a8959deb2b8327458e0344523eb1ddeeef4bce03e35864640b452f84d26840",
+ *commit = "5ca8959deb2b8327458e0344523eb1ddeeef4bce03e35864640b452f84d26840";
+
+ git_str oldpath = GIT_STR_INIT, newpath = GIT_STR_INIT;
+ git_object *object;
+ git_oid oid;
+
+ cl_git_pass(git_oid__fromstr(&oid, commit, GIT_OID_SHA256));
+
+ /* Copy object to another location with wrong hash */
+ cl_git_pass(git_str_joinpath(&oldpath, git_repository_path(g_repo), oldloose));
+ cl_git_pass(git_str_joinpath(&newpath, git_repository_path(g_repo), newloose));
+ cl_git_pass(git_futils_cp(oldpath.ptr, newpath.ptr, 0644));
+
+ /* Verify that lookup fails due to a hashsum mismatch */
+ cl_git_fail_with(GIT_EMISMATCH, git_object_lookup(&object, g_repo, &oid, GIT_OBJECT_COMMIT));
+
+ /* Disable verification and try again */
+ cl_git_pass(git_libgit2_opts(GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION, 0));
+ cl_git_pass(git_object_lookup(&object, g_repo, &oid, GIT_OBJECT_COMMIT));
+ cl_git_pass(git_libgit2_opts(GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION, 1));
+
+ git_object_free(object);
+ git_str_dispose(&oldpath);
+ git_str_dispose(&newpath);
+#endif
+}
diff --git a/tests/libgit2/object/tag/parse.c b/tests/libgit2/object/tag/parse.c
index 92298b5ce..d7a4d85bf 100644
--- a/tests/libgit2/object/tag/parse.c
+++ b/tests/libgit2/object/tag/parse.c
@@ -14,7 +14,7 @@ static void assert_tag_parses(const char *data, size_t datalen,
if (!datalen)
datalen = strlen(data);
- cl_git_pass(git_object__from_raw((git_object **) &tag, data, datalen, GIT_OBJECT_TAG));
+ cl_git_pass(git_object__from_raw((git_object **) &tag, data, datalen, GIT_OBJECT_TAG, GIT_OID_SHA1));
cl_assert_equal_i(tag->type, GIT_OBJECT_TAG);
if (expected_oid) {
@@ -54,7 +54,7 @@ static void assert_tag_fails(const char *data, size_t datalen)
git_object *object;
if (!datalen)
datalen = strlen(data);
- cl_git_fail(git_object__from_raw(&object, data, datalen, GIT_OBJECT_TAG));
+ cl_git_fail(git_object__from_raw(&object, data, datalen, GIT_OBJECT_TAG, GIT_OID_SHA1));
}
void test_object_tag_parse__valid_tag_parses(void)
diff --git a/tests/libgit2/object/tree/parse.c b/tests/libgit2/object/tree/parse.c
index d6d6e5302..fc985d672 100644
--- a/tests/libgit2/object/tree/parse.c
+++ b/tests/libgit2/object/tree/parse.c
@@ -26,7 +26,7 @@ static void assert_tree_parses(const char *data, size_t datalen,
if (!datalen)
datalen = strlen(data);
- cl_git_pass(git_object__from_raw((git_object **) &tree, data, datalen, GIT_OBJECT_TREE));
+ cl_git_pass(git_object__from_raw((git_object **) &tree, data, datalen, GIT_OBJECT_TREE, GIT_OID_SHA1));
cl_assert_equal_i(git_tree_entrycount(tree), expected_nentries);
@@ -51,7 +51,7 @@ static void assert_tree_fails(const char *data, size_t datalen)
git_object *object;
if (!datalen)
datalen = strlen(data);
- cl_git_fail(git_object__from_raw(&object, data, datalen, GIT_OBJECT_TREE));
+ cl_git_fail(git_object__from_raw(&object, data, datalen, GIT_OBJECT_TREE, GIT_OID_SHA1));
}
void test_object_tree_parse__single_blob_parses(void)
diff --git a/tests/libgit2/object/validate.c b/tests/libgit2/object/validate.c
index 87193deb6..e11038115 100644
--- a/tests/libgit2/object/validate.c
+++ b/tests/libgit2/object/validate.c
@@ -1,50 +1,154 @@
#include "clar_libgit2.h"
-#define VALID_COMMIT "tree bdd24e358576f1baa275df98cdcaf3ac9a3f4233\n" \
- "parent d6d956f1d66210bfcd0484166befab33b5987a39\n" \
- "author Edward Thomson <ethomson@edwardthomson.com> 1638286404 -0500\n" \
- "committer Edward Thomson <ethomson@edwardthomson.com> 1638324642 -0500\n" \
- "\n" \
- "commit go here.\n"
-#define VALID_TREE "100644 HEADER\0\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42"
-
-#define INVALID_COMMIT "tree bdd24e358576f1baa275df98cdcaf3ac9a3f4233\n" \
- "parent d6d956f1d66210bfcd0484166befab33b5987a39\n" \
- "committer Edward Thomson <ethomson@edwardthomson.com> 1638324642 -0500\n" \
- "\n" \
- "commit go here.\n"
-#define INVALID_TREE "100644 HEADER \x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42"
-
-void test_object_validate__valid(void)
+#define VALID_COMMIT_SHA1 \
+ "tree bdd24e358576f1baa275df98cdcaf3ac9a3f4233\n" \
+ "parent d6d956f1d66210bfcd0484166befab33b5987a39\n" \
+ "author Edward Thomson <ethomson@edwardthomson.com> 1638286404 -0500\n" \
+ "committer Edward Thomson <ethomson@edwardthomson.com> 1638324642 -0500\n" \
+ "\n" \
+ "commit go here.\n"
+
+#define VALID_TREE_SHA1 \
+ "100644 HEADER\0\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42"
+
+#define INVALID_COMMIT_SHA1 \
+ "tree bdd24e358576f1baa275df98cdcaf3ac9a3f4233\n" \
+ "parent d6d956f1d66210bfcd0484166befab33b5987a39\n" \
+ "committer Edward Thomson <ethomson@edwardthomson.com> 1638324642 -0500\n" \
+ "\n" \
+ "commit go here.\n"
+
+#define INVALID_TREE_SHA1 \
+ "100644 HEADER \x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42"
+
+#define VALID_COMMIT_SHA256 \
+ "tree d0fc7f52dc42358506e7f3f3be72f5271994abb104b9397ab3e19bb42361504d\n" \
+ "parent 652412419a24ba62a1d897f40aeb80eecbf873797b04a1bbb8d71918653ef65b\n" \
+ "author Edward Thomson <ethomson@edwardthomson.com> 1638286404 -0500\n" \
+ "committer Edward Thomson <ethomson@edwardthomson.com> 1638324642 -0500\n" \
+ "\n" \
+ "commit go here.\n"
+
+#define VALID_TREE_SHA256 \
+ "100644 HEADER\0\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42"
+
+#define INVALID_COMMIT_SHA256 \
+ "tree d0fc7f52dc42358506e7f3f3be72f5271994abb104b9397ab3e19bb42361504d\n" \
+ "parent 652412419a24ba62a1d897f40aeb80eecbf873797b04a1bbb8d71918653ef65b\n" \
+ "committer Edward Thomson <ethomson@edwardthomson.com> 1638324642 -0500\n" \
+ "\n" \
+ "commit go here.\n"
+
+#define INVALID_TREE_SHA256 \
+ "100644 HEADER \x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42"
+
+#ifdef GIT_EXPERIMENTAL_SHA256
+# define sha1_rawcontent_is_valid(v, c, l, t) \
+ git_object_rawcontent_is_valid(v, c, l, t, GIT_OID_SHA1)
+#else
+# define sha1_rawcontent_is_valid(v, c, l, t) \
+ git_object_rawcontent_is_valid(v, c, l, t)
+#endif
+
+void test_object_validate__valid_sha1(void)
+{
+ int valid;
+
+ cl_git_pass(sha1_rawcontent_is_valid(&valid, "", 0, GIT_OBJECT_BLOB));
+ cl_assert_equal_i(1, valid);
+
+ cl_git_pass(sha1_rawcontent_is_valid(&valid, "foobar", 0, GIT_OBJECT_BLOB));
+ cl_assert_equal_i(1, valid);
+
+ cl_git_pass(sha1_rawcontent_is_valid(&valid, VALID_COMMIT_SHA1, CONST_STRLEN(VALID_COMMIT_SHA1), GIT_OBJECT_COMMIT));
+ cl_assert_equal_i(1, valid);
+
+ cl_git_pass(sha1_rawcontent_is_valid(&valid, VALID_TREE_SHA1, CONST_STRLEN(VALID_TREE_SHA1), GIT_OBJECT_TREE));
+ cl_assert_equal_i(1, valid);
+}
+
+void test_object_validate__cannot_parse_sha256_as_sha1(void)
+{
+ int valid;
+
+ cl_git_pass(sha1_rawcontent_is_valid(&valid, VALID_COMMIT_SHA256, CONST_STRLEN(INVALID_COMMIT_SHA256), GIT_OBJECT_COMMIT));
+ cl_assert_equal_i(0, valid);
+
+ cl_git_pass(sha1_rawcontent_is_valid(&valid, INVALID_TREE_SHA256, CONST_STRLEN(INVALID_TREE_SHA256), GIT_OBJECT_TREE));
+ cl_assert_equal_i(0, valid);
+}
+
+void test_object_validate__invalid_sha1(void)
{
int valid;
- cl_git_pass(git_object_rawcontent_is_valid(&valid, "", 0, GIT_OBJECT_BLOB));
+ cl_git_pass(sha1_rawcontent_is_valid(&valid, "", 0, GIT_OBJECT_COMMIT));
+ cl_assert_equal_i(0, valid);
+
+ cl_git_pass(sha1_rawcontent_is_valid(&valid, "foobar", 0, GIT_OBJECT_COMMIT));
+ cl_assert_equal_i(0, valid);
+
+ cl_git_pass(sha1_rawcontent_is_valid(&valid, INVALID_COMMIT_SHA1, CONST_STRLEN(INVALID_COMMIT_SHA1), GIT_OBJECT_COMMIT));
+ cl_assert_equal_i(0, valid);
+
+ cl_git_pass(sha1_rawcontent_is_valid(&valid, INVALID_TREE_SHA1, CONST_STRLEN(INVALID_TREE_SHA1), GIT_OBJECT_TREE));
+ cl_assert_equal_i(0, valid);
+}
+
+
+void test_object_validate__valid_sha256(void)
+{
+#ifndef GIT_EXPERIMENTAL_SHA256
+ cl_skip();
+#else
+ int valid;
+
+ cl_git_pass(git_object_rawcontent_is_valid(&valid, "", 0, GIT_OBJECT_BLOB, GIT_OID_SHA256));
cl_assert_equal_i(1, valid);
- cl_git_pass(git_object_rawcontent_is_valid(&valid, "foobar", 0, GIT_OBJECT_BLOB));
+ cl_git_pass(git_object_rawcontent_is_valid(&valid, "foobar", 0, GIT_OBJECT_BLOB, GIT_OID_SHA256));
cl_assert_equal_i(1, valid);
- cl_git_pass(git_object_rawcontent_is_valid(&valid, VALID_COMMIT, CONST_STRLEN(VALID_COMMIT), GIT_OBJECT_COMMIT));
+ cl_git_pass(git_object_rawcontent_is_valid(&valid, VALID_COMMIT_SHA256, CONST_STRLEN(VALID_COMMIT_SHA256), GIT_OBJECT_COMMIT, GIT_OID_SHA256));
cl_assert_equal_i(1, valid);
- cl_git_pass(git_object_rawcontent_is_valid(&valid, VALID_TREE, CONST_STRLEN(VALID_TREE), GIT_OBJECT_TREE));
+ cl_git_pass(git_object_rawcontent_is_valid(&valid, VALID_TREE_SHA256, CONST_STRLEN(VALID_TREE_SHA256), GIT_OBJECT_TREE, GIT_OID_SHA256));
cl_assert_equal_i(1, valid);
+#endif
}
-void test_object_validate__invalid(void)
+void test_object_validate__invalid_sha256(void)
{
+#ifndef GIT_EXPERIMENTAL_SHA256
+ cl_skip();
+#else
int valid;
- cl_git_pass(git_object_rawcontent_is_valid(&valid, "", 0, GIT_OBJECT_COMMIT));
+ cl_git_pass(git_object_rawcontent_is_valid(&valid, "", 0, GIT_OBJECT_COMMIT, GIT_OID_SHA256));
+ cl_assert_equal_i(0, valid);
+
+ cl_git_pass(git_object_rawcontent_is_valid(&valid, "foobar", 0, GIT_OBJECT_COMMIT, GIT_OID_SHA256));
cl_assert_equal_i(0, valid);
- cl_git_pass(git_object_rawcontent_is_valid(&valid, "foobar", 0, GIT_OBJECT_COMMIT));
+ cl_git_pass(git_object_rawcontent_is_valid(&valid, INVALID_COMMIT_SHA256, CONST_STRLEN(INVALID_COMMIT_SHA256), GIT_OBJECT_COMMIT, GIT_OID_SHA256));
cl_assert_equal_i(0, valid);
- cl_git_pass(git_object_rawcontent_is_valid(&valid, INVALID_COMMIT, CONST_STRLEN(INVALID_COMMIT), GIT_OBJECT_COMMIT));
+ cl_git_pass(git_object_rawcontent_is_valid(&valid, INVALID_TREE_SHA256, CONST_STRLEN(INVALID_TREE_SHA256), GIT_OBJECT_TREE, GIT_OID_SHA256));
+ cl_assert_equal_i(0, valid);
+#endif
+}
+
+void test_object_validate__cannot_parse_sha1_as_sha256(void)
+{
+#ifndef GIT_EXPERIMENTAL_SHA256
+ cl_skip();
+#else
+ int valid;
+
+ cl_git_pass(git_object_rawcontent_is_valid(&valid, VALID_COMMIT_SHA1, CONST_STRLEN(INVALID_COMMIT_SHA1), GIT_OBJECT_COMMIT, GIT_OID_SHA256));
cl_assert_equal_i(0, valid);
- cl_git_pass(git_object_rawcontent_is_valid(&valid, INVALID_TREE, CONST_STRLEN(INVALID_TREE), GIT_OBJECT_TREE));
+ cl_git_pass(git_object_rawcontent_is_valid(&valid, INVALID_TREE_SHA1, CONST_STRLEN(INVALID_TREE_SHA1), GIT_OBJECT_TREE, GIT_OID_SHA256));
cl_assert_equal_i(0, valid);
+#endif
}
diff --git a/tests/libgit2/odb/backend/loose.c b/tests/libgit2/odb/backend/loose.c
new file mode 100644
index 000000000..781b61d9f
--- /dev/null
+++ b/tests/libgit2/odb/backend/loose.c
@@ -0,0 +1,43 @@
+#include "clar_libgit2.h"
+#include "repository.h"
+#include "odb.h"
+#include "backend_helpers.h"
+#include "git2/sys/mempack.h"
+
+static git_repository *_repo;
+static git_odb *_odb;
+
+void test_odb_backend_loose__initialize(void)
+{
+ git_odb_backend *backend;
+
+ cl_fixture_sandbox("testrepo.git");
+
+#ifdef GIT_EXPERIMENTAL_SHA256
+ cl_git_pass(git_odb_backend_loose(&backend, "testrepo.git/objects", NULL));
+#else
+ cl_git_pass(git_odb_backend_loose(&backend, "testrepo.git/objects", 0, 0, 0, 0));
+#endif
+
+ cl_git_pass(git_odb__new(&_odb, NULL));
+ cl_git_pass(git_odb_add_backend(_odb, backend, 10));
+ cl_git_pass(git_repository_wrap_odb(&_repo, _odb));
+}
+
+void test_odb_backend_loose__cleanup(void)
+{
+ git_odb_free(_odb);
+ git_repository_free(_repo);
+
+ cl_fixture_cleanup("testrepo.git");
+}
+
+void test_odb_backend_loose__read(void)
+{
+ git_oid oid;
+ git_odb_object *obj;
+
+ cl_git_pass(git_oid__fromstr(&oid, "1385f264afb75a56a5bec74243be9b367ba4ca08", GIT_OID_SHA1));
+ cl_git_pass(git_odb_read(&obj, _odb, &oid));
+ git_odb_object_free(obj);
+}
diff --git a/tests/libgit2/odb/foreach.c b/tests/libgit2/odb/foreach.c
index 165a511a0..56b3e882c 100644
--- a/tests/libgit2/odb/foreach.c
+++ b/tests/libgit2/odb/foreach.c
@@ -52,7 +52,16 @@ void test_odb_foreach__one_pack(void)
int nobj = 0;
cl_git_pass(git_odb__new(&_odb, NULL));
- cl_git_pass(git_odb_backend_one_pack(&backend, cl_fixture("testrepo.git/objects/pack/pack-a81e489679b7d3418f9ab594bda8ceb37dd4c695.idx")));
+
+#ifdef GIT_EXPERIMENTAL_SHA256
+ cl_git_pass(git_odb_backend_one_pack(&backend,
+ cl_fixture("testrepo.git/objects/pack/pack-a81e489679b7d3418f9ab594bda8ceb37dd4c695.idx"),
+ NULL));
+#else
+ cl_git_pass(git_odb_backend_one_pack(&backend,
+ cl_fixture("testrepo.git/objects/pack/pack-a81e489679b7d3418f9ab594bda8ceb37dd4c695.idx")));
+#endif
+
cl_git_pass(git_odb_add_backend(_odb, backend, 1));
_repo = NULL;
diff --git a/tests/libgit2/odb/loose.c b/tests/libgit2/odb/loose.c
index e79525478..0409dfb28 100644
--- a/tests/libgit2/odb/loose.c
+++ b/tests/libgit2/odb/loose.c
@@ -160,7 +160,9 @@ void test_odb_loose__exists_sha1(void)
void test_odb_loose__exists_sha256(void)
{
-#ifdef GIT_EXPERIMENTAL_SHA256
+#ifndef GIT_EXPERIMENTAL_SHA256
+ cl_skip();
+#else
git_oid id, id2;
git_odb *odb;
git_odb_options odb_opts = GIT_ODB_OPTIONS_INIT;
@@ -201,7 +203,9 @@ void test_odb_loose__simple_reads_sha1(void)
void test_odb_loose__simple_reads_sha256(void)
{
-#ifdef GIT_EXPERIMENTAL_SHA256
+#ifndef GIT_EXPERIMENTAL_SHA256
+ cl_skip();
+#else
test_read_object(&commit_sha256);
test_read_object(&tree_sha256);
test_read_object(&tag_sha256);
@@ -230,7 +234,9 @@ void test_odb_loose__streaming_reads_sha1(void)
void test_odb_loose__streaming_reads_sha256(void)
{
-#ifdef GIT_EXPERIMENTAL_SHA256
+#ifndef GIT_EXPERIMENTAL_SHA256
+ cl_skip();
+#else
size_t blocksizes[] = { 1, 2, 4, 16, 99, 1024, 123456789 };
size_t i;
@@ -259,7 +265,9 @@ void test_odb_loose__read_header_sha1(void)
void test_odb_loose__read_header_sha256(void)
{
-#ifdef GIT_EXPERIMENTAL_SHA256
+#ifndef GIT_EXPERIMENTAL_SHA256
+ cl_skip();
+#else
test_read_header(&commit_sha256);
test_read_header(&tree_sha256);
test_read_header(&tag_sha256);
diff --git a/tests/libgit2/odb/open.c b/tests/libgit2/odb/open.c
new file mode 100644
index 000000000..395406d0f
--- /dev/null
+++ b/tests/libgit2/odb/open.c
@@ -0,0 +1,34 @@
+#include "clar_libgit2.h"
+
+void test_odb_open__initialize(void)
+{
+ cl_fixture_sandbox("testrepo.git");
+}
+
+void test_odb_open__cleanup(void)
+{
+ cl_fixture_cleanup("testrepo.git");
+}
+
+void test_odb_open__exists(void)
+{
+ git_odb *odb;
+ git_oid one, two;
+
+#ifdef GIT_EXPERIMENTAL_SHA256
+ git_odb_options opts = GIT_ODB_OPTIONS_INIT;
+
+ cl_git_pass(git_odb_open(&odb, "testrepo.git/objects", &opts));
+ cl_git_pass(git_oid_fromstr(&one, "1385f264afb75a56a5bec74243be9b367ba4ca08", GIT_OID_SHA1));
+ cl_git_pass(git_oid_fromstr(&two, "00112233445566778899aabbccddeeff00112233", GIT_OID_SHA1));
+#else
+ cl_git_pass(git_odb_open(&odb, "testrepo.git/objects"));
+ cl_git_pass(git_oid_fromstr(&one, "1385f264afb75a56a5bec74243be9b367ba4ca08"));
+ cl_git_pass(git_oid_fromstr(&two, "00112233445566778899aabbccddeeff00112233"));
+#endif
+
+ cl_assert(git_odb_exists(odb, &one));
+ cl_assert(!git_odb_exists(odb, &two));
+
+ git_odb_free(odb);
+}
diff --git a/tests/libgit2/odb/pack_data_256.h b/tests/libgit2/odb/pack_data_256.h
new file mode 100644
index 000000000..b63188227
--- /dev/null
+++ b/tests/libgit2/odb/pack_data_256.h
@@ -0,0 +1,154 @@
+#ifdef GIT_EXPERIMENTAL_SHA256
+
+static const char *packed_objects_256[] = {
+ "99f3b405443221141eb0fd1e0cca5d355f893983749b7fb455769fba434e7945",
+ "d0fc7f52dc42358506e7f3f3be72f5271994abb104b9397ab3e19bb42361504d",
+ "86e228d9904af64586e9a8378005ba654681ff5be3c43ca930bf6b1f28d4395f",
+ "652412419a24ba62a1d897f40aeb80eecbf873797b04a1bbb8d71918653ef65b",
+ "ad90f638cb67720b20b904478471504acebacc7bb36e5dcad3e882acec496fed",
+ "4d46d9719e425ef2dfb5bfba098d0b62e21b2b92d0731892eef70db0870e3744",
+ "80ec1e36b983e68664e8357c538cd35b30638bb0cb99626f906d145e2d2e2558",
+ "e8bbf40ee280bc43b33c04df2250903b75e92f2497e91759cf1cad753c23be6c",
+ "8864b5746d7c5780083bb98449a3f5bf78d8281e8c5e3fd12a8ccd9103eb3a1f",
+ "083c2b8b445640d171e7aa667b0b32007006f786711032ebb82931cca69cc15b",
+ "5c8bea399f78d3d6a037a41cee2e763d00024180b66f2ec738d443b6a3dd7081",
+ "281c36286eab5e534f1c2121a4cf2cd48a32b3773a3e78df500bed3f3c9747f3",
+ "c9dc53358a0d83bee1caae40ee81d752abf4962a9f206702e24a447b766b5bd7",
+ "fafc05a1d0b7614ba32f428eb52f3439ffbfed9a817e5ae069364cfc3fa3e4d4",
+ "25a4efebb38c55b8f2309ce5e3116b2b9287239952cc2fa174074e05c6e5875a",
+ "c223f1b579bad18635efdeffa7a8ff40567d03fa427e08bb90d9878f958d8021",
+ "8a0042d434a2f8a2e8d47caa4eb454f388752fb3fe71150c1cea12e807cfdf1c",
+ "d79e913b4137117b7f8fc2a8d184373f657d6f71bbeaca0fe83b7757ce486108",
+ "375f69d3d41e36d6904bfa86221690ec49de2a030664a362abaf86c426f9f7e0",
+ "22b6705b86e4aa9120eff203af24709d483698d9f78695e86e82de121784b570",
+ "4516b0e63349c81abc6584cb11ce84ab8ba38b105f9de39d0d0a1455dba2478d",
+ "c2b535bfc3501f0b4e179d5d6f0e2cea613940fa3813be5923db7e71e190849f",
+ "aa793f0e9d9d746eba8a7a60cb4981f7e24ce9691910350d7df9b9e94c7567b9",
+ "890bb959ac8c20db603bf083bc82f55f9f42b6dca6581d941d0b361188abae3b",
+ "bfc0ee6fe04854c11011539f38cc6b9b73e0c445bac2008de2fb877123efc2e3",
+ "5ba7253f47d390ee2c7c7afe8fd9a963a7a2674bbdadeb9a927665c9246306c4",
+ "79bc735b91f8dfa9379d1d6c21e2d519ac1bf0d04d48534864c9ff571df5297d",
+ "f362826c827aa3bcbeb3ff8b71bba08d7440b89ab53fe95d61b8922d01f46e28",
+ "4a1b9c078e7bb20759a2d75e3a4b96827c851446c0261750b96aa5f286efe378",
+ "2e2aa456dbbb8889923eb6713672427854020298a764967c50235a9a76d7ce4b",
+ "97b0e3661fa0caa6200c50381233f8320b907540ceb9d17ac94fedc66fd093c2",
+ "ade7d297ede7bb58008da582de1253f0a55cb76e82d1cd376f82ccf97f70bced",
+ "3315093132a8f28bd202c0a9562d04eebea4943dcd1e1c754341b0389722042f",
+ "6fae137ba81d0d81c2a85759b99322e7ea8103bd7c8b85be3163b7e91e18c125",
+ "f8b45f792840019909fd35f9dcb98082b3bc39373268d467e1b00f1da5ac71e5",
+ "d2ab425d6092770366bc3dff5276e3a869221bc7b6d22e99c089d556e7eb8331",
+ "4dd37b9df07bcc7b45ce72a44e3f5fcaf5f0a9a5f3148963714eac4c99a60388",
+ "8c53c0f9f0972a1c77e40549170b9ae51d365c200ffc4cb220628c5bce3dd0b2",
+ "11d0463a82345c2512bd704dd00211aefb7d5b8590ca92809122fd09486a9f06",
+ "1ab4fa663d22416f45cb1a007d767a58d0abf5255bf86f888393dae637b37c3b",
+ "345d2fbf1d306c7ea46a05f497793308357e9e17ab0e866446d2b9894378ddce",
+ "304352ddad641770fcc94ee4d9f957cde7aaf4c107dbf8b5ba14d543640bf7dd",
+ "cfdd565f4cbc315760c287d57714852e1a4894eef9c715332fd556f2e114a9f1",
+ "d6d2e87e6de8690efd26b8c5b58de28dcb3c9bd2b7659eccf34468d71a7a4478",
+ "aa61d4adf622265ec814c1a97198d2bcd3f58fb08989cb9beda32a4d0aab6697",
+ "40799f33b8cd9ca41f36a2f89d8ac8550537ad01dfb21fbc76f01eeb62f512d4",
+ "faa7ca59426e17f6b34fa407d06cd634faaabeb4abe26df12296e05a17c98eef",
+ "1f6ea2cab887a2ff4bb1557a36dd6bac9931ef1f36794ddd22b4b7b7276051fb",
+ "b38a7a2ee69d55f021efa91caf59e23bccdaf6b8a9c3f83acd978aa177587537",
+ "f66691f32eb9b23a029b43251bfa994d16481fe97903057e121b76e4e78f6ff4",
+ "afe1fad6f6b22eea530ff7b373d6b9b787b39792f720e6fcd0692ba6ef99e02f",
+ "b71ee6c8837efa5b3ba3361f88c321d391ac05f41d5b2506cad39319e80716e4",
+ "e207a266e228414023223530eb77c64b10f2f5124f3354deb45aff04c1db98b9",
+ "696503760a18787240ba52ad1abec3be6517bb802238e9469b3a8999cbd6432c",
+ "c30d06fd49797e3135652d654db0de122dd83f8400df1c7a0e95ca3720defb0d",
+ "8a9b600a21987e6ffddbad745f38c115797eacef9117043bd9d2da4835ee3cc4",
+ "d509fa76ff5944e25f48c2476736b6239a53f0463cba6ebc488464d087951951",
+ "3e00d8cae2726dc33879adf876b30c306f50e7a85b15c8add4a27f84d88616d7",
+ "ce55f9f5ab1d799a9ffaa839539af196d13f35677b3d0761b0fe034e764f8d07",
+ "84005e38a65f4115d5c94790010dc57e1a3297f4aa89744f5927f208af758bd0",
+ "75b0ed5f4a2d5c810f34d867dbca51db6a596d4739abfaf24fcc0f05d99097a8",
+ "3eab74a6894d790767f3d92615a6887dcccaffa9e48fdd2ce482b5f17efcf9b9",
+ "8e61988c998c96a131cfe72225fce43e555bec4e590fa8c239373172a9d485ce",
+ "5f45a18f90f2934e7c7985d05b2b5b3584886fd057c9202f26f562d6c3080038",
+ "7609c608c1097270356a6fe336a8756ff124d4a9c2e941bba26a6e8c3becdeb1",
+ "81ba4e67aa59ccb078e3dc9ff3075f50084ec1696bd867e8e4284fcfc34fe3cf",
+ "3b1b991ae70d1f5388ad16b63d2285e99ada7a618c6f5d01e50a6d4b33c4767d",
+ "ac49410f64fad10760838866a40107573e42c86908c83ece433d64b7a8b57f7f",
+ "72c472319cf7d5d59bf9fea9e90b9785d7ab39340003fbc68619c11a9e583c2f",
+ "3a0cd33a47fcd0c7b8f8c1d407aaa53f648e25f2ffe2533a7e9c09c3d1b9da75",
+ "bf409f1aa76256282ebf1a7cc6c9f4220be9ffc47b2cc42248fcc5cbb67bce1f",
+ "13c8c9dae9fa63b1ec48b8abb12312fc8df61b9414678f504fa68164a48eef28",
+ "078baf54914fab56842798c90fec863f15f67a22041e8aa54a88c43f059da050",
+ "41c166c241a4e878f444932a193501e12ab38ba0634747291df70e619dccee1c",
+ "9db520a5a88c7d75b86a4faa1ce9010edf38af922f400c69a4a93aef69e25c4c",
+ "edf6e0dbfaf8a7ad89b05b5768981eeedd7a2bda4b1d0fae07aa2a9d49bb39df",
+ "ec1866b39026366e69ab8e167c15312c27f5eda4c0afdf9367ac3d76f56bf8e7",
+ "695bdb545f636d454b4825effd29db96c46d81772dda6c104f97dffe2ec509f1",
+ "07c31b4be5f3ec8f82c7ad6c91cbdf07ae876bb73041903d64fe8bac64bbcb6e",
+ "06665948a581e547ac1dc883b35bab54682fc311f7a87d5563a76501ecba55fc",
+ "fa6a2b7e588e57115d2772c0d5250d886757404fc510a5956be8de4926e94c01",
+ "28aec9a4450d9de98db98a021f97026bf12f1328f66e53319669eb5adce5ed3e",
+ "290d84a2cf108c074d3764ca8dc56e1215a5a7482837f098dff7a55e23d89d5f",
+ "ed10f9520d5f0d6bbd9c467ed83a239df0cba94ae9031602e02f6ad6256c459e",
+ "ad05c66a177f844f8239a1d186a1f803a4daa6286c959538838e222bc6337dc9",
+ "88fecc715077807bd7ee9e6a1dff65fde000379e0bf2a15cc2404469cef4c82b",
+ "bcc4fa242e55c5e08f64900407dca1cf2451806830905be616f339bf7a5580aa",
+ "4a4ebb837e3c9883f35d0ecdc26d4bc76a0f665568b08f3e967096f2fd3fa537",
+ "9abb7801e72353060a1490ffa3331674d6882558e7d6458de397b4b00d31ff8c",
+ "466cdfec4c74f3ed4fe53165e468a52df5dff9c6533ec433cdf235a73e099d32",
+ "8a1e1a6cc00519c4df8ce404c987751446fa299662308622cb63576fb52996d7",
+ "e5ea38108d603a6ed8dbb0b8455abe6d971f2d60920207e67ba646d267ece305",
+ "97e00ba4c8028ea91e7131c8c7596227cd03d3d2d14ed2d179fe0f305ebbca39",
+ "807faa3586b7f1aff2797a7c39c135b0196647c9ae7ee8843322accc960b2f22",
+ "b9134c331629e9cb29d1bbc03904d911a942b451e087543fc16deb0116391297",
+ "23cb97c200205dc84109c248be5bd719c23bdab52b52c51ec92fef9a48790833",
+ "b6e8427e3afe1cf0095d0f5aeca0642c4fb12d4e529f62e8264b6c4db72f04b4",
+ "92128dfb792caea934f5218807ec993867b0c8487a3de69ebac33e067f64d38a",
+ "a13ecbc514b571721a9a1c92af7f89d473a5fe13228904f8d17368e71f273ea1",
+ "3f5dca26a2f512d6681ce1957b8afba5e031bf63d52fd52d8f57093bf92391a4",
+ "1aa24b7ebd910f39a676f2ccab8e9a79f14842c20b55ed18e3dc297bdbaca279",
+ "1e0ce38d00e8f3e613febc0f8b275e0fd7fbef8af293fd62698be46dfbbc937d",
+ "dd9b1d5ca653752cef167e034324198971ab6f2f38f3db9db571cb2985759f00",
+ "efc4b8fd4b0b2586fce256b107ee2a052d11d26f99d85ce0478c3d49d1b2186b",
+ "da38f65b32fb03ce332e0c4238edae0a733e4cd793d849522bb4e0bdd0af608c",
+ "bf66badfda7b5d2157db65c5310cfdc4e904d7d5da57ac5abe17542de612f856",
+ "2c0f52f9ae1f34f280dfc1c755cbfaf2b9968fd3bab1f1eb16d3ac0fafd71940",
+ "165ec90aa4190bbe12ee415b294fd6d204c64afcf1ca64dd815782872b24ea26",
+ "cc3d272d457c7e26c5d611923841511a1766bcd58e5be66433698627e6fb3f9d",
+ "d970d1a6296d149bfb8283b8b4a9a6f7e9ee320c5d46a5ef216e10400df2d281",
+ "bdc530e0b98dd736cd812408eeed9aa0d393bbd0630b355eb7601e61f0dbc7c4",
+ "94db24aca3f8e07f481744f62633730feb4fc47605280381a08be510ae971ffe",
+ "151c7527acc5b731199a03a932ae374331e16e5ae29256e98cb652f37669889b",
+ "ac88849a26c126b03fc6fcb17cb23ec563e87a5f63b7afe800ad0f436128ce98",
+ "26a2dac21f8f0939566570e48f7f4fcf89239c2746ef8d3dbf31d179c691808f",
+ "619f24a7f37f8ca922c83b3a1b9a384eb6a444ff3a2a52c712f3c60dde6f24fb",
+ "5329dd2fd8557be5ad06b57882cf42e23d767cdc8a4b25e464fdb00890649e07",
+ "fff5cbc10ffea865d69aba64082ae17479c522e8e0305e678469749282bf0a18",
+ "d0c992aae9cde855b17ac826234a73255ecb09534cdcfa633d90640f6a4324d9",
+ "6129f1672465ee7b9e2edef53fbf3846ab5d06e8e6a1d7fb51e31666a8b411f8",
+ "0a8c0add81b065b97451f7b47a9935f0e240251c5f90a89ced885cb7d4efc2ba",
+ "471fa4fc2da467dd94e57babb1912bbdb5e40b96c8129d46fc709c0bfc009bca",
+ "23cea2b49eed4993c5b92a9d5f0b82efe4fae3837ea707d921de645d04479015",
+ "c85e35eec23dea4089aee7a2dc7f6d937ad7e13c66bdbd7eef37bd6336418609",
+ "a0f3dac8fa0e22dcf356aecbbdf79440715687c1053bc59b83354f276d688ceb",
+ "1cfb8ae71e9e576d1b16b7bd1a62156d0641c6e51f5d76877be6de4f26410623"
+};
+
+static const char *loose_objects_256[] = {
+ "96c18f0297e38d01f4b2dacddea4259aea6b2961eb0822bd2c0c3f6029030045",
+ "aea29dc305d40e362df25c3fdeed5502fd56b182af01b7740d297a24459333c5",
+ "73b4f3c4f3182e6c8dd2c98aeb2c7811556538e7673e4b325307c71685fbf5b6",
+ "901505c3355518bee35475c5d3f23bac1dded688b2bd314cc32b7f157e100724",
+ "4bc142808884e472ee6cc331b132e66ef18f564d41efb055804ec1dd28efb3f5",
+ "7e4633ae1b0e83503dbea4417f9d5ccaf22b877c5a4522b6d1d2b16090ee2f6f",
+ "473a0f4c3be8a93681a267e3b1e9a7dcda1185436fe141f7749120a303721813",
+ "7030f925768d9beb65654ab8f436e3ca0a82b25eddefd237bf5a26a0441c2aa7",
+ "cb282e7c15fd8aeb2265cd621f5a228cb33dc84192980ca426cf9ab2a48cb9f0",
+ "33e415b835a670bb5c3c760efa0433ac0cbd2d44679f68f2df3a9ae7014cf2a8",
+ "8155958bbda08eed88c8ac908dc44452ed38911cffa54ccc06076f30a1ffb1bf",
+ "1b4b74772bd83ff28bf44cda9be93f4afc2279623bb5b36c9194a660b7623c24",
+ "f31459efb9367c5a19c9dd24c75107423d5773066922ea5e55eaeb6490979562",
+ "6d5fd291bb0f67444e99ab492f1bf1fcdf5dca09dab24cf331e05111b4cfc1a3",
+ "b83624f6ac0995273c0034a7ab8c68929bdc91b69ad54ef94979b93eba3f6022",
+ "61489e9e831f1d9001084d39b79f964c293db8620d679ea3596673c8a326446e",
+ "abee32b3339d1566d75613ea61f40c14bdfc5b101b60fde4f44b58dd06667640",
+ "a4813ef6708e6011e8187224297e83e4a285f58bf5eabb1db270351388603c95",
+ "43e084a4599ca42c476919917e3db8fde0045ee66305fd5e634b0c793c536a1b"
+};
+
+#endif
diff --git a/tests/libgit2/odb/pack_data_one256.h b/tests/libgit2/odb/pack_data_one256.h
new file mode 100644
index 000000000..98a874798
--- /dev/null
+++ b/tests/libgit2/odb/pack_data_one256.h
@@ -0,0 +1,21 @@
+/* Just a few to make sure it's working, the rest is tested already */
+#ifdef GIT_EXPERIMENTAL_SHA256
+static const char *packed_objects_one256[] = {
+ "ea926306b1bab6d3f25f45609907eb6dff91a1460b25e63bf4a0494c70e7a269",
+ "d048ba2ef4fafa502a44cbc1a50cd58359b9bc243b84a08f541a08ca5f621137",
+ "a66bda0109d2b3c9bc87970da81bd91076b5f871febbc860f09ae997668b6800",
+ "3609a41c0506fe19d01fb8b4729923362675f191fe5f63fab3111ef804c48fdf",
+ "22b6705b86e4aa9120eff203af24709d483698d9f78695e86e82de121784b570",
+ "6f11d93bfb269ee8c7a506178f60c430abfac5d424acfd9c0b0b27b98e6ab49b",
+ "0aefd477d9e5b3f8d708a3cf6d78be6b670dfa2e2ec41244634f3b8f115d8e04",
+ "580474d948cd2ebd2e5ce7a5b81b872d87ba4639c1ac4c0fa7a11a8eddf9827c",
+ "0636b4292bfdd7274a977cb6f8b2ded8f315ea1bcd8dbedfca37964c2ed3d085",
+ "19fb1c78b11f0f8bda658d6fa6cc63c0b573c0f6760ee5a9c2df6ce2cde00c5c",
+ "7f2f7afccb317bb3fdd28555f126846dc4eebe5d9ae7b8d8a1456e8ff85422ce",
+ "4066249c68b0d3c8b39ebe02c9188935900465acad02a49269710f56720fa58e",
+ "a560d1fa1edf114f57b402e16d662c17b1e3b7e8601ff7dcea6615ba7f1e48ef",
+ "58923faa87c7d559d308a114ec2b164e5d6046c889420ed1def6eef2d55106a2",
+ "753ddabab8ae9c1e733cda15e8e3c83dd43f5a2d939ae32cc3b30b0be1e91f96",
+ "46333d32b3801cf11d9f80b557245c9e32b0e05deca61dae968914fde159f0e5"
+};
+#endif
diff --git a/tests/libgit2/odb/packed256.c b/tests/libgit2/odb/packed256.c
new file mode 100644
index 000000000..65220fd4c
--- /dev/null
+++ b/tests/libgit2/odb/packed256.c
@@ -0,0 +1,98 @@
+#include "clar_libgit2.h"
+#include "odb.h"
+#include "pack_data_256.h"
+
+#ifdef GIT_EXPERIMENTAL_SHA256
+static git_odb *_odb;
+#endif
+
+void test_odb_packed256__initialize(void)
+{
+#ifdef GIT_EXPERIMENTAL_SHA256
+ git_odb_options opts = GIT_ODB_OPTIONS_INIT;
+
+ opts.oid_type = GIT_OID_SHA256;
+
+ cl_git_pass(git_odb__open(
+ &_odb,
+ cl_fixture("testrepo_256.git/objects"),
+ &opts));
+#endif
+}
+
+void test_odb_packed256__cleanup(void)
+{
+#ifdef GIT_EXPERIMENTAL_SHA256
+ git_odb_free(_odb);
+ _odb = NULL;
+#endif
+}
+
+void test_odb_packed256__mass_read(void)
+{
+#ifdef GIT_EXPERIMENTAL_SHA256
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE(packed_objects_256); ++i) {
+ git_oid id;
+ git_odb_object *obj;
+
+ cl_git_pass(git_oid__fromstr(&id, packed_objects_256[i], GIT_OID_SHA256));
+ cl_assert(git_odb_exists(_odb, &id) == 1);
+ cl_git_pass(git_odb_read(&obj, _odb, &id));
+
+ git_odb_object_free(obj);
+ }
+#endif
+}
+
+void test_odb_packed256__read_header_0(void)
+{
+#ifdef GIT_EXPERIMENTAL_SHA256
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE(packed_objects_256); ++i) {
+ git_oid id;
+ git_odb_object *obj;
+ size_t len;
+ git_object_t type;
+
+ cl_git_pass(git_oid__fromstr(&id, packed_objects_256[i], GIT_OID_SHA256));
+
+ cl_git_pass(git_odb_read(&obj, _odb, &id));
+ cl_git_pass(git_odb_read_header(&len, &type, _odb, &id));
+
+ cl_assert(obj->cached.size == len);
+ cl_assert(obj->cached.type == type);
+
+ git_odb_object_free(obj);
+ }
+#endif
+}
+
+void test_odb_packed256__read_header_1(void)
+{
+#ifdef GIT_EXPERIMENTAL_SHA256
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE(loose_objects_256); ++i) {
+ git_oid id;
+ git_odb_object *obj;
+ size_t len;
+ git_object_t type;
+
+ cl_git_pass(git_oid__fromstr(&id, loose_objects_256[i], GIT_OID_SHA256));
+
+ cl_assert(git_odb_exists(_odb, &id) == 1);
+
+ cl_git_pass(git_odb_read(&obj, _odb, &id));
+ cl_git_pass(git_odb_read_header(&len, &type, _odb, &id));
+
+ cl_assert(obj->cached.size == len);
+ cl_assert(obj->cached.type == type);
+
+ git_odb_object_free(obj);
+ }
+#endif
+}
+
diff --git a/tests/libgit2/odb/packed_one.c b/tests/libgit2/odb/packedone.c
index 7a1d3d913..8637001ff 100644
--- a/tests/libgit2/odb/packed_one.c
+++ b/tests/libgit2/odb/packedone.c
@@ -6,22 +6,29 @@
static git_odb *_odb;
-void test_odb_packed_one__initialize(void)
+void test_odb_packedone__initialize(void)
{
git_odb_backend *backend = NULL;
cl_git_pass(git_odb__new(&_odb, NULL));
- cl_git_pass(git_odb_backend_one_pack(&backend, cl_fixture("testrepo.git/objects/pack/pack-a81e489679b7d3418f9ab594bda8ceb37dd4c695.idx")));
+#ifdef GIT_EXPERIMENTAL_SHA256
+ cl_git_pass(git_odb_backend_one_pack(&backend,
+ cl_fixture("testrepo.git/objects/pack/pack-a81e489679b7d3418f9ab594bda8ceb37dd4c695.idx"),
+ NULL));
+#else
+ cl_git_pass(git_odb_backend_one_pack(&backend,
+ cl_fixture("testrepo.git/objects/pack/pack-a81e489679b7d3418f9ab594bda8ceb37dd4c695.idx")));
+#endif
cl_git_pass(git_odb_add_backend(_odb, backend, 1));
}
-void test_odb_packed_one__cleanup(void)
+void test_odb_packedone__cleanup(void)
{
git_odb_free(_odb);
_odb = NULL;
}
-void test_odb_packed_one__mass_read(void)
+void test_odb_packedone__mass_read(void)
{
unsigned int i;
@@ -37,7 +44,7 @@ void test_odb_packed_one__mass_read(void)
}
}
-void test_odb_packed_one__read_header_0(void)
+void test_odb_packedone__read_header_0(void)
{
unsigned int i;
diff --git a/tests/libgit2/odb/packedone256.c b/tests/libgit2/odb/packedone256.c
new file mode 100644
index 000000000..fdeac4205
--- /dev/null
+++ b/tests/libgit2/odb/packedone256.c
@@ -0,0 +1,78 @@
+#include "clar_libgit2.h"
+#include "git2/odb_backend.h"
+
+#include "pack_data_one256.h"
+#include "pack.h"
+
+#ifdef GIT_EXPERIMENTAL_SHA256
+static git_odb *_odb;
+#endif
+
+void test_odb_packedone256__initialize(void)
+{
+#ifdef GIT_EXPERIMENTAL_SHA256
+ git_odb_backend *backend = NULL;
+ git_odb_options odb_opts = GIT_ODB_OPTIONS_INIT;
+ git_odb_backend_pack_options backend_opts = GIT_ODB_BACKEND_PACK_OPTIONS_INIT;
+
+ odb_opts.oid_type = GIT_OID_SHA256;
+ backend_opts.oid_type = GIT_OID_SHA256;
+
+ cl_git_pass(git_odb__new(&_odb, &odb_opts));
+ cl_git_pass(git_odb_backend_one_pack(
+ &backend,
+ cl_fixture("testrepo_256.git/objects/pack/pack-e2f07f30db7e480ea84a0e64ee791b9b270067124b2609019b74f33f256f33fa.idx"),
+ &backend_opts));
+ cl_git_pass(git_odb_add_backend(_odb, backend, 1));
+#endif
+}
+
+void test_odb_packedone256__cleanup(void)
+{
+#ifdef GIT_EXPERIMENTAL_SHA256
+ git_odb_free(_odb);
+ _odb = NULL;
+#endif
+}
+
+void test_odb_packedone256__mass_read(void)
+{
+#ifdef GIT_EXPERIMENTAL_SHA256
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE(packed_objects_one256); ++i) {
+ git_oid id;
+ git_odb_object *obj;
+
+ cl_git_pass(git_oid__fromstr(&id, packed_objects_one256[i], GIT_OID_SHA256));
+ cl_assert(git_odb_exists(_odb, &id) == 1);
+ cl_git_pass(git_odb_read(&obj, _odb, &id));
+
+ git_odb_object_free(obj);
+ }
+#endif
+}
+
+void test_odb_packedone256__read_header_0(void)
+{
+#ifdef GIT_EXPERIMENTAL_SHA256
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE(packed_objects_one256); ++i) {
+ git_oid id;
+ git_odb_object *obj;
+ size_t len;
+ git_object_t type;
+
+ cl_git_pass(git_oid__fromstr(&id, packed_objects_one256[i], GIT_OID_SHA256));
+
+ cl_git_pass(git_odb_read(&obj, _odb, &id));
+ cl_git_pass(git_odb_read_header(&len, &type, _odb, &id));
+
+ cl_assert(obj->cached.size == len);
+ cl_assert(obj->cached.type == type);
+
+ git_odb_object_free(obj);
+ }
+#endif
+}
diff --git a/tests/libgit2/odb/sorting.c b/tests/libgit2/odb/sorting.c
index 1010872f4..ec4e3696b 100644
--- a/tests/libgit2/odb/sorting.c
+++ b/tests/libgit2/odb/sorting.c
@@ -82,7 +82,11 @@ void test_odb_sorting__override_default_backend_priority(void)
cl_git_pass(git_libgit2_opts(GIT_OPT_SET_ODB_LOOSE_PRIORITY, 5));
cl_git_pass(git_libgit2_opts(GIT_OPT_SET_ODB_PACKED_PRIORITY, 3));
- git_odb_backend_pack(&packed, "./testrepo.git/objects");
+ git_odb_backend_pack(&packed, "./testrepo.git/objects"
+#ifdef GIT_EXPERIMENTAL_SHA256
+ , NULL
+#endif
+ );
git_odb__backend_loose(&loose, "./testrepo.git/objects", NULL);
cl_git_pass(git_odb__open(&new_odb, cl_fixture("testrepo.git/objects"), NULL));
diff --git a/tests/libgit2/online/clone.c b/tests/libgit2/online/clone.c
index 6a087b1af..1a4cdb520 100644
--- a/tests/libgit2/online/clone.c
+++ b/tests/libgit2/online/clone.c
@@ -21,6 +21,7 @@ static git_clone_options g_options;
static char *_remote_url = NULL;
static char *_remote_user = NULL;
static char *_remote_pass = NULL;
+static char *_remote_branch = NULL;
static char *_remote_sslnoverify = NULL;
static char *_remote_ssh_pubkey = NULL;
static char *_remote_ssh_privkey = NULL;
@@ -35,6 +36,11 @@ static char *_remote_expectcontinue = NULL;
static char *_remote_redirect_initial = NULL;
static char *_remote_redirect_subsequent = NULL;
+static char *_github_ssh_pubkey = NULL;
+static char *_github_ssh_privkey = NULL;
+static char *_github_ssh_passphrase = NULL;
+static char *_github_ssh_remotehostkey = NULL;
+
static int _orig_proxies_need_reset = 0;
static char *_orig_http_proxy = NULL;
static char *_orig_https_proxy = NULL;
@@ -69,6 +75,7 @@ void test_online_clone__initialize(void)
_remote_url = cl_getenv("GITTEST_REMOTE_URL");
_remote_user = cl_getenv("GITTEST_REMOTE_USER");
_remote_pass = cl_getenv("GITTEST_REMOTE_PASS");
+ _remote_branch = cl_getenv("GITTEST_REMOTE_BRANCH");
_remote_sslnoverify = cl_getenv("GITTEST_REMOTE_SSL_NOVERIFY");
_remote_ssh_pubkey = cl_getenv("GITTEST_REMOTE_SSH_PUBKEY");
_remote_ssh_privkey = cl_getenv("GITTEST_REMOTE_SSH_KEY");
@@ -83,6 +90,11 @@ void test_online_clone__initialize(void)
_remote_redirect_initial = cl_getenv("GITTEST_REMOTE_REDIRECT_INITIAL");
_remote_redirect_subsequent = cl_getenv("GITTEST_REMOTE_REDIRECT_SUBSEQUENT");
+ _github_ssh_pubkey = cl_getenv("GITTEST_GITHUB_SSH_PUBKEY");
+ _github_ssh_privkey = cl_getenv("GITTEST_GITHUB_SSH_KEY");
+ _github_ssh_passphrase = cl_getenv("GITTEST_GITHUB_SSH_PASSPHRASE");
+ _github_ssh_remotehostkey = cl_getenv("GITTEST_GITHUB_SSH_REMOTE_HOSTKEY");
+
if (_remote_expectcontinue)
git_libgit2_opts(GIT_OPT_ENABLE_HTTP_EXPECT_CONTINUE, 1);
@@ -102,6 +114,7 @@ void test_online_clone__cleanup(void)
git__free(_remote_url);
git__free(_remote_user);
git__free(_remote_pass);
+ git__free(_remote_branch);
git__free(_remote_sslnoverify);
git__free(_remote_ssh_pubkey);
git__free(_remote_ssh_privkey);
@@ -116,6 +129,11 @@ void test_online_clone__cleanup(void)
git__free(_remote_redirect_initial);
git__free(_remote_redirect_subsequent);
+ git__free(_github_ssh_pubkey);
+ git__free(_github_ssh_privkey);
+ git__free(_github_ssh_passphrase);
+ git__free(_github_ssh_remotehostkey);
+
if (_orig_proxies_need_reset) {
cl_setenv("HTTP_PROXY", _orig_http_proxy);
cl_setenv("HTTPS_PROXY", _orig_https_proxy);
@@ -309,6 +327,16 @@ void test_online_clone__custom_headers(void)
cl_git_pass(git_clone(&g_repo, LIVE_REPO_URL, "./foo", &g_options));
}
+void test_online_clone__long_custom_header(void)
+{
+ /* Long custom header with 1500 characters */
+ char *ok = "X-Custom: a0MsqH2bXV9lILn7zkAHqKpGrOVvkik7SfoyqfXbFTxccsymN5SG9hEB0RLD9koTXKWtaI1vI9jHf5ViwLHq6xvkveFX9GiqaIhe3TRu5KDZrOBgeufdBYsTTONALPlpni9XVq71bR6x3AlVEqHdXi9qiq0TRuNiujMy0ZKs8LQkQVSE8kxWZXqLsO2IJtAPw5aqsUEenK5ec12GOeOTOYlSChGllzvl2Ow4SKlVg3t8NHVWvc8HyPGmBQ79l3qUMU30P0hnUXaIrhIzGgleYWnwhGFLpryxsQfCdwkdBMuvtLH0DnkhLoAkCmnCZItEExtHBOCirEzztoFMX3lH4lM4wMqePCU8II0qloNvzPgt6cBThQJP66FYUDSCwsSb63bcTWdVx7TCa6mAplkP49PKi5pFSvFKKbs5se5MPcBVG03GiatKszIQkii0vp6OV5b54Aym4N8hQJHFMhIChKiQM91tB7PQu9vPJE6h2bzAnQsn34bBPFZHT7pBplqkASiHDjw69YV6k3M8ffTOTr2ibQnTKxh1NH3ZRx6u0KxRty9i4YLMniZUZAfFgqbSW2xXk49e8J9VNFm7j2bgHp3t813wUzqnQL4NEc0CQlF0e6pId5ADXikoH6S7aMfuYUYi1Kn1i9m7UGtaB0U7dVC65uH9vIWKnyAcmBt0mN1aikRnjz7oBKjD65SRZrKWXeCDJkpgWlXnD5JjekDCyB9m3yGkaxy1FflI1kaa4kcVbPRfs6XebHRDl9golPBUyazRG1V1iOi1mKki9ClUNO8wviNfKm5eMbWW6hU8wMXh388EotRA73TUdL4JIfNpkC4XBFLNFbFtltzO34kxXBKvhj8t0XVZOp4AWpHEL3pUtuyKhNWaWlDF6ZhjCeO8vT1akKoYaA7t6nFyqawq5nPoB0iXEHQ7YugfYfgjzpNGLgvPJ6aLg9YIKZBqfi7J9xWb356IJvTQFswi7qm6Mu7IVXarS9m84b5IfT6UCVq84u4VcdBlDswNPTw6SbBtzg9vrLLs3MoTCzJY6fHPqnKt6YthgQwOOB1ig7GTSDiX3W3SMeaz5jTASociHrUS3HrwVSgjrODnF86962cv4s3DGYjiX2cIuNfq9mZVJlNsylZjFYFV9LzOjNLlSHZVJrrGQJLjmyOCwOMkG9u2xKdSvfjxTJzqhjhTvQSQZWhKt44hA9EidUqPqjc3MhfnZ6aeAIP232gtRHoRc7FdjRSan4Q3PWy02YiRodvKAafonwCOtMcm4MASrXBiBE1tibHLSTtK4UrodFNVhymtBCRnJdVRSgrCQcr2B5Jzs4Iv6uJlJqwwyuq6In54zcmecgJZezta84B3eFoSGJhCbI6Zza0khulccglCcppciWDStAHFhncePsCQL4tup0Z8fS01RksRQ7X1xgskVvQAKELThDqbJB4FJZwrwPXOpCweAoSONntp7Ly0lAUabw75gK5sR387IxNVdISmfP";
+
+ g_options.fetch_opts.custom_headers.count = 1;
+ g_options.fetch_opts.custom_headers.strings = &ok;
+ cl_git_pass(git_clone(&g_repo, LIVE_REPO_URL, "./foo", &g_options));
+}
+
static int cred_failure_cb(
git_credential **cred,
const char *url,
@@ -541,6 +569,68 @@ static int check_ssh_auth_methods(git_credential **cred, const char *url, const
return GIT_EUSER;
}
+static int succeed_certificate_check(git_cert *cert, int valid, const char *host, void *payload)
+{
+ GIT_UNUSED(cert);
+ GIT_UNUSED(valid);
+ GIT_UNUSED(payload);
+
+ cl_assert_equal_s("github.com", host);
+
+ return 0;
+}
+
+static int fail_certificate_check(git_cert *cert, int valid, const char *host, void *payload)
+{
+ GIT_UNUSED(cert);
+ GIT_UNUSED(valid);
+ GIT_UNUSED(host);
+ GIT_UNUSED(payload);
+
+ return GIT_ECERTIFICATE;
+}
+
+static int github_credentials(
+ git_credential **cred,
+ const char *url,
+ const char *username_from_url,
+ unsigned int allowed_types,
+ void *data)
+{
+ GIT_UNUSED(url);
+ GIT_UNUSED(username_from_url);
+ GIT_UNUSED(data);
+
+ if ((allowed_types & GIT_CREDENTIAL_USERNAME) != 0) {
+ return git_credential_username_new(cred, "git");
+ }
+
+ cl_assert((allowed_types & GIT_CREDENTIAL_SSH_KEY) != 0);
+
+ return git_credential_ssh_key_memory_new(cred,
+ "git",
+ _github_ssh_pubkey,
+ _github_ssh_privkey,
+ _github_ssh_passphrase);
+}
+
+void test_online_clone__ssh_github(void)
+{
+#if !defined(GIT_SSH) || !defined(GIT_SSH_MEMORY_CREDENTIALS)
+ clar__skip();
+#endif
+
+ if (!_github_ssh_pubkey || !_github_ssh_privkey)
+ clar__skip();
+
+ cl_fake_homedir(NULL);
+
+ g_options.fetch_opts.callbacks.credentials = github_credentials;
+ g_options.fetch_opts.callbacks.certificate_check = succeed_certificate_check;
+
+ cl_git_pass(git_clone(&g_repo, SSH_REPO_URL, "./foo", &g_options));
+}
+
void test_online_clone__ssh_auth_methods(void)
{
int with_user;
@@ -550,7 +640,7 @@ void test_online_clone__ssh_auth_methods(void)
#endif
g_options.fetch_opts.callbacks.credentials = check_ssh_auth_methods;
g_options.fetch_opts.callbacks.payload = &with_user;
- g_options.fetch_opts.callbacks.certificate_check = NULL;
+ g_options.fetch_opts.callbacks.certificate_check = succeed_certificate_check;
with_user = 0;
cl_git_fail_with(GIT_EUSER,
@@ -561,6 +651,69 @@ void test_online_clone__ssh_auth_methods(void)
git_clone(&g_repo, "ssh://git@github.com/libgit2/TestGitRepository", "./foo", &g_options));
}
+/*
+ * Ensure that the certificate check callback is still called, and
+ * can accept a host key that is not in the known hosts file.
+ */
+void test_online_clone__ssh_certcheck_accepts_unknown(void)
+{
+#if !defined(GIT_SSH) || !defined(GIT_SSH_MEMORY_CREDENTIALS)
+ clar__skip();
+#endif
+
+ if (!_github_ssh_pubkey || !_github_ssh_privkey)
+ clar__skip();
+
+ cl_fake_homedir(NULL);
+
+ g_options.fetch_opts.callbacks.credentials = github_credentials;
+
+ /* Ensure we fail without the certificate check */
+ cl_git_fail_with(GIT_ECERTIFICATE,
+ git_clone(&g_repo, SSH_REPO_URL, "./foo", NULL));
+
+ /* Set the callback to accept the certificate */
+ g_options.fetch_opts.callbacks.certificate_check = succeed_certificate_check;
+
+ cl_git_pass(git_clone(&g_repo, SSH_REPO_URL, "./foo", &g_options));
+}
+
+/*
+ * Ensure that the known hosts file is read and the certificate check
+ * callback is still called after that.
+ */
+void test_online_clone__ssh_certcheck_override_knownhosts(void)
+{
+ git_str knownhostsfile = GIT_STR_INIT;
+
+#if !defined(GIT_SSH) || !defined(GIT_SSH_MEMORY_CREDENTIALS)
+ clar__skip();
+#endif
+
+ if (!_github_ssh_pubkey || !_github_ssh_privkey || !_github_ssh_remotehostkey)
+ clar__skip();
+
+ g_options.fetch_opts.callbacks.credentials = github_credentials;
+
+ cl_fake_homedir(&knownhostsfile);
+ cl_git_pass(git_str_joinpath(&knownhostsfile, knownhostsfile.ptr, ".ssh"));
+ cl_git_pass(p_mkdir(knownhostsfile.ptr, 0777));
+
+ cl_git_pass(git_str_joinpath(&knownhostsfile, knownhostsfile.ptr, "known_hosts"));
+ cl_git_rewritefile(knownhostsfile.ptr, _github_ssh_remotehostkey);
+
+ /* Ensure we succeed without the certificate check */
+ cl_git_pass(git_clone(&g_repo, SSH_REPO_URL, "./foo", &g_options));
+ git_repository_free(g_repo);
+ g_repo = NULL;
+
+ /* Set the callback to reject the certificate */
+ g_options.fetch_opts.callbacks.certificate_check = fail_certificate_check;
+ cl_git_fail_with(GIT_ECERTIFICATE, git_clone(&g_repo, SSH_REPO_URL, "./bar", &g_options));
+
+ git_str_dispose(&knownhostsfile);
+}
+
static int custom_remote_ssh_with_paths(
git_remote **out,
git_repository *repo,
@@ -733,16 +886,6 @@ void test_online_clone__ssh_memory_auth(void)
cl_git_pass(git_clone(&g_repo, _remote_url, "./foo", &g_options));
}
-static int fail_certificate_check(git_cert *cert, int valid, const char *host, void *payload)
-{
- GIT_UNUSED(cert);
- GIT_UNUSED(valid);
- GIT_UNUSED(host);
- GIT_UNUSED(payload);
-
- return GIT_ECERTIFICATE;
-}
-
void test_online_clone__certificate_invalid(void)
{
g_options.fetch_opts.callbacks.certificate_check = fail_certificate_check;
@@ -756,17 +899,6 @@ void test_online_clone__certificate_invalid(void)
#endif
}
-static int succeed_certificate_check(git_cert *cert, int valid, const char *host, void *payload)
-{
- GIT_UNUSED(cert);
- GIT_UNUSED(valid);
- GIT_UNUSED(payload);
-
- cl_assert_equal_s("github.com", host);
-
- return 0;
-}
-
void test_online_clone__certificate_valid(void)
{
g_options.fetch_opts.callbacks.certificate_check = succeed_certificate_check;
@@ -1006,3 +1138,61 @@ void test_online_clone__redirect_initial_fails_for_subsequent(void)
cl_git_fail(git_clone(&g_repo, _remote_redirect_subsequent, "./fail", &options));
}
+
+void test_online_clone__namespace_bare(void)
+{
+ git_clone_options options = GIT_CLONE_OPTIONS_INIT;
+ git_reference *head;
+
+ if (!_remote_url)
+ cl_skip();
+
+ options.bare = true;
+
+ cl_git_pass(git_clone(&g_repo, _remote_url, "./namespaced.git", &options));
+
+ cl_git_pass(git_reference_lookup(&head, g_repo, GIT_HEAD_FILE));
+ cl_assert_equal_i(GIT_REFERENCE_SYMBOLIC, git_reference_type(head));
+ cl_assert_equal_s("refs/heads/master", git_reference_symbolic_target(head));
+
+ git_reference_free(head);
+}
+
+void test_online_clone__namespace_with_specified_branch(void)
+{
+ git_clone_options options = GIT_CLONE_OPTIONS_INIT;
+ git_reference *head;
+
+ if (!_remote_url || !_remote_branch)
+ cl_skip();
+
+ options.checkout_branch = _remote_branch;
+
+ cl_git_pass(git_clone(&g_repo, _remote_url, "./namespaced", &options));
+
+ cl_git_pass(git_reference_lookup(&head, g_repo, GIT_HEAD_FILE));
+ cl_assert_equal_i(GIT_REFERENCE_SYMBOLIC, git_reference_type(head));
+ cl_assert_equal_strn("refs/heads/", git_reference_symbolic_target(head), 11);
+ cl_assert_equal_s(_remote_branch, git_reference_symbolic_target(head) + 11);
+
+ git_reference_free(head);
+}
+
+void test_online_clone__sha256(void)
+{
+#ifndef GIT_EXPERIMENTAL_SHA256
+ cl_skip();
+#else
+ git_clone_options options = GIT_CLONE_OPTIONS_INIT;
+ git_reference *head;
+
+ if (!_remote_url)
+ cl_skip();
+
+ cl_git_pass(git_clone(&g_repo, _remote_url, "./sha256", &options));
+ cl_git_pass(git_reference_lookup(&head, g_repo, GIT_HEAD_FILE));
+ cl_assert_equal_i(GIT_REFERENCE_SYMBOLIC, git_reference_type(head));
+
+ git_reference_free(head);
+#endif
+}
diff --git a/tests/libgit2/online/push.c b/tests/libgit2/online/push.c
index d9208d28a..204572cf5 100644
--- a/tests/libgit2/online/push.c
+++ b/tests/libgit2/online/push.c
@@ -841,13 +841,28 @@ void test_online_push__bad_refspecs(void)
void test_online_push__expressions(void)
{
- /* TODO: Expressions in refspecs doesn't actually work yet */
- const char *specs_left_expr[] = { "refs/heads/b2~1:refs/heads/b2" };
+ const char *specs_left_expr[] = {
+ "refs/heads/b3~1:refs/heads/b2",
+ "b4:refs/heads/b4",
+ "fa38b91f199934685819bea316186d8b008c52a2:refs/heads/b5",
+ "951bbbb:refs/heads/b6"
+ };
+ push_status exp_stats[] = {
+ { "refs/heads/b2", 1 },
+ { "refs/heads/b4", 1 },
+ { "refs/heads/b5", 1 },
+ { "refs/heads/b6", 1 }
+ };
+ expected_ref exp_refs[] = {
+ { "refs/heads/b2", &_oid_b2 },
+ { "refs/heads/b4", &_oid_b4 },
+ { "refs/heads/b5", &_oid_b5 },
+ { "refs/heads/b6", &_oid_b6 }
+ };
- /* TODO: Find a more precise way of checking errors than a exit code of -1. */
do_push(specs_left_expr, ARRAY_SIZE(specs_left_expr),
- NULL, 0,
- NULL, 0, -1, 0, 0);
+ exp_stats, ARRAY_SIZE(exp_stats),
+ exp_refs, ARRAY_SIZE(exp_refs), 0, 1, 1);
}
void test_online_push__notes(void)
diff --git a/tests/libgit2/pack/indexer.c b/tests/libgit2/pack/indexer.c
index 2ac287255..9722decaf 100644
--- a/tests/libgit2/pack/indexer.c
+++ b/tests/libgit2/pack/indexer.c
@@ -100,7 +100,12 @@ void test_pack_indexer__out_of_order(void)
git_indexer *idx = 0;
git_indexer_progress stats = { 0 };
+#ifdef GIT_EXPERIMENTAL_SHA256
+ cl_git_pass(git_indexer_new(&idx, ".", GIT_OID_SHA1, NULL));
+#else
cl_git_pass(git_indexer_new(&idx, ".", 0, NULL, NULL));
+#endif
+
cl_git_pass(git_indexer_append(
idx, out_of_order_pack, out_of_order_pack_len, &stats));
cl_git_pass(git_indexer_commit(idx, &stats));
@@ -117,7 +122,12 @@ void test_pack_indexer__missing_trailer(void)
git_indexer *idx = 0;
git_indexer_progress stats = { 0 };
+#ifdef GIT_EXPERIMENTAL_SHA256
+ cl_git_pass(git_indexer_new(&idx, ".", GIT_OID_SHA1, NULL));
+#else
cl_git_pass(git_indexer_new(&idx, ".", 0, NULL, NULL));
+#endif
+
cl_git_pass(git_indexer_append(
idx, missing_trailer_pack, missing_trailer_pack_len, &stats));
cl_git_fail(git_indexer_commit(idx, &stats));
@@ -133,7 +143,12 @@ void test_pack_indexer__leaky(void)
git_indexer *idx = 0;
git_indexer_progress stats = { 0 };
+#ifdef GIT_EXPERIMENTAL_SHA256
+ cl_git_pass(git_indexer_new(&idx, ".", GIT_OID_SHA1, NULL));
+#else
cl_git_pass(git_indexer_new(&idx, ".", 0, NULL, NULL));
+#endif
+
cl_git_pass(git_indexer_append(
idx, leaky_pack, leaky_pack_len, &stats));
cl_git_fail(git_indexer_commit(idx, &stats));
@@ -151,6 +166,7 @@ void test_pack_indexer__fix_thin(void)
git_repository *repo;
git_odb *odb;
git_oid id, should_id;
+ git_indexer_options opts = GIT_INDEXER_OPTIONS_INIT;
cl_git_pass(git_repository_init(&repo, "thin.git", true));
cl_git_pass(git_repository_odb(&odb, repo));
@@ -160,7 +176,13 @@ void test_pack_indexer__fix_thin(void)
git_oid__fromstr(&should_id, "e68fe8129b546b101aee9510c5328e7f21ca1d18", GIT_OID_SHA1);
cl_assert_equal_oid(&should_id, &id);
- cl_git_pass(git_indexer_new(&idx, ".", 0, odb, NULL));
+#ifdef GIT_EXPERIMENTAL_SHA256
+ opts.odb = odb;
+ cl_git_pass(git_indexer_new(&idx, ".", GIT_OID_SHA1, &opts));
+#else
+ cl_git_pass(git_indexer_new(&idx, ".", 0, odb, &opts));
+#endif
+
cl_git_pass(git_indexer_append(idx, thin_pack, thin_pack_len, &stats));
cl_git_pass(git_indexer_commit(idx, &stats));
@@ -192,7 +214,12 @@ void test_pack_indexer__fix_thin(void)
cl_git_pass(p_stat(name, &st));
+#ifdef GIT_EXPERIMENTAL_SHA256
+ cl_git_pass(git_indexer_new(&idx, ".", GIT_OID_SHA1, NULL));
+#else
cl_git_pass(git_indexer_new(&idx, ".", 0, NULL, NULL));
+#endif
+
read = p_read(fd, buffer, sizeof(buffer));
cl_assert(read != -1);
p_close(fd);
@@ -216,6 +243,7 @@ void test_pack_indexer__corrupt_length(void)
git_repository *repo;
git_odb *odb;
git_oid id, should_id;
+ git_indexer_options opts = GIT_INDEXER_OPTIONS_INIT;
cl_git_pass(git_repository_init(&repo, "thin.git", true));
cl_git_pass(git_repository_odb(&odb, repo));
@@ -225,7 +253,13 @@ void test_pack_indexer__corrupt_length(void)
git_oid__fromstr(&should_id, "e68fe8129b546b101aee9510c5328e7f21ca1d18", GIT_OID_SHA1);
cl_assert_equal_oid(&should_id, &id);
- cl_git_pass(git_indexer_new(&idx, ".", 0, odb, NULL));
+#ifdef GIT_EXPERIMENTAL_SHA256
+ opts.odb = odb;
+ cl_git_pass(git_indexer_new(&idx, ".", GIT_OID_SHA1, &opts));
+#else
+ cl_git_pass(git_indexer_new(&idx, ".", 0, odb, &opts));
+#endif
+
cl_git_pass(git_indexer_append(
idx, corrupt_thin_pack, corrupt_thin_pack_len, &stats));
cl_git_fail(git_indexer_commit(idx, &stats));
@@ -246,7 +280,12 @@ void test_pack_indexer__incomplete_pack_fails_with_strict(void)
opts.verify = 1;
+#ifdef GIT_EXPERIMENTAL_SHA256
+ cl_git_pass(git_indexer_new(&idx, ".", GIT_OID_SHA1, &opts));
+#else
cl_git_pass(git_indexer_new(&idx, ".", 0, NULL, &opts));
+#endif
+
cl_git_pass(git_indexer_append(
idx, incomplete_pack, incomplete_pack_len, &stats));
cl_git_fail(git_indexer_commit(idx, &stats));
@@ -266,7 +305,12 @@ void test_pack_indexer__out_of_order_with_connectivity_checks(void)
opts.verify = 1;
+#ifdef GIT_EXPERIMENTAL_SHA256
+ cl_git_pass(git_indexer_new(&idx, ".", GIT_OID_SHA1, &opts));
+#else
cl_git_pass(git_indexer_new(&idx, ".", 0, NULL, &opts));
+#endif
+
cl_git_pass(git_indexer_append(
idx, out_of_order_pack, out_of_order_pack_len, &stats));
cl_git_pass(git_indexer_commit(idx, &stats));
@@ -309,7 +353,12 @@ void test_pack_indexer__no_tmp_files(void)
git_str_dispose(&path);
cl_assert(git_str_len(&first_tmp_file) == 0);
+#ifdef GIT_EXPERIMENTAL_SHA256
+ cl_git_pass(git_indexer_new(&idx, ".", GIT_OID_SHA1, NULL));
+#else
cl_git_pass(git_indexer_new(&idx, ".", 0, NULL, NULL));
+#endif
+
git_indexer_free(idx);
cl_git_pass(git_str_sets(&path, clar_sandbox_path()));
diff --git a/tests/libgit2/pack/packbuilder.c b/tests/libgit2/pack/packbuilder.c
index 0889f46ed..ff3dc1f68 100644
--- a/tests/libgit2/pack/packbuilder.c
+++ b/tests/libgit2/pack/packbuilder.c
@@ -104,7 +104,12 @@ void test_pack_packbuilder__create_pack(void)
seed_packbuilder();
+#ifdef GIT_EXPERIMENTAL_SHA256
+ cl_git_pass(git_indexer_new(&_indexer, ".", GIT_OID_SHA1, NULL));
+#else
cl_git_pass(git_indexer_new(&_indexer, ".", 0, NULL, NULL));
+#endif
+
cl_git_pass(git_packbuilder_foreach(_packbuilder, feed_indexer, &stats));
cl_git_pass(git_indexer_commit(_indexer, &stats));
@@ -244,7 +249,13 @@ void test_pack_packbuilder__foreach(void)
git_indexer *idx;
seed_packbuilder();
+
+#ifdef GIT_EXPERIMENTAL_SHA256
+ cl_git_pass(git_indexer_new(&idx, ".", GIT_OID_SHA1, NULL));
+#else
cl_git_pass(git_indexer_new(&idx, ".", 0, NULL, NULL));
+#endif
+
cl_git_pass(git_packbuilder_foreach(_packbuilder, foreach_cb, idx));
cl_git_pass(git_indexer_commit(idx, &_stats));
git_indexer_free(idx);
@@ -262,7 +273,13 @@ void test_pack_packbuilder__foreach_with_cancel(void)
git_indexer *idx;
seed_packbuilder();
+
+#ifdef GIT_EXPERIMENTAL_SHA256
+ cl_git_pass(git_indexer_new(&idx, ".", GIT_OID_SHA1, NULL));
+#else
cl_git_pass(git_indexer_new(&idx, ".", 0, NULL, NULL));
+#endif
+
cl_git_fail_with(
git_packbuilder_foreach(_packbuilder, foreach_cancel_cb, idx), -1111);
git_indexer_free(idx);
diff --git a/tests/libgit2/refs/revparse.c b/tests/libgit2/refs/revparse.c
index 02ffe005d..d2f464840 100644
--- a/tests/libgit2/refs/revparse.c
+++ b/tests/libgit2/refs/revparse.c
@@ -304,6 +304,9 @@ void test_refs_revparse__ordinal(void)
test_object("@{0}", "a65fedf39aefe402d3bb6e24df4d4f5fe4547750");
test_object("@{1}", "be3563ae3f795b2b4353bcce3a527ad0a4f7f644");
+ test_object("HEAD@{0}", "a65fedf39aefe402d3bb6e24df4d4f5fe4547750");
+ test_object("HEAD@{4}", "5b5b025afb0b4c913b4c338a42934a3863bf3644");
+
test_object("master@{0}", "a65fedf39aefe402d3bb6e24df4d4f5fe4547750");
test_object("master@{1}", "be3563ae3f795b2b4353bcce3a527ad0a4f7f644");
test_object("heads/master@{1}", "be3563ae3f795b2b4353bcce3a527ad0a4f7f644");
diff --git a/tests/libgit2/remote/httpproxy.c b/tests/libgit2/remote/httpproxy.c
index f62a2545b..60fc67dec 100644
--- a/tests/libgit2/remote/httpproxy.c
+++ b/tests/libgit2/remote/httpproxy.c
@@ -6,7 +6,6 @@
static git_repository *repo;
static git_net_url url = GIT_NET_URL_INIT;
-static int orig_proxies_need_reset = 0;
static char *orig_http_proxy = NULL;
static char *orig_https_proxy = NULL;
static char *orig_no_proxy = NULL;
@@ -21,20 +20,25 @@ void test_remote_httpproxy__initialize(void)
git_remote_free(remote);
- orig_proxies_need_reset = 0;
+ /* Clear everything for a fresh start */
+ orig_http_proxy = cl_getenv("HTTP_PROXY");
+ orig_https_proxy = cl_getenv("HTTPS_PROXY");
+ orig_no_proxy = cl_getenv("NO_PROXY");
+
+ cl_setenv("HTTP_PROXY", NULL);
+ cl_setenv("HTTPS_PROXY", NULL);
+ cl_setenv("NO_PROXY", NULL);
}
void test_remote_httpproxy__cleanup(void)
{
- if (orig_proxies_need_reset) {
- cl_setenv("HTTP_PROXY", orig_http_proxy);
- cl_setenv("HTTPS_PROXY", orig_https_proxy);
- cl_setenv("NO_PROXY", orig_no_proxy);
-
- git__free(orig_http_proxy);
- git__free(orig_https_proxy);
- git__free(orig_no_proxy);
- }
+ cl_setenv("HTTP_PROXY", orig_http_proxy);
+ cl_setenv("HTTPS_PROXY", orig_https_proxy);
+ cl_setenv("NO_PROXY", orig_no_proxy);
+
+ git__free(orig_http_proxy);
+ git__free(orig_https_proxy);
+ git__free(orig_no_proxy);
git_net_url_dispose(&url);
cl_git_sandbox_cleanup();
@@ -132,7 +136,7 @@ static void assert_global_config_match(const char *config, const char *expected)
void test_remote_httpproxy__config_overrides_detached_remote(void)
{
- cl_fake_home();
+ cl_fake_globalconfig(NULL);
assert_global_config_match(NULL, NULL);
assert_global_config_match("http.proxy", "http://localhost:1/");
@@ -141,22 +145,10 @@ void test_remote_httpproxy__config_overrides_detached_remote(void)
assert_global_config_match("http.https://github.com/libgit2.proxy", "http://localhost:4/");
assert_global_config_match("http.https://github.com/libgit2/.proxy", "http://localhost:5/");
assert_global_config_match("http.https://github.com/libgit2/libgit2.proxy", "http://localhost:6/");
-
- cl_git_pass(git_futils_rmdir_r("home", NULL, GIT_RMDIR_REMOVE_FILES));
}
void test_remote_httpproxy__env(void)
{
- orig_http_proxy = cl_getenv("HTTP_PROXY");
- orig_https_proxy = cl_getenv("HTTPS_PROXY");
- orig_no_proxy = cl_getenv("NO_PROXY");
- orig_proxies_need_reset = 1;
-
- /* Clear everything for a fresh start */
- cl_setenv("HTTP_PROXY", NULL);
- cl_setenv("HTTPS_PROXY", NULL);
- cl_setenv("NO_PROXY", NULL);
-
/* HTTP proxy is ignored for HTTPS */
cl_setenv("HTTP_PROXY", "http://localhost:9/");
assert_proxy_is(NULL);
diff --git a/tests/libgit2/repo/extensions.c b/tests/libgit2/repo/extensions.c
index e7772acd5..105cdae12 100644
--- a/tests/libgit2/repo/extensions.c
+++ b/tests/libgit2/repo/extensions.c
@@ -3,7 +3,7 @@
#include "sysdir.h"
#include <ctype.h>
-git_repository *repo;
+static git_repository *repo;
void test_repo_extensions__initialize(void)
{
diff --git a/tests/libgit2/repo/init.c b/tests/libgit2/repo/init.c
index adcd9e025..d78ec063c 100644
--- a/tests/libgit2/repo/init.c
+++ b/tests/libgit2/repo/init.c
@@ -142,27 +142,46 @@ void test_repo_init__reinit_bare_repo(void)
cl_git_pass(git_repository_init(&g_repo, "reinit.git", 1));
}
-void test_repo_init__reinit_too_recent_bare_repo(void)
+void test_repo_init__reinit_nondefault_version(void)
{
git_config *config;
+ cl_set_cleanup(&cleanup_repository, "reinit.git");
+
/* Initialize the repository */
cl_git_pass(git_repository_init(&g_repo, "reinit.git", 1));
git_repository_config(&config, g_repo);
+ /* Set the config to a supported but not default version */
+ cl_repo_set_string(g_repo, "core.repositoryformatversion", "1");
+ git_config_free(config);
+ git_repository_free(g_repo);
+ g_repo = NULL;
+
+ /* Try to reinitialize the repository */
+ cl_git_pass(git_repository_init(&g_repo, "reinit.git", 1));
+ cl_assert_equal_i(1, cl_repo_get_int(g_repo, "core.repositoryformatversion"));
+
+ cl_fixture_cleanup("reinit.git");
+}
+
+void test_repo_init__reinit_unsupported_version(void)
+{
+ cl_set_cleanup(&cleanup_repository, "reinit.git");
+
+ /* Initialize the repository */
+ cl_git_pass(git_repository_init(&g_repo, "reinit.git", 1));
+
/*
* Hack the config of the repository to make it look like it has
- * been created by a recenter version of git/libgit2
+ * been created by a too new and unsupported version of git/libgit2
*/
- cl_git_pass(git_config_set_int32(config, "core.repositoryformatversion", 42));
-
- git_config_free(config);
+ cl_repo_set_string(g_repo, "core.repositoryformatversion", "42");
git_repository_free(g_repo);
g_repo = NULL;
- /* Try to reinitialize the repository */
+ /* Try and fail to reinitialize the repository */
cl_git_fail(git_repository_init(&g_repo, "reinit.git", 1));
-
cl_fixture_cleanup("reinit.git");
}
@@ -708,7 +727,7 @@ void test_repo_init__defaultbranch_config_empty(void)
void test_repo_init__longpath(void)
{
#ifdef GIT_WIN32
- size_t padding = CONST_STRLEN("objects/pack/pack-.pack.lock") + GIT_OID_SHA1_HEXSIZE;
+ size_t padding = CONST_STRLEN("objects/pack/pack-.pack.lock") + GIT_OID_MAX_HEXSIZE;
size_t max, i;
git_str path = GIT_STR_INIT;
git_repository *one = NULL, *two = NULL;
diff --git a/tests/libgit2/repo/objectformat.c b/tests/libgit2/repo/objectformat.c
new file mode 100644
index 000000000..d278e10c4
--- /dev/null
+++ b/tests/libgit2/repo/objectformat.c
@@ -0,0 +1,69 @@
+#include "clar_libgit2.h"
+#include "futils.h"
+#include "sysdir.h"
+#include "repository.h"
+#include <ctype.h>
+
+static git_repository *repo;
+static git_config *config;
+
+void test_repo_objectformat__initialize(void)
+{
+ repo = cl_git_sandbox_init("empty_bare.git");
+
+ cl_git_pass(git_repository_config(&config, repo));
+ cl_git_pass(git_config_set_int32(config, "core.repositoryformatversion", 1));
+}
+
+void test_repo_objectformat__cleanup(void)
+{
+ git_config_free(config);
+ cl_git_sandbox_cleanup();
+}
+
+void test_repo_objectformat__unspecified(void)
+{
+ git_repository *other;
+
+ cl_git_pass(git_repository_open(&other, "empty_bare.git"));
+ cl_assert_equal_i(GIT_OID_SHA1, git_repository_oid_type(other));
+ git_repository_free(other);
+}
+
+void test_repo_objectformat__sha1(void)
+{
+ git_repository *other;
+
+ cl_git_pass(git_config_set_string(config, "extensions.objectformat", "sha1"));
+
+ cl_git_pass(git_repository_open(&other, "empty_bare.git"));
+ cl_assert_equal_i(GIT_OID_SHA1, git_repository_oid_type(other));
+ git_repository_free(other);
+}
+
+void test_repo_objectformat__sha256(void)
+{
+#ifndef GIT_EXPERIMENTAL_SHA256
+ cl_skip();
+#else
+ git_repository *other;
+
+ cl_git_pass(git_config_set_string(config, "extensions.objectformat", "sha256"));
+
+ cl_git_pass(git_repository_open(&other, "empty_bare.git"));
+ cl_assert_equal_i(GIT_OID_SHA256, git_repository_oid_type(other));
+ git_repository_free(other);
+#endif
+}
+
+void test_repo_objectformat__invalid(void)
+{
+ git_repository *other;
+
+ cl_git_pass(git_config_set_string(config, "extensions.objectformat", "bogus"));
+
+ cl_git_fail_with(GIT_EINVALID, git_repository_open(&other, "empty_bare.git"));
+ cl_assert_equal_s("unknown object format 'bogus'", git_error_last()->message);
+ git_repository_free(other);
+}
+
diff --git a/tests/libgit2/repo/open.c b/tests/libgit2/repo/open.c
index 634ba59d2..3d1a0620b 100644
--- a/tests/libgit2/repo/open.c
+++ b/tests/libgit2/repo/open.c
@@ -410,6 +410,7 @@ void test_repo_open__no_config(void)
git_str_dispose(&path);
cl_git_pass(git_repository_open(&repo, "empty_standard_repo"));
+ cl_assert(git_repository_oid_type(repo) == GIT_OID_SHA1);
cl_git_pass(git_repository_config(&config, repo));
cl_git_pass(git_config_set_string(config, "test.set", "42"));
@@ -433,11 +434,13 @@ void test_repo_open__force_bare(void)
cl_git_pass(git_repository_open(&barerepo, "alternate"));
cl_assert(!git_repository_is_bare(barerepo));
+ cl_assert(git_repository_oid_type(barerepo) == GIT_OID_SHA1);
git_repository_free(barerepo);
cl_git_pass(git_repository_open_bare(
&barerepo, "empty_standard_repo/.git"));
cl_assert(git_repository_is_bare(barerepo));
+ cl_assert(git_repository_oid_type(barerepo) == GIT_OID_SHA1);
git_repository_free(barerepo);
cl_git_fail(git_repository_open_bare(&barerepo, "alternate/.git"));
@@ -487,7 +490,7 @@ void test_repo_open__validates_dir_ownership(void)
/* When the system user owns the repo config, fail */
git_fs_path__set_owner(GIT_FS_PATH_OWNER_ADMINISTRATOR);
- cl_git_fail(git_repository_open(&repo, "empty_standard_repo"));
+ cl_git_fail_with(GIT_EOWNER, git_repository_open(&repo, "empty_standard_repo"));
#ifdef GIT_WIN32
/* When the user is an administrator, succeed on Windows. */
@@ -498,7 +501,7 @@ void test_repo_open__validates_dir_ownership(void)
/* When an unknown user owns the repo config, fail */
git_fs_path__set_owner(GIT_FS_PATH_OWNER_OTHER);
- cl_git_fail(git_repository_open(&repo, "empty_standard_repo"));
+ cl_git_fail_with(GIT_EOWNER, git_repository_open(&repo, "empty_standard_repo"));
}
void test_repo_open__validates_bare_repo_ownership(void)
@@ -516,7 +519,7 @@ void test_repo_open__validates_bare_repo_ownership(void)
/* When the system user owns the repo config, fail */
git_fs_path__set_owner(GIT_FS_PATH_OWNER_ADMINISTRATOR);
- cl_git_fail(git_repository_open(&repo, "testrepo.git"));
+ cl_git_fail_with(GIT_EOWNER, git_repository_open(&repo, "testrepo.git"));
#ifdef GIT_WIN32
/* When the user is an administrator, succeed on Windows. */
@@ -527,7 +530,7 @@ void test_repo_open__validates_bare_repo_ownership(void)
/* When an unknown user owns the repo config, fail */
git_fs_path__set_owner(GIT_FS_PATH_OWNER_OTHER);
- cl_git_fail(git_repository_open(&repo, "testrepo.git"));
+ cl_git_fail_with(GIT_EOWNER, git_repository_open(&repo, "testrepo.git"));
}
void test_repo_open__can_allowlist_dirs_with_problematic_ownership(void)
@@ -543,7 +546,7 @@ void test_repo_open__can_allowlist_dirs_with_problematic_ownership(void)
cl_git_pass(cl_rename("empty_standard_repo/.gitted", "empty_standard_repo/.git"));
git_fs_path__set_owner(GIT_FS_PATH_OWNER_OTHER);
- cl_git_fail(git_repository_open(&repo, "empty_standard_repo"));
+ cl_git_fail_with(GIT_EOWNER, git_repository_open(&repo, "empty_standard_repo"));
/* Add safe.directory options to the global configuration */
git_str_joinpath(&config_path, clar_sandbox_path(), "__global_config");
@@ -575,6 +578,45 @@ void test_repo_open__can_allowlist_dirs_with_problematic_ownership(void)
git_str_dispose(&config_data);
}
+void test_repo_open__can_wildcard_allowlist_with_problematic_ownership(void)
+{
+ git_repository *repo;
+ git_str config_path = GIT_STR_INIT, config_filename = GIT_STR_INIT;
+
+ cl_git_pass(git_libgit2_opts(GIT_OPT_SET_OWNER_VALIDATION, 1));
+
+ cl_fixture_sandbox("empty_standard_repo");
+ cl_git_pass(cl_rename(
+ "empty_standard_repo/.gitted", "empty_standard_repo/.git"));
+
+ git_fs_path__set_owner(GIT_FS_PATH_OWNER_OTHER);
+ cl_git_fail_with(
+ GIT_EOWNER, git_repository_open(&repo, "empty_standard_repo"));
+
+ /* Add safe.directory options to the global configuration */
+ git_str_joinpath(&config_path, clar_sandbox_path(), "__global_config");
+ cl_must_pass(p_mkdir(config_path.ptr, 0777));
+ git_libgit2_opts(
+ GIT_OPT_SET_SEARCH_PATH, GIT_CONFIG_LEVEL_GLOBAL,
+ config_path.ptr);
+
+ git_str_joinpath(&config_filename, config_path.ptr, ".gitconfig");
+
+ cl_git_rewritefile(config_filename.ptr, "[foo]\n"
+ "\tbar = Foobar\n"
+ "\tbaz = Baz!\n"
+ "[safe]\n"
+ "\tdirectory = *\n"
+ "[bar]\n"
+ "\tfoo = barfoo\n");
+
+ cl_git_pass(git_repository_open(&repo, "empty_standard_repo"));
+ git_repository_free(repo);
+
+ git_str_dispose(&config_path);
+ git_str_dispose(&config_filename);
+}
+
void test_repo_open__can_allowlist_bare_gitdir(void)
{
git_repository *repo;
@@ -587,7 +629,7 @@ void test_repo_open__can_allowlist_bare_gitdir(void)
cl_fixture_sandbox("testrepo.git");
git_fs_path__set_owner(GIT_FS_PATH_OWNER_OTHER);
- cl_git_fail(git_repository_open(&repo, "testrepo.git"));
+ cl_git_fail_with(GIT_EOWNER, git_repository_open(&repo, "testrepo.git"));
/* Add safe.directory options to the global configuration */
git_str_joinpath(&config_path, clar_sandbox_path(), "__global_config");
@@ -619,6 +661,43 @@ void test_repo_open__can_allowlist_bare_gitdir(void)
git_str_dispose(&config_data);
}
+void test_repo_open__can_wildcard_allowlist_bare_gitdir(void)
+{
+ git_repository *repo;
+ git_str config_path = GIT_STR_INIT, config_filename = GIT_STR_INIT;
+
+ cl_git_pass(git_libgit2_opts(GIT_OPT_SET_OWNER_VALIDATION, 1));
+
+ cl_fixture_sandbox("testrepo.git");
+
+ git_fs_path__set_owner(GIT_FS_PATH_OWNER_OTHER);
+ cl_git_fail_with(
+ GIT_EOWNER, git_repository_open(&repo, "testrepo.git"));
+
+ /* Add safe.directory options to the global configuration */
+ git_str_joinpath(&config_path, clar_sandbox_path(), "__global_config");
+ cl_must_pass(p_mkdir(config_path.ptr, 0777));
+ git_libgit2_opts(
+ GIT_OPT_SET_SEARCH_PATH, GIT_CONFIG_LEVEL_GLOBAL,
+ config_path.ptr);
+
+ git_str_joinpath(&config_filename, config_path.ptr, ".gitconfig");
+
+ cl_git_rewritefile(config_filename.ptr, "[foo]\n"
+ "\tbar = Foobar\n"
+ "\tbaz = Baz!\n"
+ "[safe]\n"
+ "\tdirectory = *\n"
+ "[bar]\n"
+ "\tfoo = barfoo\n");
+
+ cl_git_pass(git_repository_open(&repo, "testrepo.git"));
+ git_repository_free(repo);
+
+ git_str_dispose(&config_path);
+ git_str_dispose(&config_filename);
+}
+
void test_repo_open__can_reset_safe_directory_list(void)
{
git_repository *repo;
@@ -632,7 +711,7 @@ void test_repo_open__can_reset_safe_directory_list(void)
cl_git_pass(cl_rename("empty_standard_repo/.gitted", "empty_standard_repo/.git"));
git_fs_path__set_owner(GIT_FS_PATH_OWNER_OTHER);
- cl_git_fail(git_repository_open(&repo, "empty_standard_repo"));
+ cl_git_fail_with(GIT_EOWNER, git_repository_open(&repo, "empty_standard_repo"));
/* Add safe.directory options to the global configuration */
git_str_joinpath(&config_path, clar_sandbox_path(), "__global_config");
@@ -656,7 +735,7 @@ void test_repo_open__can_reset_safe_directory_list(void)
clar_sandbox_path(), "empty_standard_repo");
cl_git_rewritefile(config_filename.ptr, config_data.ptr);
- cl_git_fail(git_repository_open(&repo, "empty_standard_repo"));
+ cl_git_fail_with(GIT_EOWNER, git_repository_open(&repo, "empty_standard_repo"));
/* The blank resets tmp and allows subsequent declarations to succeed */
diff --git a/tests/libgit2/revwalk/basic.c b/tests/libgit2/revwalk/basic.c
index 62a57aaa3..41090a1da 100644
--- a/tests/libgit2/revwalk/basic.c
+++ b/tests/libgit2/revwalk/basic.c
@@ -180,6 +180,23 @@ void test_revwalk_basic__glob_heads_with_invalid(void)
cl_assert_equal_i(20, i);
}
+void test_revwalk_basic__glob_invalid_symbolic_ref(void)
+{
+ int i;
+ git_oid oid;
+
+ revwalk_basic_setup_walk("testrepo");
+
+ cl_git_mkfile("testrepo/.git/refs/heads/broken-sym-ref", "ref: refs/heads/does-not-exist");
+ cl_git_pass(git_revwalk_push_glob(_walk, "heads"));
+
+ for (i = 0; !git_revwalk_next(&oid, _walk); ++i)
+ /* walking */;
+
+ /* git log --branches --oneline | wc -l => 16 */
+ cl_assert_equal_i(20, i);
+}
+
void test_revwalk_basic__push_head(void)
{
int i = 0;
diff --git a/tests/libgit2/stash/save.c b/tests/libgit2/stash/save.c
index f574211d7..23f3c1cbb 100644
--- a/tests/libgit2/stash/save.c
+++ b/tests/libgit2/stash/save.c
@@ -130,6 +130,19 @@ void test_stash_save__can_keep_index(void)
assert_status(repo, "just.ignore", GIT_STATUS_IGNORED);
}
+void test_stash_save__can_keep_all(void)
+{
+ cl_git_pass(git_stash_save(&stash_tip_oid, repo, signature, NULL, GIT_STASH_KEEP_ALL));
+
+ assert_status(repo, "what", GIT_STATUS_WT_MODIFIED | GIT_STATUS_INDEX_MODIFIED);
+ assert_status(repo, "how", GIT_STATUS_INDEX_MODIFIED);
+ assert_status(repo, "who", GIT_STATUS_WT_MODIFIED);
+ assert_status(repo, "when", GIT_STATUS_WT_NEW);
+ assert_status(repo, "why", GIT_STATUS_INDEX_NEW);
+ assert_status(repo, "where", GIT_STATUS_WT_MODIFIED | GIT_STATUS_INDEX_NEW);
+ assert_status(repo, "just.ignore", GIT_STATUS_IGNORED);
+}
+
static void assert_commit_message_contains(const char *revision, const char *fragment)
{
git_commit *commit;
@@ -488,3 +501,27 @@ void test_stash_save__deleted_in_index_modified_in_workdir(void)
git_index_free(index);
}
+
+void test_stash_save__option_paths(void)
+{
+ git_stash_save_options options = GIT_STASH_SAVE_OPTIONS_INIT;
+ char *paths[2] = { "who", "where" };
+
+ options.paths = (git_strarray){
+ paths,
+ 2
+ };
+ options.stasher = signature;
+
+ cl_git_pass(git_stash_save_with_opts(&stash_tip_oid, repo, &options));
+
+ assert_blob_oid("refs/stash:who", "a0400d4954659306a976567af43125a0b1aa8595");
+ assert_blob_oid("refs/stash:where", "e3d6434ec12eb76af8dfa843a64ba6ab91014a0b");
+
+ assert_blob_oid("refs/stash:what", "ce013625030ba8dba906f756967f9e9ca394464a");
+ assert_blob_oid("refs/stash:how", "ac790413e2d7a26c3767e78c57bb28716686eebc");
+ assert_blob_oid("refs/stash:when", NULL);
+ assert_blob_oid("refs/stash:why", NULL);
+ assert_blob_oid("refs/stash:.gitignore", "ac4d88de61733173d9959e4b77c69b9f17a00980");
+ assert_blob_oid("refs/stash:just.ignore", NULL);
+}
diff --git a/tests/libgit2/submodule/update.c b/tests/libgit2/submodule/update.c
index 4aa959852..052a4a1fe 100644
--- a/tests/libgit2/submodule/update.c
+++ b/tests/libgit2/submodule/update.c
@@ -206,6 +206,26 @@ void test_submodule_update__update_and_init_submodule(void)
git_submodule_free(sm);
}
+void test_submodule_update__update_skip_configured_missing_submodule(void)
+{
+ git_submodule *sm;
+ git_submodule_update_options update_options = GIT_SUBMODULE_UPDATE_OPTIONS_INIT;
+ unsigned int submodule_status = 0;
+
+ g_repo = setup_fixture_submod2();
+
+ /* get the submodule */
+ cl_git_pass(git_submodule_lookup(&sm, g_repo, "sm_gitmodules_only"));
+
+ cl_git_pass(git_submodule_status(&submodule_status, g_repo, "sm_gitmodules_only", GIT_SUBMODULE_IGNORE_UNSPECIFIED));
+ cl_assert_equal_i(submodule_status, GIT_SUBMODULE_STATUS_IN_CONFIG);
+
+ /* update (with option to initialize sub repo) */
+ cl_git_pass(git_submodule_update(sm, 1, &update_options));
+
+ git_submodule_free(sm);
+}
+
void test_submodule_update__update_already_checked_out_submodule(void)
{
git_submodule *sm = NULL;
diff --git a/tests/libgit2/transports/smart/packet.c b/tests/libgit2/transports/smart/packet.c
index 8801ef833..2035e3b65 100644
--- a/tests/libgit2/transports/smart/packet.c
+++ b/tests/libgit2/transports/smart/packet.c
@@ -11,8 +11,9 @@ static void assert_flush_parses(const char *line)
size_t linelen = strlen(line) + 1;
const char *endptr;
git_pkt *pkt;
+ git_pkt_parse_data pkt_parse_data = { 0 };
- cl_git_pass(git_pkt_parse_line((git_pkt **) &pkt, &endptr, line, linelen));
+ cl_git_pass(git_pkt_parse_line((git_pkt **) &pkt, &endptr, line, linelen, &pkt_parse_data));
cl_assert_equal_i(pkt->type, GIT_PKT_FLUSH);
cl_assert_equal_strn(endptr, line + 4, linelen - 4);
@@ -24,8 +25,9 @@ static void assert_data_pkt_parses(const char *line, const char *expected_data,
size_t linelen = strlen(line) + 1;
const char *endptr;
git_pkt_data *pkt;
+ git_pkt_parse_data pkt_parse_data = { 0 };
- cl_git_pass(git_pkt_parse_line((git_pkt **) &pkt, &endptr, line, linelen));
+ cl_git_pass(git_pkt_parse_line((git_pkt **) &pkt, &endptr, line, linelen, &pkt_parse_data));
cl_assert_equal_i(pkt->type, GIT_PKT_DATA);
cl_assert_equal_i(pkt->len, expected_len);
cl_assert_equal_strn(pkt->data, expected_data, expected_len);
@@ -38,8 +40,9 @@ static void assert_sideband_progress_parses(const char *line, const char *expect
size_t linelen = strlen(line) + 1;
const char *endptr;
git_pkt_progress *pkt;
+ git_pkt_parse_data pkt_parse_data = { 0 };
- cl_git_pass(git_pkt_parse_line((git_pkt **) &pkt, &endptr, line, linelen));
+ cl_git_pass(git_pkt_parse_line((git_pkt **) &pkt, &endptr, line, linelen, &pkt_parse_data));
cl_assert_equal_i(pkt->type, GIT_PKT_PROGRESS);
cl_assert_equal_i(pkt->len, expected_len);
cl_assert_equal_strn(pkt->data, expected_data, expected_len);
@@ -52,8 +55,9 @@ static void assert_error_parses(const char *line, const char *expected_error, si
size_t linelen = strlen(line) + 1;
const char *endptr;
git_pkt_err *pkt;
+ git_pkt_parse_data pkt_parse_data = { 0 };
- cl_git_pass(git_pkt_parse_line((git_pkt **) &pkt, &endptr, line, linelen));
+ cl_git_pass(git_pkt_parse_line((git_pkt **) &pkt, &endptr, line, linelen, &pkt_parse_data));
cl_assert_equal_i(pkt->type, GIT_PKT_ERR);
cl_assert_equal_i(pkt->len, expected_len);
cl_assert_equal_strn(pkt->error, expected_error, expected_len);
@@ -67,10 +71,11 @@ static void assert_ack_parses(const char *line, const char *expected_oid, enum g
const char *endptr;
git_pkt_ack *pkt;
git_oid oid;
+ git_pkt_parse_data pkt_parse_data = { 0 };
cl_git_pass(git_oid__fromstr(&oid, expected_oid, GIT_OID_SHA1));
- cl_git_pass(git_pkt_parse_line((git_pkt **) &pkt, &endptr, line, linelen));
+ cl_git_pass(git_pkt_parse_line((git_pkt **) &pkt, &endptr, line, linelen, &pkt_parse_data));
cl_assert_equal_i(pkt->type, GIT_PKT_ACK);
cl_assert_equal_oid(&pkt->oid, &oid);
cl_assert_equal_i(pkt->status, expected_status);
@@ -83,8 +88,9 @@ static void assert_nak_parses(const char *line)
size_t linelen = strlen(line) + 1;
const char *endptr;
git_pkt *pkt;
+ git_pkt_parse_data pkt_parse_data = { 0 };
- cl_git_pass(git_pkt_parse_line((git_pkt **) &pkt, &endptr, line, linelen));
+ cl_git_pass(git_pkt_parse_line((git_pkt **) &pkt, &endptr, line, linelen, &pkt_parse_data));
cl_assert_equal_i(pkt->type, GIT_PKT_NAK);
cl_assert_equal_strn(endptr, line + 7, linelen - 7);
@@ -96,8 +102,9 @@ static void assert_comment_parses(const char *line, const char *expected_comment
size_t linelen = strlen(line) + 1;
const char *endptr;
git_pkt_comment *pkt;
+ git_pkt_parse_data pkt_parse_data = { 0 };
- cl_git_pass(git_pkt_parse_line((git_pkt **) &pkt, &endptr, line, linelen));
+ cl_git_pass(git_pkt_parse_line((git_pkt **) &pkt, &endptr, line, linelen, &pkt_parse_data));
cl_assert_equal_i(pkt->type, GIT_PKT_COMMENT);
cl_assert_equal_strn(pkt->comment, expected_comment, strlen(expected_comment));
@@ -109,8 +116,9 @@ static void assert_ok_parses(const char *line, const char *expected_ref)
size_t linelen = strlen(line) + 1;
const char *endptr;
git_pkt_ok *pkt;
+ git_pkt_parse_data pkt_parse_data = { 0 };
- cl_git_pass(git_pkt_parse_line((git_pkt **) &pkt, &endptr, line, linelen));
+ cl_git_pass(git_pkt_parse_line((git_pkt **) &pkt, &endptr, line, linelen, &pkt_parse_data));
cl_assert_equal_i(pkt->type, GIT_PKT_OK);
cl_assert_equal_strn(pkt->ref, expected_ref, strlen(expected_ref));
@@ -122,8 +130,9 @@ static void assert_unpack_parses(const char *line, bool ok)
size_t linelen = strlen(line) + 1;
const char *endptr;
git_pkt_unpack *pkt;
+ git_pkt_parse_data pkt_parse_data = { 0 };
- cl_git_pass(git_pkt_parse_line((git_pkt **) &pkt, &endptr, line, linelen));
+ cl_git_pass(git_pkt_parse_line((git_pkt **) &pkt, &endptr, line, linelen, &pkt_parse_data));
cl_assert_equal_i(pkt->type, GIT_PKT_UNPACK);
cl_assert_equal_i(pkt->unpack_ok, ok);
@@ -135,8 +144,9 @@ static void assert_ng_parses(const char *line, const char *expected_ref, const c
size_t linelen = strlen(line) + 1;
const char *endptr;
git_pkt_ng *pkt;
+ git_pkt_parse_data pkt_parse_data = { 0 };
- cl_git_pass(git_pkt_parse_line((git_pkt **) &pkt, &endptr, line, linelen));
+ cl_git_pass(git_pkt_parse_line((git_pkt **) &pkt, &endptr, line, linelen, &pkt_parse_data));
cl_assert_equal_i(pkt->type, GIT_PKT_NG);
cl_assert_equal_strn(pkt->ref, expected_ref, strlen(expected_ref));
cl_assert_equal_strn(pkt->msg, expected_msg, strlen(expected_msg));
@@ -153,10 +163,11 @@ static void assert_ref_parses_(const char *line, size_t linelen, const char *exp
const char *endptr;
git_pkt_ref *pkt;
git_oid oid;
+ git_pkt_parse_data pkt_parse_data = { 0 };
cl_git_pass(git_oid__fromstr(&oid, expected_oid, GIT_OID_SHA1));
- cl_git_pass(git_pkt_parse_line((git_pkt **) &pkt, &endptr, line, linelen));
+ cl_git_pass(git_pkt_parse_line((git_pkt **) &pkt, &endptr, line, linelen, &pkt_parse_data));
cl_assert_equal_i(pkt->type, GIT_PKT_REF);
cl_assert_equal_oid(&pkt->head.oid, &oid);
cl_assert_equal_strn(pkt->head.name, expected_ref, strlen(expected_ref));
@@ -171,8 +182,10 @@ static void assert_ref_parses_(const char *line, size_t linelen, const char *exp
static void assert_pkt_fails(const char *line)
{
const char *endptr;
+ git_pkt_parse_data pkt_parse_data = { 0 };
+
git_pkt *pkt;
- cl_git_fail(git_pkt_parse_line(&pkt, &endptr, line, strlen(line) + 1));
+ cl_git_fail(git_pkt_parse_line(&pkt, &endptr, line, strlen(line) + 1, &pkt_parse_data));
}
void test_transports_smart_packet__parsing_garbage_fails(void)
diff --git a/tests/libgit2/win32/systemdir.c b/tests/libgit2/win32/systemdir.c
index 52c1784a1..9039f05b2 100644
--- a/tests/libgit2/win32/systemdir.c
+++ b/tests/libgit2/win32/systemdir.c
@@ -1,7 +1,6 @@
#include "clar_libgit2.h"
#include "futils.h"
#include "sysdir.h"
-#include "win32/findfile.h"
#ifdef GIT_WIN32
static char *path_save;
diff --git a/tests/libgit2/worktree/worktree.c b/tests/libgit2/worktree/worktree.c
index 66273d1cb..9fd27f49c 100644
--- a/tests/libgit2/worktree/worktree.c
+++ b/tests/libgit2/worktree/worktree.c
@@ -120,7 +120,7 @@ void test_worktree_worktree__lookup_nonexistent_worktree(void)
{
git_worktree *wt;
- cl_git_fail(git_worktree_lookup(&wt, fixture.repo, "nonexistent"));
+ cl_git_fail_with(GIT_ENOTFOUND, git_worktree_lookup(&wt, fixture.repo, "nonexistent"));
cl_assert_equal_p(wt, NULL);
}
diff --git a/tests/resources/namespace.git/COMMIT_EDITMSG b/tests/resources/namespace.git/COMMIT_EDITMSG
new file mode 100644
index 000000000..851066514
--- /dev/null
+++ b/tests/resources/namespace.git/COMMIT_EDITMSG
@@ -0,0 +1 @@
+four
diff --git a/tests/resources/namespace.git/HEAD b/tests/resources/namespace.git/HEAD
new file mode 100644
index 000000000..60cbd742c
--- /dev/null
+++ b/tests/resources/namespace.git/HEAD
@@ -0,0 +1 @@
+ref: refs/heads/four
diff --git a/tests/resources/namespace.git/config b/tests/resources/namespace.git/config
new file mode 100644
index 000000000..6c9406b7d
--- /dev/null
+++ b/tests/resources/namespace.git/config
@@ -0,0 +1,7 @@
+[core]
+ repositoryformatversion = 0
+ filemode = true
+ bare = false
+ logallrefupdates = true
+ ignorecase = true
+ precomposeunicode = true
diff --git a/tests/resources/namespace.git/description b/tests/resources/namespace.git/description
new file mode 100644
index 000000000..498b267a8
--- /dev/null
+++ b/tests/resources/namespace.git/description
@@ -0,0 +1 @@
+Unnamed repository; edit this file 'description' to name the repository.
diff --git a/tests/resources/namespace.git/index b/tests/resources/namespace.git/index
new file mode 100644
index 000000000..5ed27feb0
--- /dev/null
+++ b/tests/resources/namespace.git/index
Binary files differ
diff --git a/tests/resources/namespace.git/info/exclude b/tests/resources/namespace.git/info/exclude
new file mode 100644
index 000000000..a5196d1be
--- /dev/null
+++ b/tests/resources/namespace.git/info/exclude
@@ -0,0 +1,6 @@
+# git ls-files --others --exclude-from=.git/info/exclude
+# Lines that start with '#' are comments.
+# For a project mostly in C, the following would be a good set of
+# exclude patterns (uncomment them if you want to use them):
+# *.[oa]
+# *~
diff --git a/tests/resources/namespace.git/logs/HEAD b/tests/resources/namespace.git/logs/HEAD
new file mode 100644
index 000000000..ca0497615
--- /dev/null
+++ b/tests/resources/namespace.git/logs/HEAD
@@ -0,0 +1,9 @@
+0000000000000000000000000000000000000000 9ebfa6bdc9d38075d29d26aa5df89b1cf635b269 Edward Thomson <ethomson@edwardthomson.com> 1661110058 -0400 commit (initial): Hello, world.
+9ebfa6bdc9d38075d29d26aa5df89b1cf635b269 7eeaa70d7c5592db920a2e107ce3918bd4c8a425 Edward Thomson <ethomson@edwardthomson.com> 1661110068 -0400 commit: with enthusiasm
+7eeaa70d7c5592db920a2e107ce3918bd4c8a425 7eeaa70d7c5592db920a2e107ce3918bd4c8a425 Edward Thomson <ethomson@edwardthomson.com> 1661110072 -0400 checkout: moving from main to branch
+7eeaa70d7c5592db920a2e107ce3918bd4c8a425 3d669d1b33ec8add4609d8043d025527db4989eb Edward Thomson <ethomson@edwardthomson.com> 1661110088 -0400 commit: capitalize
+3d669d1b33ec8add4609d8043d025527db4989eb bfd17f429f4e2d121769213171ad57ca2e5173f9 Edward Thomson <ethomson@edwardthomson.com> 1661110104 -0400 commit: less enthusiastic
+bfd17f429f4e2d121769213171ad57ca2e5173f9 7eeaa70d7c5592db920a2e107ce3918bd4c8a425 Edward Thomson <ethomson@edwardthomson.com> 1661110107 -0400 checkout: moving from branch to main
+0000000000000000000000000000000000000000 420d51ce75a87909e29659da2072ffd3d5daf5b7 Edward Thomson <ethomson@edwardthomson.com> 1661110166 -0400 commit (initial): 1 2 3
+420d51ce75a87909e29659da2072ffd3d5daf5b7 420d51ce75a87909e29659da2072ffd3d5daf5b7 Edward Thomson <ethomson@edwardthomson.com> 1661110209 -0400 checkout: moving from one to four
+420d51ce75a87909e29659da2072ffd3d5daf5b7 04433ff5b52d6ad534fd6288de4a57b81cc12188 Edward Thomson <ethomson@edwardthomson.com> 1661110212 -0400 commit: four
diff --git a/tests/resources/namespace.git/logs/refs/heads/branch b/tests/resources/namespace.git/logs/refs/heads/branch
new file mode 100644
index 000000000..e3dfea400
--- /dev/null
+++ b/tests/resources/namespace.git/logs/refs/heads/branch
@@ -0,0 +1,3 @@
+0000000000000000000000000000000000000000 7eeaa70d7c5592db920a2e107ce3918bd4c8a425 Edward Thomson <ethomson@edwardthomson.com> 1661110072 -0400 branch: Created from HEAD
+7eeaa70d7c5592db920a2e107ce3918bd4c8a425 3d669d1b33ec8add4609d8043d025527db4989eb Edward Thomson <ethomson@edwardthomson.com> 1661110088 -0400 commit: capitalize
+3d669d1b33ec8add4609d8043d025527db4989eb bfd17f429f4e2d121769213171ad57ca2e5173f9 Edward Thomson <ethomson@edwardthomson.com> 1661110104 -0400 commit: less enthusiastic
diff --git a/tests/resources/namespace.git/logs/refs/heads/four b/tests/resources/namespace.git/logs/refs/heads/four
new file mode 100644
index 000000000..2abf339ac
--- /dev/null
+++ b/tests/resources/namespace.git/logs/refs/heads/four
@@ -0,0 +1,2 @@
+0000000000000000000000000000000000000000 420d51ce75a87909e29659da2072ffd3d5daf5b7 Edward Thomson <ethomson@edwardthomson.com> 1661110209 -0400 branch: Created from HEAD
+420d51ce75a87909e29659da2072ffd3d5daf5b7 04433ff5b52d6ad534fd6288de4a57b81cc12188 Edward Thomson <ethomson@edwardthomson.com> 1661110212 -0400 commit: four
diff --git a/tests/resources/namespace.git/logs/refs/heads/main b/tests/resources/namespace.git/logs/refs/heads/main
new file mode 100644
index 000000000..04de95a49
--- /dev/null
+++ b/tests/resources/namespace.git/logs/refs/heads/main
@@ -0,0 +1,2 @@
+0000000000000000000000000000000000000000 9ebfa6bdc9d38075d29d26aa5df89b1cf635b269 Edward Thomson <ethomson@edwardthomson.com> 1661110058 -0400 commit (initial): Hello, world.
+9ebfa6bdc9d38075d29d26aa5df89b1cf635b269 7eeaa70d7c5592db920a2e107ce3918bd4c8a425 Edward Thomson <ethomson@edwardthomson.com> 1661110068 -0400 commit: with enthusiasm
diff --git a/tests/resources/namespace.git/logs/refs/heads/one b/tests/resources/namespace.git/logs/refs/heads/one
new file mode 100644
index 000000000..bd3c5fa25
--- /dev/null
+++ b/tests/resources/namespace.git/logs/refs/heads/one
@@ -0,0 +1 @@
+0000000000000000000000000000000000000000 420d51ce75a87909e29659da2072ffd3d5daf5b7 Edward Thomson <ethomson@edwardthomson.com> 1661110166 -0400 commit (initial): 1 2 3
diff --git a/tests/resources/namespace.git/objects/04/433ff5b52d6ad534fd6288de4a57b81cc12188 b/tests/resources/namespace.git/objects/04/433ff5b52d6ad534fd6288de4a57b81cc12188
new file mode 100644
index 000000000..be49bee0e
--- /dev/null
+++ b/tests/resources/namespace.git/objects/04/433ff5b52d6ad534fd6288de4a57b81cc12188
Binary files differ
diff --git a/tests/resources/namespace.git/objects/0a/890bd10328d68f6d85efd2535e3a4c588ee8e6 b/tests/resources/namespace.git/objects/0a/890bd10328d68f6d85efd2535e3a4c588ee8e6
new file mode 100644
index 000000000..41f340b2a
--- /dev/null
+++ b/tests/resources/namespace.git/objects/0a/890bd10328d68f6d85efd2535e3a4c588ee8e6
Binary files differ
diff --git a/tests/resources/namespace.git/objects/10/fcb1c85bd6b3bc6f43e0a3932ff5859121a84e b/tests/resources/namespace.git/objects/10/fcb1c85bd6b3bc6f43e0a3932ff5859121a84e
new file mode 100644
index 000000000..3005ed15a
--- /dev/null
+++ b/tests/resources/namespace.git/objects/10/fcb1c85bd6b3bc6f43e0a3932ff5859121a84e
Binary files differ
diff --git a/tests/resources/namespace.git/objects/24/bbdca8b223aaa3384d78312f730c58492aa30a b/tests/resources/namespace.git/objects/24/bbdca8b223aaa3384d78312f730c58492aa30a
new file mode 100644
index 000000000..c1e97d5e3
--- /dev/null
+++ b/tests/resources/namespace.git/objects/24/bbdca8b223aaa3384d78312f730c58492aa30a
Binary files differ
diff --git a/tests/resources/namespace.git/objects/27/0c611ee72c567bc1b2abec4cbc345bab9f15ba b/tests/resources/namespace.git/objects/27/0c611ee72c567bc1b2abec4cbc345bab9f15ba
new file mode 100644
index 000000000..300fb6715
--- /dev/null
+++ b/tests/resources/namespace.git/objects/27/0c611ee72c567bc1b2abec4cbc345bab9f15ba
Binary files differ
diff --git a/tests/resources/namespace.git/objects/2b/df67abb163a4ffb2d7f3f0880c9fe5068ce782 b/tests/resources/namespace.git/objects/2b/df67abb163a4ffb2d7f3f0880c9fe5068ce782
new file mode 100644
index 000000000..d0398e6e3
--- /dev/null
+++ b/tests/resources/namespace.git/objects/2b/df67abb163a4ffb2d7f3f0880c9fe5068ce782
Binary files differ
diff --git a/tests/resources/namespace.git/objects/3d/669d1b33ec8add4609d8043d025527db4989eb b/tests/resources/namespace.git/objects/3d/669d1b33ec8add4609d8043d025527db4989eb
new file mode 100644
index 000000000..a926c9ea7
--- /dev/null
+++ b/tests/resources/namespace.git/objects/3d/669d1b33ec8add4609d8043d025527db4989eb
@@ -0,0 +1,2 @@
+x¥ŽQ
+Â0DýÎ)re“&ÝDüñ^`›ÝЂiJžÞ*ÞÀ¿™÷`˜TK™š¶ÎïÚ*¢%E‡Ò1#!zË€!aH™ÇÁš,ÙµÐ*sÓ(B„À˜¼–‡h¬À$]4a`—9ë=ÚXW}á'­¬¯c-÷:ë£lô“Îò¿vHµœ´é{c @z@mt;ÛäÏ•h™ݦ—¨7-)Q \ No newline at end of file
diff --git a/tests/resources/namespace.git/objects/42/0d51ce75a87909e29659da2072ffd3d5daf5b7 b/tests/resources/namespace.git/objects/42/0d51ce75a87909e29659da2072ffd3d5daf5b7
new file mode 100644
index 000000000..fb91b1b12
--- /dev/null
+++ b/tests/resources/namespace.git/objects/42/0d51ce75a87909e29659da2072ffd3d5daf5b7
Binary files differ
diff --git a/tests/resources/namespace.git/objects/56/26abf0f72e58d7a153368ba57db4c673c0e171 b/tests/resources/namespace.git/objects/56/26abf0f72e58d7a153368ba57db4c673c0e171
new file mode 100644
index 000000000..4d5447467
--- /dev/null
+++ b/tests/resources/namespace.git/objects/56/26abf0f72e58d7a153368ba57db4c673c0e171
Binary files differ
diff --git a/tests/resources/namespace.git/objects/56/300b5eae653453102ac1213e921973c066425b b/tests/resources/namespace.git/objects/56/300b5eae653453102ac1213e921973c066425b
new file mode 100644
index 000000000..59f5649d2
--- /dev/null
+++ b/tests/resources/namespace.git/objects/56/300b5eae653453102ac1213e921973c066425b
Binary files differ
diff --git a/tests/resources/namespace.git/objects/7e/eaa70d7c5592db920a2e107ce3918bd4c8a425 b/tests/resources/namespace.git/objects/7e/eaa70d7c5592db920a2e107ce3918bd4c8a425
new file mode 100644
index 000000000..55706bf88
--- /dev/null
+++ b/tests/resources/namespace.git/objects/7e/eaa70d7c5592db920a2e107ce3918bd4c8a425
@@ -0,0 +1,2 @@
+x¥Ž] „}æ{Ͳ
+‰1¾x/°ü4íÅPš^_4ÞÀ·™o2“ %ç¥i<µšÐà} l=‘bf¥ìG«$M£Â íà¨SdñâšÖ.ù‰M¯¸¨,Ž:’‹d˜uœ¬ó2LFiOÆ ÞÛ\*<âÁ5Âs.y++\S§uOßàç.¡äHc¤”ˆÆÂDÑi?ÛÒŸ3âXÚ ýý¼o oY¼wR§ \ No newline at end of file
diff --git a/tests/resources/namespace.git/objects/85/10665149157c2bc901848c3e0b746954e9cbd9 b/tests/resources/namespace.git/objects/85/10665149157c2bc901848c3e0b746954e9cbd9
new file mode 100644
index 000000000..2f2fef743
--- /dev/null
+++ b/tests/resources/namespace.git/objects/85/10665149157c2bc901848c3e0b746954e9cbd9
Binary files differ
diff --git a/tests/resources/namespace.git/objects/9e/bfa6bdc9d38075d29d26aa5df89b1cf635b269 b/tests/resources/namespace.git/objects/9e/bfa6bdc9d38075d29d26aa5df89b1cf635b269
new file mode 100644
index 000000000..33ec05881
--- /dev/null
+++ b/tests/resources/namespace.git/objects/9e/bfa6bdc9d38075d29d26aa5df89b1cf635b269
Binary files differ
diff --git a/tests/resources/namespace.git/objects/9e/f15e3c5c0c8c6913936f843ad967cbe5541f0d b/tests/resources/namespace.git/objects/9e/f15e3c5c0c8c6913936f843ad967cbe5541f0d
new file mode 100644
index 000000000..0759911e0
--- /dev/null
+++ b/tests/resources/namespace.git/objects/9e/f15e3c5c0c8c6913936f843ad967cbe5541f0d
Binary files differ
diff --git a/tests/resources/namespace.git/objects/af/5626b4a114abcb82d63db7c8082c3c4756e51b b/tests/resources/namespace.git/objects/af/5626b4a114abcb82d63db7c8082c3c4756e51b
new file mode 100644
index 000000000..822bc1518
--- /dev/null
+++ b/tests/resources/namespace.git/objects/af/5626b4a114abcb82d63db7c8082c3c4756e51b
Binary files differ
diff --git a/tests/resources/namespace.git/objects/af/81e4bd99cbfe6f05a501f1e4c82db2bf803e02 b/tests/resources/namespace.git/objects/af/81e4bd99cbfe6f05a501f1e4c82db2bf803e02
new file mode 100644
index 000000000..a5e8ecb33
--- /dev/null
+++ b/tests/resources/namespace.git/objects/af/81e4bd99cbfe6f05a501f1e4c82db2bf803e02
Binary files differ
diff --git a/tests/resources/namespace.git/objects/bf/d17f429f4e2d121769213171ad57ca2e5173f9 b/tests/resources/namespace.git/objects/bf/d17f429f4e2d121769213171ad57ca2e5173f9
new file mode 100644
index 000000000..ebd27b88e
--- /dev/null
+++ b/tests/resources/namespace.git/objects/bf/d17f429f4e2d121769213171ad57ca2e5173f9
@@ -0,0 +1,2 @@
+x¥Ž]
+Â0„}Î)öÊæ× ˆøâ ¼@šÝÒ‚5’¤x}«xßf¾áËeYæÆ›]¯"€‰"¬Ñâ@c`ò2²ñÖ‹M.{"’ ž©Ê£ƒå"ëÁZÉ”˜]ÀÈ„Î2ïÍ‘)Ê ÒÚ§RáʯTnSYZyÀI6úIù¿vÈe9ƒAkìÑ!ªn²]þ¼Qwi 6ûimsj}Îê £•RÌ \ No newline at end of file
diff --git a/tests/resources/namespace.git/objects/ec/947e3dd7a7752d078f1ed0cfde7457b21fef58 b/tests/resources/namespace.git/objects/ec/947e3dd7a7752d078f1ed0cfde7457b21fef58
new file mode 100644
index 000000000..a6e1d1d8e
--- /dev/null
+++ b/tests/resources/namespace.git/objects/ec/947e3dd7a7752d078f1ed0cfde7457b21fef58
Binary files differ
diff --git a/tests/resources/namespace.git/objects/f7/19efd430d52bcfc8566a43b2eb655688d38871 b/tests/resources/namespace.git/objects/f7/19efd430d52bcfc8566a43b2eb655688d38871
new file mode 100644
index 000000000..b2d51d93b
--- /dev/null
+++ b/tests/resources/namespace.git/objects/f7/19efd430d52bcfc8566a43b2eb655688d38871
Binary files differ
diff --git a/tests/resources/namespace.git/objects/f7/5ba05f340c51065cbea2e1fdbfe5fe13144c97 b/tests/resources/namespace.git/objects/f7/5ba05f340c51065cbea2e1fdbfe5fe13144c97
new file mode 100644
index 000000000..044001e9f
--- /dev/null
+++ b/tests/resources/namespace.git/objects/f7/5ba05f340c51065cbea2e1fdbfe5fe13144c97
Binary files differ
diff --git a/tests/resources/namespace.git/refs/heads/branch b/tests/resources/namespace.git/refs/heads/branch
new file mode 100644
index 000000000..69625465e
--- /dev/null
+++ b/tests/resources/namespace.git/refs/heads/branch
@@ -0,0 +1 @@
+bfd17f429f4e2d121769213171ad57ca2e5173f9
diff --git a/tests/resources/namespace.git/refs/heads/main b/tests/resources/namespace.git/refs/heads/main
new file mode 100644
index 000000000..b8697694e
--- /dev/null
+++ b/tests/resources/namespace.git/refs/heads/main
@@ -0,0 +1 @@
+7eeaa70d7c5592db920a2e107ce3918bd4c8a425
diff --git a/tests/resources/namespace.git/refs/namespaces/name1/refs/heads/four b/tests/resources/namespace.git/refs/namespaces/name1/refs/heads/four
new file mode 100644
index 000000000..86fdb418b
--- /dev/null
+++ b/tests/resources/namespace.git/refs/namespaces/name1/refs/heads/four
@@ -0,0 +1 @@
+04433ff5b52d6ad534fd6288de4a57b81cc12188
diff --git a/tests/resources/namespace.git/refs/namespaces/name1/refs/heads/one b/tests/resources/namespace.git/refs/namespaces/name1/refs/heads/one
new file mode 100644
index 000000000..22d81378d
--- /dev/null
+++ b/tests/resources/namespace.git/refs/namespaces/name1/refs/heads/one
@@ -0,0 +1 @@
+420d51ce75a87909e29659da2072ffd3d5daf5b7
diff --git a/tests/resources/packfile-sha256/pack-b4a043c0ec5e079e8ac67d823776d752efc71661592db317474a0cf292915f31.idx b/tests/resources/packfile-sha256/pack-b4a043c0ec5e079e8ac67d823776d752efc71661592db317474a0cf292915f31.idx
new file mode 100644
index 000000000..7aa472cea
--- /dev/null
+++ b/tests/resources/packfile-sha256/pack-b4a043c0ec5e079e8ac67d823776d752efc71661592db317474a0cf292915f31.idx
Binary files differ
diff --git a/tests/resources/packfile-sha256/pack-b4a043c0ec5e079e8ac67d823776d752efc71661592db317474a0cf292915f31.pack b/tests/resources/packfile-sha256/pack-b4a043c0ec5e079e8ac67d823776d752efc71661592db317474a0cf292915f31.pack
new file mode 100644
index 000000000..adbe70ad3
--- /dev/null
+++ b/tests/resources/packfile-sha256/pack-b4a043c0ec5e079e8ac67d823776d752efc71661592db317474a0cf292915f31.pack
Binary files differ
diff --git a/tests/resources/testrepo_256.git/FETCH_HEAD b/tests/resources/testrepo_256.git/FETCH_HEAD
new file mode 100644
index 000000000..4562d9026
--- /dev/null
+++ b/tests/resources/testrepo_256.git/FETCH_HEAD
@@ -0,0 +1,2 @@
+decaff3051968d1f3a2defd3d4a80ced03101555e1fd8913b3544026c0717d4f branch 'master' of git://example.com/git/testrepo.git
+7e9424c06052ca33bfc599bccadee60065d8664a9af7648a1455100c4f772e1c not-for-merge branch 'haacked' of git://example.com/git/testrepo.git
diff --git a/tests/resources/testrepo_256.git/HEAD b/tests/resources/testrepo_256.git/HEAD
new file mode 100644
index 000000000..cb089cd89
--- /dev/null
+++ b/tests/resources/testrepo_256.git/HEAD
@@ -0,0 +1 @@
+ref: refs/heads/master
diff --git a/tests/resources/testrepo_256.git/HEAD_TRACKER b/tests/resources/testrepo_256.git/HEAD_TRACKER
new file mode 100644
index 000000000..40d876b4c
--- /dev/null
+++ b/tests/resources/testrepo_256.git/HEAD_TRACKER
@@ -0,0 +1 @@
+ref: HEAD
diff --git a/tests/resources/testrepo_256.git/config b/tests/resources/testrepo_256.git/config
new file mode 100644
index 000000000..c1aac4a03
--- /dev/null
+++ b/tests/resources/testrepo_256.git/config
@@ -0,0 +1,8 @@
+[core]
+ repositoryFormatVersion = 1
+ filemode = true
+ bare = true
+ ignorecase = true
+ precomposeunicode = true
+[extensions]
+ objectFormat = sha256
diff --git a/tests/resources/testrepo_256.git/description b/tests/resources/testrepo_256.git/description
new file mode 100644
index 000000000..498b267a8
--- /dev/null
+++ b/tests/resources/testrepo_256.git/description
@@ -0,0 +1 @@
+Unnamed repository; edit this file 'description' to name the repository.
diff --git a/tests/resources/testrepo_256.git/hooks/applypatch-msg.sample b/tests/resources/testrepo_256.git/hooks/applypatch-msg.sample
new file mode 100755
index 000000000..a5d7b84a6
--- /dev/null
+++ b/tests/resources/testrepo_256.git/hooks/applypatch-msg.sample
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# An example hook script to check the commit log message taken by
+# applypatch from an e-mail message.
+#
+# The hook should exit with non-zero status after issuing an
+# appropriate message if it wants to stop the commit. The hook is
+# allowed to edit the commit message file.
+#
+# To enable this hook, rename this file to "applypatch-msg".
+
+. git-sh-setup
+commitmsg="$(git rev-parse --git-path hooks/commit-msg)"
+test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"}
+:
diff --git a/tests/resources/testrepo_256.git/hooks/commit-msg.sample b/tests/resources/testrepo_256.git/hooks/commit-msg.sample
new file mode 100755
index 000000000..b58d1184a
--- /dev/null
+++ b/tests/resources/testrepo_256.git/hooks/commit-msg.sample
@@ -0,0 +1,24 @@
+#!/bin/sh
+#
+# An example hook script to check the commit log message.
+# Called by "git commit" with one argument, the name of the file
+# that has the commit message. The hook should exit with non-zero
+# status after issuing an appropriate message if it wants to stop the
+# commit. The hook is allowed to edit the commit message file.
+#
+# To enable this hook, rename this file to "commit-msg".
+
+# Uncomment the below to add a Signed-off-by line to the message.
+# Doing this in a hook is a bad idea in general, but the prepare-commit-msg
+# hook is more suited to it.
+#
+# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
+# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
+
+# This example catches duplicate Signed-off-by lines.
+
+test "" = "$(grep '^Signed-off-by: ' "$1" |
+ sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {
+ echo >&2 Duplicate Signed-off-by lines.
+ exit 1
+}
diff --git a/tests/resources/testrepo_256.git/hooks/fsmonitor-watchman.sample b/tests/resources/testrepo_256.git/hooks/fsmonitor-watchman.sample
new file mode 100755
index 000000000..14ed0aa42
--- /dev/null
+++ b/tests/resources/testrepo_256.git/hooks/fsmonitor-watchman.sample
@@ -0,0 +1,173 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+use IPC::Open2;
+
+# An example hook script to integrate Watchman
+# (https://facebook.github.io/watchman/) with git to speed up detecting
+# new and modified files.
+#
+# The hook is passed a version (currently 2) and last update token
+# formatted as a string and outputs to stdout a new update token and
+# all files that have been modified since the update token. Paths must
+# be relative to the root of the working tree and separated by a single NUL.
+#
+# To enable this hook, rename this file to "query-watchman" and set
+# 'git config core.fsmonitor .git/hooks/query-watchman'
+#
+my ($version, $last_update_token) = @ARGV;
+
+# Uncomment for debugging
+# print STDERR "$0 $version $last_update_token\n";
+
+# Check the hook interface version
+if ($version ne 2) {
+ die "Unsupported query-fsmonitor hook version '$version'.\n" .
+ "Falling back to scanning...\n";
+}
+
+my $git_work_tree = get_working_dir();
+
+my $retry = 1;
+
+my $json_pkg;
+eval {
+ require JSON::XS;
+ $json_pkg = "JSON::XS";
+ 1;
+} or do {
+ require JSON::PP;
+ $json_pkg = "JSON::PP";
+};
+
+launch_watchman();
+
+sub launch_watchman {
+ my $o = watchman_query();
+ if (is_work_tree_watched($o)) {
+ output_result($o->{clock}, @{$o->{files}});
+ }
+}
+
+sub output_result {
+ my ($clockid, @files) = @_;
+
+ # Uncomment for debugging watchman output
+ # open (my $fh, ">", ".git/watchman-output.out");
+ # binmode $fh, ":utf8";
+ # print $fh "$clockid\n@files\n";
+ # close $fh;
+
+ binmode STDOUT, ":utf8";
+ print $clockid;
+ print "\0";
+ local $, = "\0";
+ print @files;
+}
+
+sub watchman_clock {
+ my $response = qx/watchman clock "$git_work_tree"/;
+ die "Failed to get clock id on '$git_work_tree'.\n" .
+ "Falling back to scanning...\n" if $? != 0;
+
+ return $json_pkg->new->utf8->decode($response);
+}
+
+sub watchman_query {
+ my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty')
+ or die "open2() failed: $!\n" .
+ "Falling back to scanning...\n";
+
+ # In the query expression below we're asking for names of files that
+ # changed since $last_update_token but not from the .git folder.
+ #
+ # To accomplish this, we're using the "since" generator to use the
+ # recency index to select candidate nodes and "fields" to limit the
+ # output to file names only. Then we're using the "expression" term to
+ # further constrain the results.
+ if (substr($last_update_token, 0, 1) eq "c") {
+ $last_update_token = "\"$last_update_token\"";
+ }
+ my $query = <<" END";
+ ["query", "$git_work_tree", {
+ "since": $last_update_token,
+ "fields": ["name"],
+ "expression": ["not", ["dirname", ".git"]]
+ }]
+ END
+
+ # Uncomment for debugging the watchman query
+ # open (my $fh, ">", ".git/watchman-query.json");
+ # print $fh $query;
+ # close $fh;
+
+ print CHLD_IN $query;
+ close CHLD_IN;
+ my $response = do {local $/; <CHLD_OUT>};
+
+ # Uncomment for debugging the watch response
+ # open ($fh, ">", ".git/watchman-response.json");
+ # print $fh $response;
+ # close $fh;
+
+ die "Watchman: command returned no output.\n" .
+ "Falling back to scanning...\n" if $response eq "";
+ die "Watchman: command returned invalid output: $response\n" .
+ "Falling back to scanning...\n" unless $response =~ /^\{/;
+
+ return $json_pkg->new->utf8->decode($response);
+}
+
+sub is_work_tree_watched {
+ my ($output) = @_;
+ my $error = $output->{error};
+ if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) {
+ $retry--;
+ my $response = qx/watchman watch "$git_work_tree"/;
+ die "Failed to make watchman watch '$git_work_tree'.\n" .
+ "Falling back to scanning...\n" if $? != 0;
+ $output = $json_pkg->new->utf8->decode($response);
+ $error = $output->{error};
+ die "Watchman: $error.\n" .
+ "Falling back to scanning...\n" if $error;
+
+ # Uncomment for debugging watchman output
+ # open (my $fh, ">", ".git/watchman-output.out");
+ # close $fh;
+
+ # Watchman will always return all files on the first query so
+ # return the fast "everything is dirty" flag to git and do the
+ # Watchman query just to get it over with now so we won't pay
+ # the cost in git to look up each individual file.
+ my $o = watchman_clock();
+ $error = $output->{error};
+
+ die "Watchman: $error.\n" .
+ "Falling back to scanning...\n" if $error;
+
+ output_result($o->{clock}, ("/"));
+ $last_update_token = $o->{clock};
+
+ eval { launch_watchman() };
+ return 0;
+ }
+
+ die "Watchman: $error.\n" .
+ "Falling back to scanning...\n" if $error;
+
+ return 1;
+}
+
+sub get_working_dir {
+ my $working_dir;
+ if ($^O =~ 'msys' || $^O =~ 'cygwin') {
+ $working_dir = Win32::GetCwd();
+ $working_dir =~ tr/\\/\//;
+ } else {
+ require Cwd;
+ $working_dir = Cwd::cwd();
+ }
+
+ return $working_dir;
+}
diff --git a/tests/resources/testrepo_256.git/hooks/post-update.sample b/tests/resources/testrepo_256.git/hooks/post-update.sample
new file mode 100755
index 000000000..ec17ec193
--- /dev/null
+++ b/tests/resources/testrepo_256.git/hooks/post-update.sample
@@ -0,0 +1,8 @@
+#!/bin/sh
+#
+# An example hook script to prepare a packed repository for use over
+# dumb transports.
+#
+# To enable this hook, rename this file to "post-update".
+
+exec git update-server-info
diff --git a/tests/resources/testrepo_256.git/hooks/pre-applypatch.sample b/tests/resources/testrepo_256.git/hooks/pre-applypatch.sample
new file mode 100755
index 000000000..4142082bc
--- /dev/null
+++ b/tests/resources/testrepo_256.git/hooks/pre-applypatch.sample
@@ -0,0 +1,14 @@
+#!/bin/sh
+#
+# An example hook script to verify what is about to be committed
+# by applypatch from an e-mail message.
+#
+# The hook should exit with non-zero status after issuing an
+# appropriate message if it wants to stop the commit.
+#
+# To enable this hook, rename this file to "pre-applypatch".
+
+. git-sh-setup
+precommit="$(git rev-parse --git-path hooks/pre-commit)"
+test -x "$precommit" && exec "$precommit" ${1+"$@"}
+:
diff --git a/tests/resources/testrepo_256.git/hooks/pre-commit.sample b/tests/resources/testrepo_256.git/hooks/pre-commit.sample
new file mode 100755
index 000000000..e144712c8
--- /dev/null
+++ b/tests/resources/testrepo_256.git/hooks/pre-commit.sample
@@ -0,0 +1,49 @@
+#!/bin/sh
+#
+# An example hook script to verify what is about to be committed.
+# Called by "git commit" with no arguments. The hook should
+# exit with non-zero status after issuing an appropriate message if
+# it wants to stop the commit.
+#
+# To enable this hook, rename this file to "pre-commit".
+
+if git rev-parse --verify HEAD >/dev/null 2>&1
+then
+ against=HEAD
+else
+ # Initial commit: diff against an empty tree object
+ against=$(git hash-object -t tree /dev/null)
+fi
+
+# If you want to allow non-ASCII filenames set this variable to true.
+allownonascii=$(git config --type=bool hooks.allownonascii)
+
+# Redirect output to stderr.
+exec 1>&2
+
+# Cross platform projects tend to avoid non-ASCII filenames; prevent
+# them from being added to the repository. We exploit the fact that the
+# printable range starts at the space character and ends with tilde.
+if [ "$allownonascii" != "true" ] &&
+ # Note that the use of brackets around a tr range is ok here, (it's
+ # even required, for portability to Solaris 10's /usr/bin/tr), since
+ # the square bracket bytes happen to fall in the designated range.
+ test $(git diff --cached --name-only --diff-filter=A -z $against |
+ LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
+then
+ cat <<\EOF
+Error: Attempt to add a non-ASCII file name.
+
+This can cause problems if you want to work with people on other platforms.
+
+To be portable it is advisable to rename the file.
+
+If you know what you are doing you can disable this check using:
+
+ git config hooks.allownonascii true
+EOF
+ exit 1
+fi
+
+# If there are whitespace errors, print the offending file names and fail.
+exec git diff-index --check --cached $against --
diff --git a/tests/resources/testrepo_256.git/hooks/pre-merge-commit.sample b/tests/resources/testrepo_256.git/hooks/pre-merge-commit.sample
new file mode 100755
index 000000000..399eab192
--- /dev/null
+++ b/tests/resources/testrepo_256.git/hooks/pre-merge-commit.sample
@@ -0,0 +1,13 @@
+#!/bin/sh
+#
+# An example hook script to verify what is about to be committed.
+# Called by "git merge" with no arguments. The hook should
+# exit with non-zero status after issuing an appropriate message to
+# stderr if it wants to stop the merge commit.
+#
+# To enable this hook, rename this file to "pre-merge-commit".
+
+. git-sh-setup
+test -x "$GIT_DIR/hooks/pre-commit" &&
+ exec "$GIT_DIR/hooks/pre-commit"
+:
diff --git a/tests/resources/testrepo_256.git/hooks/pre-push.sample b/tests/resources/testrepo_256.git/hooks/pre-push.sample
new file mode 100755
index 000000000..4ce688d32
--- /dev/null
+++ b/tests/resources/testrepo_256.git/hooks/pre-push.sample
@@ -0,0 +1,53 @@
+#!/bin/sh
+
+# An example hook script to verify what is about to be pushed. Called by "git
+# push" after it has checked the remote status, but before anything has been
+# pushed. If this script exits with a non-zero status nothing will be pushed.
+#
+# This hook is called with the following parameters:
+#
+# $1 -- Name of the remote to which the push is being done
+# $2 -- URL to which the push is being done
+#
+# If pushing without using a named remote those arguments will be equal.
+#
+# Information about the commits which are being pushed is supplied as lines to
+# the standard input in the form:
+#
+# <local ref> <local oid> <remote ref> <remote oid>
+#
+# This sample shows how to prevent push of commits where the log message starts
+# with "WIP" (work in progress).
+
+remote="$1"
+url="$2"
+
+zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0')
+
+while read local_ref local_oid remote_ref remote_oid
+do
+ if test "$local_oid" = "$zero"
+ then
+ # Handle delete
+ :
+ else
+ if test "$remote_oid" = "$zero"
+ then
+ # New branch, examine all commits
+ range="$local_oid"
+ else
+ # Update to existing branch, examine new commits
+ range="$remote_oid..$local_oid"
+ fi
+
+ # Check for WIP commit
+ commit=$(git rev-list -n 1 --grep '^WIP' "$range")
+ if test -n "$commit"
+ then
+ echo >&2 "Found WIP commit in $local_ref, not pushing"
+ exit 1
+ fi
+ fi
+done
+
+exit 0
diff --git a/tests/resources/testrepo_256.git/hooks/pre-rebase.sample b/tests/resources/testrepo_256.git/hooks/pre-rebase.sample
new file mode 100755
index 000000000..6cbef5c37
--- /dev/null
+++ b/tests/resources/testrepo_256.git/hooks/pre-rebase.sample
@@ -0,0 +1,169 @@
+#!/bin/sh
+#
+# Copyright (c) 2006, 2008 Junio C Hamano
+#
+# The "pre-rebase" hook is run just before "git rebase" starts doing
+# its job, and can prevent the command from running by exiting with
+# non-zero status.
+#
+# The hook is called with the following parameters:
+#
+# $1 -- the upstream the series was forked from.
+# $2 -- the branch being rebased (or empty when rebasing the current branch).
+#
+# This sample shows how to prevent topic branches that are already
+# merged to 'next' branch from getting rebased, because allowing it
+# would result in rebasing already published history.
+
+publish=next
+basebranch="$1"
+if test "$#" = 2
+then
+ topic="refs/heads/$2"
+else
+ topic=`git symbolic-ref HEAD` ||
+ exit 0 ;# we do not interrupt rebasing detached HEAD
+fi
+
+case "$topic" in
+refs/heads/??/*)
+ ;;
+*)
+ exit 0 ;# we do not interrupt others.
+ ;;
+esac
+
+# Now we are dealing with a topic branch being rebased
+# on top of master. Is it OK to rebase it?
+
+# Does the topic really exist?
+git show-ref -q "$topic" || {
+ echo >&2 "No such branch $topic"
+ exit 1
+}
+
+# Is topic fully merged to master?
+not_in_master=`git rev-list --pretty=oneline ^master "$topic"`
+if test -z "$not_in_master"
+then
+ echo >&2 "$topic is fully merged to master; better remove it."
+ exit 1 ;# we could allow it, but there is no point.
+fi
+
+# Is topic ever merged to next? If so you should not be rebasing it.
+only_next_1=`git rev-list ^master "^$topic" ${publish} | sort`
+only_next_2=`git rev-list ^master ${publish} | sort`
+if test "$only_next_1" = "$only_next_2"
+then
+ not_in_topic=`git rev-list "^$topic" master`
+ if test -z "$not_in_topic"
+ then
+ echo >&2 "$topic is already up to date with master"
+ exit 1 ;# we could allow it, but there is no point.
+ else
+ exit 0
+ fi
+else
+ not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"`
+ /usr/bin/perl -e '
+ my $topic = $ARGV[0];
+ my $msg = "* $topic has commits already merged to public branch:\n";
+ my (%not_in_next) = map {
+ /^([0-9a-f]+) /;
+ ($1 => 1);
+ } split(/\n/, $ARGV[1]);
+ for my $elem (map {
+ /^([0-9a-f]+) (.*)$/;
+ [$1 => $2];
+ } split(/\n/, $ARGV[2])) {
+ if (!exists $not_in_next{$elem->[0]}) {
+ if ($msg) {
+ print STDERR $msg;
+ undef $msg;
+ }
+ print STDERR " $elem->[1]\n";
+ }
+ }
+ ' "$topic" "$not_in_next" "$not_in_master"
+ exit 1
+fi
+
+<<\DOC_END
+
+This sample hook safeguards topic branches that have been
+published from being rewound.
+
+The workflow assumed here is:
+
+ * Once a topic branch forks from "master", "master" is never
+ merged into it again (either directly or indirectly).
+
+ * Once a topic branch is fully cooked and merged into "master",
+ it is deleted. If you need to build on top of it to correct
+ earlier mistakes, a new topic branch is created by forking at
+ the tip of the "master". This is not strictly necessary, but
+ it makes it easier to keep your history simple.
+
+ * Whenever you need to test or publish your changes to topic
+ branches, merge them into "next" branch.
+
+The script, being an example, hardcodes the publish branch name
+to be "next", but it is trivial to make it configurable via
+$GIT_DIR/config mechanism.
+
+With this workflow, you would want to know:
+
+(1) ... if a topic branch has ever been merged to "next". Young
+ topic branches can have stupid mistakes you would rather
+ clean up before publishing, and things that have not been
+ merged into other branches can be easily rebased without
+ affecting other people. But once it is published, you would
+ not want to rewind it.
+
+(2) ... if a topic branch has been fully merged to "master".
+ Then you can delete it. More importantly, you should not
+ build on top of it -- other people may already want to
+ change things related to the topic as patches against your
+ "master", so if you need further changes, it is better to
+ fork the topic (perhaps with the same name) afresh from the
+ tip of "master".
+
+Let's look at this example:
+
+ o---o---o---o---o---o---o---o---o---o "next"
+ / / / /
+ / a---a---b A / /
+ / / / /
+ / / c---c---c---c B /
+ / / / \ /
+ / / / b---b C \ /
+ / / / / \ /
+ ---o---o---o---o---o---o---o---o---o---o---o "master"
+
+
+A, B and C are topic branches.
+
+ * A has one fix since it was merged up to "next".
+
+ * B has finished. It has been fully merged up to "master" and "next",
+ and is ready to be deleted.
+
+ * C has not merged to "next" at all.
+
+We would want to allow C to be rebased, refuse A, and encourage
+B to be deleted.
+
+To compute (1):
+
+ git rev-list ^master ^topic next
+ git rev-list ^master next
+
+ if these match, topic has not merged in next at all.
+
+To compute (2):
+
+ git rev-list master..topic
+
+ if this is empty, it is fully merged to "master".
+
+DOC_END
diff --git a/tests/resources/testrepo_256.git/hooks/pre-receive.sample b/tests/resources/testrepo_256.git/hooks/pre-receive.sample
new file mode 100755
index 000000000..a1fd29ec1
--- /dev/null
+++ b/tests/resources/testrepo_256.git/hooks/pre-receive.sample
@@ -0,0 +1,24 @@
+#!/bin/sh
+#
+# An example hook script to make use of push options.
+# The example simply echoes all push options that start with 'echoback='
+# and rejects all pushes when the "reject" push option is used.
+#
+# To enable this hook, rename this file to "pre-receive".
+
+if test -n "$GIT_PUSH_OPTION_COUNT"
+then
+ i=0
+ while test "$i" -lt "$GIT_PUSH_OPTION_COUNT"
+ do
+ eval "value=\$GIT_PUSH_OPTION_$i"
+ case "$value" in
+ echoback=*)
+ echo "echo from the pre-receive-hook: ${value#*=}" >&2
+ ;;
+ reject)
+ exit 1
+ esac
+ i=$((i + 1))
+ done
+fi
diff --git a/tests/resources/testrepo_256.git/hooks/prepare-commit-msg.sample b/tests/resources/testrepo_256.git/hooks/prepare-commit-msg.sample
new file mode 100755
index 000000000..10fa14c5a
--- /dev/null
+++ b/tests/resources/testrepo_256.git/hooks/prepare-commit-msg.sample
@@ -0,0 +1,42 @@
+#!/bin/sh
+#
+# An example hook script to prepare the commit log message.
+# Called by "git commit" with the name of the file that has the
+# commit message, followed by the description of the commit
+# message's source. The hook's purpose is to edit the commit
+# message file. If the hook fails with a non-zero status,
+# the commit is aborted.
+#
+# To enable this hook, rename this file to "prepare-commit-msg".
+
+# This hook includes three examples. The first one removes the
+# "# Please enter the commit message..." help message.
+#
+# The second includes the output of "git diff --name-status -r"
+# into the message, just before the "git status" output. It is
+# commented because it doesn't cope with --amend or with squashed
+# commits.
+#
+# The third example adds a Signed-off-by line to the message, that can
+# still be edited. This is rarely a good idea.
+
+COMMIT_MSG_FILE=$1
+COMMIT_SOURCE=$2
+SHA1=$3
+
+/usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE"
+
+# case "$COMMIT_SOURCE,$SHA1" in
+# ,|template,)
+# /usr/bin/perl -i.bak -pe '
+# print "\n" . `git diff --cached --name-status -r`
+# if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;;
+# *) ;;
+# esac
+
+# SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
+# git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE"
+# if test -z "$COMMIT_SOURCE"
+# then
+# /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE"
+# fi
diff --git a/tests/resources/testrepo_256.git/hooks/push-to-checkout.sample b/tests/resources/testrepo_256.git/hooks/push-to-checkout.sample
new file mode 100755
index 000000000..af5a0c001
--- /dev/null
+++ b/tests/resources/testrepo_256.git/hooks/push-to-checkout.sample
@@ -0,0 +1,78 @@
+#!/bin/sh
+
+# An example hook script to update a checked-out tree on a git push.
+#
+# This hook is invoked by git-receive-pack(1) when it reacts to git
+# push and updates reference(s) in its repository, and when the push
+# tries to update the branch that is currently checked out and the
+# receive.denyCurrentBranch configuration variable is set to
+# updateInstead.
+#
+# By default, such a push is refused if the working tree and the index
+# of the remote repository has any difference from the currently
+# checked out commit; when both the working tree and the index match
+# the current commit, they are updated to match the newly pushed tip
+# of the branch. This hook is to be used to override the default
+# behaviour; however the code below reimplements the default behaviour
+# as a starting point for convenient modification.
+#
+# The hook receives the commit with which the tip of the current
+# branch is going to be updated:
+commit=$1
+
+# It can exit with a non-zero status to refuse the push (when it does
+# so, it must not modify the index or the working tree).
+die () {
+ echo >&2 "$*"
+ exit 1
+}
+
+# Or it can make any necessary changes to the working tree and to the
+# index to bring them to the desired state when the tip of the current
+# branch is updated to the new commit, and exit with a zero status.
+#
+# For example, the hook can simply run git read-tree -u -m HEAD "$1"
+# in order to emulate git fetch that is run in the reverse direction
+# with git push, as the two-tree form of git read-tree -u -m is
+# essentially the same as git switch or git checkout that switches
+# branches while keeping the local changes in the working tree that do
+# not interfere with the difference between the branches.
+
+# The below is a more-or-less exact translation to shell of the C code
+# for the default behaviour for git's push-to-checkout hook defined in
+# the push_to_deploy() function in builtin/receive-pack.c.
+#
+# Note that the hook will be executed from the repository directory,
+# not from the working tree, so if you want to perform operations on
+# the working tree, you will have to adapt your code accordingly, e.g.
+# by adding "cd .." or using relative paths.
+
+if ! git update-index -q --ignore-submodules --refresh
+then
+ die "Up-to-date check failed"
+fi
+
+if ! git diff-files --quiet --ignore-submodules --
+then
+ die "Working directory has unstaged changes"
+fi
+
+# This is a rough translation of:
+#
+# head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX
+if git cat-file -e HEAD 2>/dev/null
+then
+ head=HEAD
+else
+ head=$(git hash-object -t tree --stdin </dev/null)
+fi
+
+if ! git diff-index --quiet --cached --ignore-submodules $head --
+then
+ die "Working directory has staged changes"
+fi
+
+if ! git read-tree -u -m "$commit"
+then
+ die "Could not update working tree to new HEAD"
+fi
diff --git a/tests/resources/testrepo_256.git/hooks/update.sample b/tests/resources/testrepo_256.git/hooks/update.sample
new file mode 100755
index 000000000..c4d426bc6
--- /dev/null
+++ b/tests/resources/testrepo_256.git/hooks/update.sample
@@ -0,0 +1,128 @@
+#!/bin/sh
+#
+# An example hook script to block unannotated tags from entering.
+# Called by "git receive-pack" with arguments: refname sha1-old sha1-new
+#
+# To enable this hook, rename this file to "update".
+#
+# Config
+# ------
+# hooks.allowunannotated
+# This boolean sets whether unannotated tags will be allowed into the
+# repository. By default they won't be.
+# hooks.allowdeletetag
+# This boolean sets whether deleting tags will be allowed in the
+# repository. By default they won't be.
+# hooks.allowmodifytag
+# This boolean sets whether a tag may be modified after creation. By default
+# it won't be.
+# hooks.allowdeletebranch
+# This boolean sets whether deleting branches will be allowed in the
+# repository. By default they won't be.
+# hooks.denycreatebranch
+# This boolean sets whether remotely creating branches will be denied
+# in the repository. By default this is allowed.
+#
+
+# --- Command line
+refname="$1"
+oldrev="$2"
+newrev="$3"
+
+# --- Safety check
+if [ -z "$GIT_DIR" ]; then
+ echo "Don't run this script from the command line." >&2
+ echo " (if you want, you could supply GIT_DIR then run" >&2
+ echo " $0 <ref> <oldrev> <newrev>)" >&2
+ exit 1
+fi
+
+if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
+ echo "usage: $0 <ref> <oldrev> <newrev>" >&2
+ exit 1
+fi
+
+# --- Config
+allowunannotated=$(git config --type=bool hooks.allowunannotated)
+allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch)
+denycreatebranch=$(git config --type=bool hooks.denycreatebranch)
+allowdeletetag=$(git config --type=bool hooks.allowdeletetag)
+allowmodifytag=$(git config --type=bool hooks.allowmodifytag)
+
+# check for no description
+projectdesc=$(sed -e '1q' "$GIT_DIR/description")
+case "$projectdesc" in
+"Unnamed repository"* | "")
+ echo "*** Project description file hasn't been set" >&2
+ exit 1
+ ;;
+esac
+
+# --- Check types
+# if $newrev is 0000...0000, it's a commit to delete a ref.
+zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0')
+if [ "$newrev" = "$zero" ]; then
+ newrev_type=delete
+else
+ newrev_type=$(git cat-file -t $newrev)
+fi
+
+case "$refname","$newrev_type" in
+ refs/tags/*,commit)
+ # un-annotated tag
+ short_refname=${refname##refs/tags/}
+ if [ "$allowunannotated" != "true" ]; then
+ echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2
+ echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2
+ exit 1
+ fi
+ ;;
+ refs/tags/*,delete)
+ # delete tag
+ if [ "$allowdeletetag" != "true" ]; then
+ echo "*** Deleting a tag is not allowed in this repository" >&2
+ exit 1
+ fi
+ ;;
+ refs/tags/*,tag)
+ # annotated tag
+ if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1
+ then
+ echo "*** Tag '$refname' already exists." >&2
+ echo "*** Modifying a tag is not allowed in this repository." >&2
+ exit 1
+ fi
+ ;;
+ refs/heads/*,commit)
+ # branch
+ if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then
+ echo "*** Creating a branch is not allowed in this repository" >&2
+ exit 1
+ fi
+ ;;
+ refs/heads/*,delete)
+ # delete branch
+ if [ "$allowdeletebranch" != "true" ]; then
+ echo "*** Deleting a branch is not allowed in this repository" >&2
+ exit 1
+ fi
+ ;;
+ refs/remotes/*,commit)
+ # tracking branch
+ ;;
+ refs/remotes/*,delete)
+ # delete tracking branch
+ if [ "$allowdeletebranch" != "true" ]; then
+ echo "*** Deleting a tracking branch is not allowed in this repository" >&2
+ exit 1
+ fi
+ ;;
+ *)
+ # Anything else (is there anything else?)
+ echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2
+ exit 1
+ ;;
+esac
+
+# --- Finished
+exit 0
diff --git a/tests/resources/testrepo_256.git/index b/tests/resources/testrepo_256.git/index
new file mode 100644
index 000000000..838e73883
--- /dev/null
+++ b/tests/resources/testrepo_256.git/index
Binary files differ
diff --git a/tests/resources/testrepo_256.git/info/exclude b/tests/resources/testrepo_256.git/info/exclude
new file mode 100644
index 000000000..a5196d1be
--- /dev/null
+++ b/tests/resources/testrepo_256.git/info/exclude
@@ -0,0 +1,6 @@
+# git ls-files --others --exclude-from=.git/info/exclude
+# Lines that start with '#' are comments.
+# For a project mostly in C, the following would be a good set of
+# exclude patterns (uncomment them if you want to use them):
+# *.[oa]
+# *~
diff --git a/tests/resources/testrepo_256.git/logs/HEAD b/tests/resources/testrepo_256.git/logs/HEAD
new file mode 100644
index 000000000..59a4bb5f0
--- /dev/null
+++ b/tests/resources/testrepo_256.git/logs/HEAD
@@ -0,0 +1,7 @@
+0000000000000000000000000000000000000000000000000000000000000000 1b4b74772bd83ff28bf44cda9be93f4afc2279623bb5b36c9194a660b7623c24 Ben Straub <bstraub@github.com> 1335806563 -0700 clone: from /Users/ben/src/libgit2/tests/resources/testrepo.git
+1b4b74772bd83ff28bf44cda9be93f4afc2279623bb5b36c9194a660b7623c24 decaff3051968d1f3a2defd3d4a80ced03101555e1fd8913b3544026c0717d4f Ben Straub <bstraub@github.com> 1335806603 -0900 commit:
+decaff3051968d1f3a2defd3d4a80ced03101555e1fd8913b3544026c0717d4f cb282e7c15fd8aeb2265cd621f5a228cb33dc84192980ca426cf9ab2a48cb9f0 Ben Straub <bstraub@github.com> 1335806604 -0900 checkout: moving from master to 5b5b025
+cb282e7c15fd8aeb2265cd621f5a228cb33dc84192980ca426cf9ab2a48cb9f0 decaff3051968d1f3a2defd3d4a80ced03101555e1fd8913b3544026c0717d4f Ben Straub <bstraub@github.com> 1335806605 -0900 checkout: moving from 5b5b025 to master
+decaff3051968d1f3a2defd3d4a80ced03101555e1fd8913b3544026c0717d4f 901505c3355518bee35475c5d3f23bac1dded688b2bd314cc32b7f157e100724 Ben Straub <bstraub@github.com> 1335806608 -0900 checkout: moving from master to br2
+901505c3355518bee35475c5d3f23bac1dded688b2bd314cc32b7f157e100724 a4813ef6708e6011e8187224297e83e4a285f58bf5eabb1db270351388603c95 Ben Straub <bstraub@github.com> 1335806617 -0900 commit: checking in
+a4813ef6708e6011e8187224297e83e4a285f58bf5eabb1db270351388603c95 decaff3051968d1f3a2defd3d4a80ced03101555e1fd8913b3544026c0717d4f Ben Straub <bstraub@github.com> 1335806621 -0900 checkout: moving from br2 to master
diff --git a/tests/resources/testrepo_256.git/logs/refs/heads/br2 b/tests/resources/testrepo_256.git/logs/refs/heads/br2
new file mode 100644
index 000000000..e8ada8193
--- /dev/null
+++ b/tests/resources/testrepo_256.git/logs/refs/heads/br2
@@ -0,0 +1,2 @@
+0000000000000000000000000000000000000000000000000000000000000000 901505c3355518bee35475c5d3f23bac1dded688b2bd314cc32b7f157e100724 Ben Straub <bstraub@github.com> 1335806608 -0700 branch: Created from refs/remotes/origin/br2
+a4813ef6708e6011e8187224297e83e4a285f58bf5eabb1db270351388603c95 a4813ef6708e6011e8187224297e83e4a285f58bf5eabb1db270351388603c95 Ben Straub <bstraub@github.com> 1335806617 -0700 commit: checking in
diff --git a/tests/resources/testrepo_256.git/logs/refs/heads/master b/tests/resources/testrepo_256.git/logs/refs/heads/master
new file mode 100644
index 000000000..4b4c53f42
--- /dev/null
+++ b/tests/resources/testrepo_256.git/logs/refs/heads/master
@@ -0,0 +1,2 @@
+0000000000000000000000000000000000000000000000000000000000000000 1b4b74772bd83ff28bf44cda9be93f4afc2279623bb5b36c9194a660b7623c24 Ben Straub <bstraub@github.com> 1335806563 -0800 clone: from /Users/ben/src/libgit2/tests/resources/testrepo.git
+1b4b74772bd83ff28bf44cda9be93f4afc2279623bb5b36c9194a660b7623c24 decaff3051968d1f3a2defd3d4a80ced03101555e1fd8913b3544026c0717d4f Ben Straub <bstraub@github.com> 1335806603 -0800 commit: checking in
diff --git a/tests/resources/testrepo_256.git/logs/refs/heads/not-good b/tests/resources/testrepo_256.git/logs/refs/heads/not-good
new file mode 100644
index 000000000..6bac45bec
--- /dev/null
+++ b/tests/resources/testrepo_256.git/logs/refs/heads/not-good
@@ -0,0 +1 @@
+0000000000000000000000000000000000000000000000000000000000000000 decaff3051968d1f3a2defd3d4a80ced03101555e1fd8913b3544026c0717d4f Ben Straub <bstraub@github.com> 1336761944 -0700 branch: Created from master
diff --git a/tests/resources/testrepo_256.git/logs/refs/heads/with-empty-log b/tests/resources/testrepo_256.git/logs/refs/heads/with-empty-log
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/resources/testrepo_256.git/logs/refs/heads/with-empty-log
diff --git a/tests/resources/testrepo_256.git/logs/refs/remotes/origin/HEAD b/tests/resources/testrepo_256.git/logs/refs/remotes/origin/HEAD
new file mode 100644
index 000000000..c1c020cff
--- /dev/null
+++ b/tests/resources/testrepo_256.git/logs/refs/remotes/origin/HEAD
@@ -0,0 +1 @@
+0000000000000000000000000000000000000000000000000000000000000000 1b4b74772bd83ff28bf44cda9be93f4afc2279623bb5b36c9194a660b7623c24 Ben Straub <bstraub@github.com> 1335806563 -0700 clone: from /Users/ben/src/libgit2/tests/resources/testrepo.git
diff --git a/tests/resources/testrepo_256.git/logs/refs/remotes/test/master b/tests/resources/testrepo_256.git/logs/refs/remotes/test/master
new file mode 100644
index 000000000..42bdaa27f
--- /dev/null
+++ b/tests/resources/testrepo_256.git/logs/refs/remotes/test/master
@@ -0,0 +1,2 @@
+0000000000000000000000000000000000000000000000000000000000000000 decaff3051968d1f3a2defd3d4a80ced03101555e1fd8913b3544026c0717d4f Ben Straub <bstraub@github.com> 1335806565 -0800 update by push
+decaff3051968d1f3a2defd3d4a80ced03101555e1fd8913b3544026c0717d4f 1b4b74772bd83ff28bf44cda9be93f4afc2279623bb5b36c9194a660b7623c24 Ben Straub <bstraub@github.com> 1335806688 -0800 update by push
diff --git a/tests/resources/testrepo_256.git/object-idx b/tests/resources/testrepo_256.git/object-idx
new file mode 100644
index 000000000..c4ce7c4bf
--- /dev/null
+++ b/tests/resources/testrepo_256.git/object-idx
@@ -0,0 +1,1700 @@
+0007e4a07f4c922a647ac9930790e6640c61b8555d0e0195d164bce8685f2390 05bf6713e26fca9af0b116adf6fa1a0e4a3a957c
+002bf814b089dd7941f9cdd449e8c3a52815e8f8f5fdc918c4ff3fe4a2a88119 3e590fb2221ea3c117b7347956843d24132ac22b
+00404e6179d86039bbc01a925bdc34ccdab778bd1d824f5562aaa319c6c8f045 b91e763008b10db366442469339f90a2b8400d0a
+0052fc5cfde91bf84d96ea764b24ccd20ce9d98a354bf69a6bd89c2ad38f977b 00c5bdc46d8f91dda9f64086347d60c18d1a1f8f
+0092a5b445971910ad22ef5636caf11f6926695fa8eeaf34a4fb7abecc4a0e44 404e1182dc52d4caf284d0f39567cde79649b651
+00b1f32aab597e7bff93f9790bf580b030f4ed71d620a7178b2d9a2bad5b1f86 27c3c27807e7fd3c053e0bffc6da68051f343ba2
+0113a79463a552823f5865aeaa641137ad8741ac85ef923014a6a7c0c36aa1a3 73630ef121eb0e4a601df784dff973b321813f02
+01177bbe7923049c27d557ed912d7440e2925bda5a37492744a83c1ff2fdda1f 5f10ae02d45a1f030cf0255ff813d62fcf7e5575
+0118010feb81fe41b9df646d13866742a9070b56fd0ba9ab8dff828fc36c1f78 763d71aadf09a7951596c9746c024e7eece7c7af
+01731a6f97a36dc0299d3bd87b16f0679d675dc8bfc484dfc1173e3dea5914de 5f340851194fa963878fa70e6ef4b19bd2c74ee2
+01a1e78e1078db69cb6197fbc564851bb5861e6938638169c9111bfd08b608b0 11d973c9507b5768f2c312ad9ffa35f0baae8793
+01d396efb693b1b691ada667e623864b802bf4b57bd4fade0fb6d75688a9b99b d5d4b8cd7faeb7749015896a303f1d5331638d00
+0210a4981f476c0d98929dded65b4dc0ff653f0876c45ff08a6e7a1d647a4b2a d39941396f81224f394f1d59c31f64e2d0424fab
+0216b94271c2795357116d8f9ae45facd9bb1658c5a42ef38ea54e57833ffa3f bdf2334251d8e65a999b96fc99547ba99e2f0205
+0244a04d70a80f0e5baaefe7ac1cd73dcb00692f982e1e3af824252a5d48fb3d 182f2b39391ff4db4008554e97753fdba4e1b57e
+024e2a82f18d1034c0954bc91c96af19c98029aaab3f6aa8fde5ff1f5e70afe6 f57c220bb0949ba4d6da1967bbbbc7544c18c0d0
+027d76e06b173a74af36c5d1a10761c830b59ed8dc03acc58d1ae008b176160e 1b24fa1fb836589fef658723c5a68cda9a2647dc
+0285241dd82eda29ba38b91c04f6385fae1b1b88990f8d0c86a88b5e6401a495 7c25137751c32c3971a57cc66c564dfc321328e1
+028e02901e7de25b3a0079c438da76f03df181cba76d986d3445be0675af21c2 f206b37de925edb8e36dce24fddb125e493d2cc9
+02a6da582f284e708f78ab9360628740395d9003bae9cc9cd5dc47e042a95e58 39e01811cd58f4ea0f5f5612d24b3115ad0736f4
+02c3ca38a3cadcb769643ed692998c0f3984429600365a39e143e5984c33c871 a42df0a3df3e2524c532f9f75aea0ac69c3984c3
+02df938cfb169b0b6ba0dd16acdd727ea9364f7d48c55afed2f7dd889804065b b235959d89084af8d3544fbdf675e47944f86524
+02dfdb9fccff7beaad58de3ae93694e3f957cefa10945d4652b3b1af4ecc1e41 a84d1309159aa125367376b01ec4c76847a4f514
+03063757ec40cebe0042c667ddb85bc4404925390abe9ce38fbf89761b9929e7 820e02ccef8c90470ec7f351464f9212f9dc0651
+033de70fa8afc174d134a3dfda7a8477b550dc12019904d418d9d0bb77d75c11 336ab27f4ead4627cc51ed162c31bc01f13b793e
+03653094a4e4d102cb4ea4d29ca5d17dcd99a0d6997d0a6ea590b774333a4afa 03a9cba35dd9060f15a7309b438afaa246e80d5c
+037bb440672e051dfb647627dd961209d4d5f65a3134aa561e9a22dea0c2ddff 6e9fb9dad8184cde865b1b062163dc209042f88d
+039df023a072d4c4dedc8d69bdfd04955c9661ad0a6032d59417fae3d9a6e66f 93a16f146306fea6df405db1e6e065e52994ee5f
+03c29c5b092a27c7d22553dabbf94cdd05ea9892de6a017bb7ebad8cd381a72e 8529bb1ac5647c96f1af4e933f34de2e9d8921fb
+041ee569b4648c25a375895bf0e615b1e967164142dde5e3b74f42aebaa8b1db 15bffce9f7ce45f3b17d9357931667485a890455
+041f178780c21ca66c1a644e406bcc631e3374d3d3ff12963f27b7a2e4dcb98f f2ee83a040d7c1c26b85729558e7afc121d35651
+044fbdc5fa0794e3fe81c4cb6735792a7e2224ef108533d9e4d64dcc2f79f727 4738f4f3ea24fd89b4b4b27aa115eb6eaff9b397
+04504468bbc5da740dff1ee1bc21644ceac33a5a39e186624ac9c1700a005802 34a1dba52a7a0f2309c3bcca5ebd76dc8d2627c5
+046ec406f62cf062f45bcaa8881c901563595ad5e4e3eda3915979c8e8ac8786 c7417a02d56346deb435359fdba3de19c0be2f62
+048a56b75d20462e59f0b0c4f8c326013116a117654226fbd086eafc417b227b 894a57d31fdc8326a97814ad2403a45e7c8b6371
+04c49256444a1cca25ef7a6d0f6fb13db62c3a7d887c2b3bd0daf02b36665923 0e115c5be6bf252aa8cba76141eefb67f1541a06
+04cbb5dec4810b725cedad9ed47b8e070ebf7912e7f8a38b1524c7a5d18d6711 62ab0af99d2955901133fff37560bff1962e9b14
+050224b1d07966f578ce168d709148391b41eb6fd4b08e51fec8a549654a6780 c36f4cf1e38ec1bb9d9ad146ed572b89ecfc9f18
+05257051a1b3dc12041d32d8392ef288a18aa225b138ee92058a76f6453ffeed b6d7472f568134d9662dbe0753e692b7d57ed993
+052e483d293dd8832a959201ae52fbe0a3578a53dc964260c1ccd00563109d05 e8b17444a9abd2c9be360b44a8f8e13a4a2fdf27
+053bb083785b3e6287242a1e9b7cdebe356a25574b5f063538bfcf01d646f0d8 f15336fafccff5f3a05b4f4d1527254f25a364ef
+0541301a56755c364219db68258da2e70e9146e9cad185e78b188d560dfbfc38 45504b7b9013d55e193001c8336f3db0ec2a81ed
+058ec10e754833d209791fc619b8651f9f8738eceb4af6c9c4e096656b4b5d0c 639753339cadc1e57823094276afd3b57bdd6b62
+05a40f056205025b75b15337629dd90b2abe57a2622ca7968db2ffd4fa1198a7 77c0fe987fc4a3c24843c77615c3b6d2f53e27ab
+05a580d164ba0fb859466759e0db1d63795eee186a48ad7b6684337933ed16b7 448a7a7cf218a5988f12274945613e86e1c2de11
+05f7b70a01b0ade8afa5a5fcd19f12cc38faf337d10ec03ef4363d1a86f63750 e7b4ad382349ff96dd8199000580b9b1e2042eb0
+060c18716f5e2d8c74a30960f002096e43a4a8b0344e3df4f81222d0b7d73b89 7322d43c8aecf06b61944b8fd63d60758680a957
+061079b6d522c910cfe03f6549a63ab4ab43e212aaaf7dce90bdecd4c4f616d5 4b8e8b32c1ea1bee8c8c01795e46aa97006bb065
+06240c7992e7306c80b1d058777029034fc2a9028931dd93c5611bd56332b99a d5f668c547ff80ee9c5ec24613a2e552cb531c59
+062835d273525fdde70fef08a703cdff6fba048a2e1ef3e49a4a6f60e7e5c7e4 3e00d3bc4d8a36c974bbe91608da3b6b1af69caa
+063517f949bd44147862a7eb7210fc0baccdf6c5c02c18c51459c7f317d803ad 2e2a9ece460a44d8f30f3df9af1e3686a8e609ec
+0636b4292bfdd7274a977cb6f8b2ded8f315ea1bcd8dbedfca37964c2ed3d085 236e7579fed7763be77209efb8708960982f3cb3
+0642ed9f6735aa25854c90e266798a4843922fe3736a04252809e824bd4093d2 5db59540265ec48b82f604cd251907ca5d79b6fe
+06665948a581e547ac1dc883b35bab54682fc311f7a87d5563a76501ecba55fc 4f0adcd0e61eabe06fe32be66b16559537124b7a
+0676bc9e224b7a050b3e88cf7dd8f7fb148f521594a6d4132f0400bba6b1da83 8e9d2f904854c0dab03de84dcef103c1904b2115
+0709e20677dfeeb21242f9f7fa277ec464fbbfb56d303f8006c7e60c8e2be458 b3a2f90e54bcb32a88d13539e5672993c5037638
+0722571dc44f703576daf0dc43370557e6e9d83784b9454c98a7246ea3e0ab91 215da649e1c68079fb03f4f9bc0f196cca9855c8
+07314e5bfe0b98c1e061219664284ea9567e1d739530b3be8e3a6ef9527d59b9 9d3c39dfd8210faa558b0cc6fb427b680db343e7
+074acdefc8d17e7337df33b74c1ec5349ef0a0b18a7ec5fed41a2cf420db4f5e d8310141b69fa36657a620a045acad4e4ce0920c
+074e9049747d5816aa03be67451eb42c425d1e328730b4d999dee78c4d2579f5 caa7d9e0c8f8671cf8b8c9c16eb18d31ca4802d8
+07571960f3f64bbb4d31f24f79abe05daae0498f6b4b77cca3d8e8ceccbd75d3 ad7cf03cce61aba463b9a687e388260395c8e727
+075e288bb4b170c21e5a569c3cafec80736aead134829acee0f9d4ba5b966a24 e9f5e87781e88aa3afa7679783c204604479f9e9
+076202d7d8fb1d193628801f76208f3a4967fa031a7f94d9236a0fbbe6f022f5 221c73c758cdfd3e7f7dc45b10576d1ced8232b5
+0763eb50fe80aa21eda853b7da406425b172b1d0ec7bdb41369a15868fddfb6f 02e741c6fca96b6d2bb89d064c3d1e31625d474c
+076800113a06dabe75d578f2ce6018fc23027a83dc74cfd66f69f3c50f037ba0 270eb8c6bfbcece0f3abdf20f16f5a2c0b0e65e3
+078baf54914fab56842798c90fec863f15f67a22041e8aa54a88c43f059da050 3184a3abdfea231992254929ff4e275898e5bbf6
+07c31b4be5f3ec8f82c7ad6c91cbdf07ae876bb73041903d64fe8bac64bbcb6e 4ea481c61c59ab55169b7cbaae536ad50b49d6f0
+07dcde657a4d8046d02962b4fd67ee5b6ac27f712de66ae22c11d14406ecf092 b39843f3e42c8e062a29b2a64e3c3ce6a16eb72f
+08198b33785f1eaf950aaa9ade1961e1513461f7f799905a6a625946ebf2db8e 1f9a9b4edab6da73b1625fc99e57fd84b88feaf7
+0838ea9dbbfb9167ea97d3b395b06abce5c951386d5549d87b3c4fe1ea8cbfd2 52261e14080afcd9cb0b1b17dc4146f2b6b252bc
+083c2b8b445640d171e7aa667b0b32007006f786711032ebb82931cca69cc15b fd8430bc864cfcd5f10e5590f8a447e01b942bfe
+083cf84e4ec87e8df6bb8cf4b5e95a5bf0e6b97b892fb99286d652362f0f1a8e 2e5faa78b12048d2818bf37986516cd287219f9b
+083dc854acb0f53c854ca89defefdd7c9bc76bd6158a461045057c8febdee51d 2c4b7707f7e1d591ec1765ab7057a03283841c3e
+08896c87dca842ffa2e7f9ca1941fc1b231b4f0cf966c992251fffc01be4eb0c ee5f4b6e2c16c9cf2510fd7ea60afb830a3e89b2
+08af1ef3969b835c4058d3c19fd6f30d0dca883b9553061823f016db50b935be f4153cc66a588da14bfb5e0ce59dcd638e6cad2d
+092184eacb4296d03cd379da1e30b23163a3174e74f5f072b71dad644565d5bd e7bed373b521d9d5e20c3f7a2372a7eae76ae66a
+09ca781675e86449d0910da772dfad9c80525b52452ea837a9820c3bc349296f fb799dfe77c7a1c9e2806c0021d659b5588d9105
+09f22926cfddb415baa1a22193d765facfea02edfb140702fae90714dcd402c2 621dbe6381d0b5239b6ca2f206fee56877326d5c
+0a13ff7efebb553b2dc091008c6b27ae8fd8da265a0fc672ee0349533574a1d6 892bb2941b4c993ee188ba1d2da6c305dd5f6ff4
+0a280fa035c75607e5399cebe0e2e4ab44de35bd4d5c46a1accb47c8ea2bbee4 417f0abc9b41f01520df863567b25efd03bd281c
+0a45b25fa6ba0d67638d8230be426a7a61baf23ea734ceea38312a380dd42181 a78bbeca7f7efad6ff1652d4ab03d4fbf8bb4c48
+0a58869d818eb06ab4b6601c466755db3a7e0d310e87f9f5f340f4ff8f3d84af 55eee3fca2f24bdaef26ea42ce12b98682b8988e
+0a8400e1a7dfc68b38c9e82bb4d64f94a20f75ba0f026eb14d29ec978f66dd3a 41fb16c71644d9acab037f4a43d23627545d6d86
+0a85ae1fd17b2a87e83699ba3dac6e0ebb2efd62948ea70dcc127a250323b066 6dc05568057b37706c8453b3e24645a351fef6a3
+0a8c0add81b065b97451f7b47a9935f0e240251c5f90a89ced885cb7d4efc2ba b0a3077f9ef6e093f8d9869bdb0c07095bd722cb
+0abaf90248f239f967d2361480e8111858721d240de6e928a9537af9a495062b b6d031157980136043dfbca0e49514a19c973759
+0ad45dbb04ca242774c42f4d7283094c9d0018db25224ec4e2b1512bd3e21e5a 45fb9738926af78da7280cb84ea022e8f7da98c9
+0aea420f9ece0be17a656910e5a64f71a591f2bb4a8938090680925a262fb511 0bf364b355f1dff3c70116f8629774848dadb9db
+0aefd477d9e5b3f8d708a3cf6d78be6b670dfa2e2ec41244634f3b8f115d8e04 775e4b4c1296e9e3104f2a36ca9cf9356a130959
+0af326907c9f9a1c91cdfcba6e241582f97ade4535b16a1863b03938ca983104 29a210a471a1964a68f7f1f15214c626c58c1701
+0b1a932c7db41cb113d42e06acf29eddd00aaae9e39398328d475754930c6cb8 343a4b52f37094d193a27fde5ff20825d6d1e7c3
+0b2613505624d7fb949258282f13add0019ba5521f3075ad0f61bc1306b6d828 faa612641fdc2590a969e9a8600af696be701f07
+0b41ced8fc49173b868c15cba070c0167cc83eaf7c0bc62a19e2081d1e7f2676 2876a4c21cb5848079e2f2700312e54d4988c76f
+0b6b4c4b598c420ebc1b9e404f53bbac59c8992100a92fb557d679a65e6c7bd5 ee2eb6fafc239de8d88016a1579314908b643b87
+0b99d2b73b57e4d477d096a82661320656f2e61f1d6811f569abb99e2d321b5d 3864bcd2aa1fe77365e8310662c037309d4db56c
+0bb1a5866d49c4f22b173586a2d0f2a3d6a91d8ed4d8f6fc43a624df4afe00d3 1b9191dd8a427addca8309a59decc90267082bae
+0bb5c743db0d4ef0b30982921e78fe42863d48ea34a6a917bf740ac2d677f281 9689311c952655dd9e315aaef81ea7bfc60d7c7a
+0bd7502a0ec038d7740979ad9c9d2198f61b51bcf75b20259aa56e845c62c884 13edd1b7d5996a6b1ac38ca113f6fd751bf77827
+0bf8e96a28828be201f392a2f8d511d4b0d88296db716d64bd9e8268a5cf912a f019bd17a1769103dd82b885d7b46bb9a30bdc29
+0c0a6e5b0322e1f51e3a53c3e302901e9f6acfd0e3f9cf227bd02e61ddefd401 cd2c3cc64b9c003e5049d8a3efe4fed7154e6e3d
+0c4f26749b1dbfbf4487590dea5b6bb49564712cb3f8343434092fd9b2ef0a0f 5ac6648ec382ec2f2c9ef81e6ded0f2fe5819a5c
+0c55511a79e278b18657bfc60a0893d002d266c05809f54aa49337a0973a1eb9 6013ffa66ef5d856b2c4c72c44b1a63a7ccc2b57
+0c889bfb5e530a62c89b8c18ba11f4bf3417582a28c70b51f075ae74ab1c9a6c 5152c60f1d88042a52d66344b1d628d2465fef6c
+0cffbec3386e267c6d32c541b5eb3e0492851a5b35b05a506dc60b8de0410b46 7828fb1437298bbf3f31da65581775665eece9cd
+0d15b51f164a1237b5a6ea2f35f32d3f953c4476c1ca7edc91890cd5fb5d8541 18eb2b8adddc7eb7e2a0165e8d759ec5172a65a8
+0d737e3eab91d43f8080513e45fa2d708b3626020ff4b6900b236a613af8cb6e 34ff3378eac2b37e5220195e235a25a21f9b7e25
+0d8b5fe52e725773014a0487616540efea381d2af971ab5a18ab25d33ead1390 9aa923b26f49d08404fd272e0688f57c899d9116
+0da6d514fdcd1a5248f1ae2343991a7b08ee5da3169da9326ade767fe50bf166 74c7fe4f3a657d606a4a004c87336749079c0edf
+0def2b73f560d08d26ce006d956af37c429277d3b492839521d00403060fc189 50d97878f49fd4c950a7a494b8dafb0d4797b57c
+0e1ee44bdd5aeffc3a6601c83744e64a421a38d1c9355cd5aa20a1dd7c55d849 73473718290fe068243e8596fe649f200e8a6f34
+0e265ece40fee110c5a6cd29be1534c268f16e4f3c488bcfb9f3c8d1f46a4791 711223894375fe1186ac5bfffdc48fb1fa1e65cc
+0e278cfd338b1dcc4f15bebb53ea527e756337a337e46d29806ed28c23f5469c f5124bfd46444f572c5faef3d45b084635c106a0
+0e31ba4e455789640544ac02d4e478fcd75d39de130241e0d2bc80db11c7b7f2 8722a77ec384aa0bc87b8f8f6c1c7ab6aeffae83
+0e3e687c74a6be88d4c09233ebe1d1a75748e349f7013284742e200c56821d9a 58f7931837dc08b3f94dce8ffe743afa40b15f0f
+0e4970dd94378fe30b6519edf25dcff7679e395072715c12e6f365b74ef94415 624320d5f878cb1603c31bfd8cf1427fb6474443
+0e49790ea8b918a427928eab3e17f8925efc10e2c1a8c5bdef4c0eb20cac0c77 0e40ca2e7c706ac2f46af7f4f2d4bccb90bfbb5f
+0e51009a15c1599ba55888c464d5d806694702f0593bd59895e4a134026bd34b 9e41833ef25a52288a46441ed9ad03dccd0b16c0
+0e6a1aaa2118384e5ceb8af69725827ff4bd942200a9b831522dddfb7aac8287 763dd65d1e7ca14658649d7c4d1cc1e4bfd2c671
+0e85ff7bdd5c6ef0a1a449461d1d01b6a0bcd3393a994bc5113915d173810071 e17a3f5673e0dc4d9ade34a0a276e6c202506fdf
+0ea35e446e65bc1894a303aaff5ed807151bdbbdc8ab257510abab4e83fbf13b ab42d1514cd6b1007d794885dbcc0e7918e91b1f
+0ec37a6fc3216ad07f16cba63ab57f80dea7e4091484cb25e6d677abca268fb0 9e210cb8bb8d3ad9204d90a584098d43c456a5e8
+0ee0fc56010269854bdcbd4a1a55675b2fc29c4410217004dbf77d3ec948954a b5cadb77fd216aee5dc133012142de6f78d4d47f
+0ef8005c1111d4e19e9636d02032c8c3c295ba6f94598e4e782eb28cff273062 408509eef776dff28a36b63e8785ff04f7cf9846
+0ef9ad163c0b4599adf0444b293ad267012e784ca37dca8d8c286fa36914001e 3a6b70664b4c5bc0ea2e6d3fa8fb3b3b54d724dc
+0f89c2e306e636e3084aa0bfe57938fbcd22981e809b7fc031ff90250befb83b 226eca421e206b16826b86f9aa9706aa31680240
+0f8caf733b3a1530869d8d6faf6d4069acec05cebdc33f15a8effbf0c7daf370 e92aec82dae6f9fc5d96b0ca7ce39d750905d7db
+0fc8f0a12ec6889419fd677c9830b2d3feec2e9abf89415147cf0b3c6d444a35 182859f51a5cdd6ae9a1f75e21eb8d3f95d0a833
+1056c834175ba8749080270f4772ed2aad4ac1b74896a7cd36a75fa8a1aa53af 628c97ce7d9539e1009702b53fc7aab98c7f7759
+10b531c577e3e3fac1dee215ea33ea21202309a23b93352e1a9f09d6e9f45f4b 169d698699b441e9912283936a81aaab8e59c6ec
+10d12b721c027f4041d0a52d5c02da1cadaa1ae0d05051421a36b861c4df210b c960d6a3f97ebd360dc3c9ea00fdb3cd5dc56224
+112e60f7f4409f6427a2bc302108becea27da72e31f92ee3476c31347cda4cb0 d22990a266f309c6eca013259c35ce567a0dfe08
+117e89c749a48a0c10b47e9433f26efd38192395676086af83ea2d48306b9f9f b4164f93a830a383b69daec35b6902f0cfe7ac21
+11bd4567822919bcbbf44a1323a1af5a0fcf9e2c6e3d2ad1329990eb1c0e9f5d 83de31463c02d36138f1d76cc22c18613920cd3b
+11d0463a82345c2512bd704dd00211aefb7d5b8590ca92809122fd09486a9f06 d0a0d63086fae3b0682af7261df21f7d0f7f066d
+11d187fe3c4fde36184f7e171e9b6afd066563b4ed568d9e1e3195b8488be47e 7f8a1d79534d90ed868ba664343b058258ddc64d
+11f2111f69ec85dbbb408d68349c750a9ed94722b094e971f595f8aca5028713 0b19f4634685fdf3c2e58564038e614b8a8a563c
+11f58a21e063f88f8aca15a05a6bb5148056acdc619be09214bba78819727a92 58840c6f7e9973b3700eae294e6f219c34cc6962
+12240f46f98af843abb3e12053abd997a1a5cf7ca50ec460775b6dfec9594346 2c9eb23012b2c0effdf247a9dfdeda4dcc6ad8b5
+122a2103f404b68ff8cce6c6ae82effa1026b8a254212401bf5473d27d70efba e97179b6de293c8f288957dc556239a44fa52e3e
+1258e0cba7f787b1c74e00872bcf43799e5a7c77202685dc0ba60adc20da977b b2dea1ed674386234946b2604df68d71b677d2c1
+127437808b4e14417e5654a8e00dac615d334a14747d78d2ba1bd0df426ddc18 60711175510355240283174b84d16ee85fd599ec
+12a834fdb798b91600e94c6851fc231cfd20f3eb65dcd736f39fecf96bff2788 edc438eedf6854c51e1a0d7954a6849046f5a4f6
+12e4e4e3649c0817fd80bf805c8daf890b40fe6788fd479db758575278bb58a3 91e5038d62abc64e8be483f3f764e51b0496de27
+12e8b48d89fb071c73fb0736f784c6ef0fcc2d4178a1fe17ed6d7a8950e6943b 01316e2444ef01a3a2939d6d891b1c7ee49bd05d
+1331f4c99429b5934be1c4186c592069ee9167e73e65807cf8004ba54a151fc1 e740db6f334253940722dccd42ee45c96ee4f56f
+137343a187f9ed56ddc750ccbdc5f284c1240ca1061854f609b4893cfc0ee035 b24cf42e6753bfe5763fdd7639f9cd8b629907e1
+13c8c9dae9fa63b1ec48b8abb12312fc8df61b9414678f504fa68164a48eef28 31438e245492d85fd6da4d1406eba0fbde8332a4
+13e9b8e6cd38ad58df3b3d9dd3480c06e69ea21f02639404c44c57f376ff2ec9 cb8e90b049ec87e0a999952544839c3c17f88e37
+1402d1979a18fa32944a3e584bc2bf63f08fd50fd16b228690b7c8614923b603 62860787aba2b59b1dd0bb7b9a810fbf3428cf75
+14386136c01f7aa705d82984066e49b9a3380d4f7a7f42dd5cc51511314e9a11 a43ff639453d9a5e374cd655bfb562d2d87b9edd
+14747f3fe457467be5310c526d23808fcc18f5bf29feca812a3b3c74dba53a39 77c39760447694c5e9f5c7d09acbc788560a322d
+1483e39b34bf45eeceada3f43bd76b8f1d8af079128291ee1f0ff9868fff8539 483b17569d2655bd9945ceac8e95c4279b2f2b2a
+14a40b61fbea11fffdac7e51616ec7a7264e88a16a9021b4e252d443794d50d2 a27fb9c96feb433fb28a2713a863a7356d45eed7
+14ab853cff3d477dc79386905229f0854da0bd832125d6e8c3f3186073ec0709 b6d1b7d59f42493a4aa5440ce24070bbc4044f88
+14bd335f9d7188c778d44eba8801fe9bda46b66593291f5b9f7cd5f8888af12f 4a23e2e65ad4e31c4c9db7dc746650bfad082679
+15011ec9c79d290af2e08c865de53631aab299a27fc2a681903b3e3efab7dd47 b5cc24e623d5257f37da86627b8b314609945cde
+1503ed3428050930a44def1fb250fbee95bb021a61f3ebe831502871c7df0035 f78cfc187cfead79cbeafb6e0c30f882a9d7c14f
+15041151380e43cd57db1e6b758b00a2ec32782a3004e2b1ededc5e8bbd2e815 09fbd28ab7ae43f75acdf7c8adc6d148b8e78d57
+151c7527acc5b731199a03a932ae374331e16e5ae29256e98cb652f37669889b 91d973263a55708fa8255867b3202d81ef9c2868
+153c7d90e1734b2c9d1b32035aede6299a2a2eaeec425fabcd86706c8afc6194 faf2dae9a5d206471233bfa8698ecbdfb24785d1
+158217c424b47fba461c300c9f99cc27b50f7122c6156d4264c648197e634fd6 c14aa17cb87c64a3cc0f21e343389bcba1992d32
+15a4a79b6ab927befa6798c2028d37fa6cb4f6fe0bf80fdce6444a2fd9e67eca c72d81b5de8042aaefed06ca1abc1a248bfd0a4b
+15bef585bbfec8410833ebdcb1760b7013d1dc3e4a7085902f199ed303f26098 89217d8f1a70da2916d611c989e6b046cdb94fca
+15f128540ddf555e902e837a9e4bc39d752d70af7de1c91b9b0048c1bdf4ba31 f70dcd0924f1d58e9b68ec47fae83d29696865d7
+15f8faf9eb65aa6ddc66cd5a1519d7fd4ac08cde54d6b25e6fe1698c55661335 0c51be2c8e9c40f947c9527b1c633c78c3d56e0b
+160a14259c471b4d0ef1594494f33126d5763d958ae31bb14e95818399f6e3ee 01e0d82509eadc367a67209ac1150e299447cb25
+1632e799dac6927cdf520ba3cba8987a1258382dedacf72dd5b3316af2fd619f ad2fd2eb9ab0a392524bc5d4a90888d550bcbc0d
+165ec90aa4190bbe12ee415b294fd6d204c64afcf1ca64dd815782872b24ea26 904c0ac12b23548de524adae712241b423d765a3
+167fd44243abde82c97106ac315e0f026b447dcf1016918ee42c0777533e6c0e e7cd3468b748fba2eab5162991ff781e2ca8507b
+169a47e7a7d688f8e6ee34ba57c07f3d1654f0886d7e0be582ec76cb445af1d3 d1aa69929be363f0798f1ff226078c9912415f5f
+16e15f2497ec3aca6b94a96dd1ae3e2c8c5a351112345e16c1013ddb23fe9131 89d3150640c0ed5b386bc8113ac8999b20371ece
+175515c1c0df4fd74f9f4683321b84cedcac3419563a268562f08560ad7684ad 3b8ab0b93539049b0f7c4a09f5dad48a1d89cd49
+1784913c0c472812c39dd12870f8fb69346327bda8383d7c2ef22d611c808513 ea9fa2b55f597931edb375c234b42833321e6ebf
+179496410f66032c03bd2b7e8ddfc9c8c47820fab5615cc04d904989ce800498 3259a6bd5b57fb9c1281bb7ed3167b50f224cb54
+17c8bb815beb9afed2efb9fad7e2fff9ad127e2bbf742e7688d70ced51875c11 4575d8b63290baafbdc8345a297945514542f2e8
+181a0d8c3fae35ec8f21046d043457cfb07975ef6ee20b3b2a2b75ef47e6b54f 017867366494259fa88e71955be05758b17f2568
+185248d640acd5ef59cd18b373ebeebe0c8f5d31e8d0da8a39b69509b82a8b38 3cc1e1683dfe9fa759c81ee61b2871cf95f0a3b8
+188d0f5e289ebe28d3eb0027212ea0b1af1c84ebb0229c452922d277ad4f6b41 086ab3e1892c5375fccb647a4b1e2d9ed55ab750
+18c2e619f1850cba3b69767e9433d37b9eba4616521994568a09e6620fdc32c5 46c7d0de2393b0064ff2b909a34944f30a80d8c3
+18ca8ae1ea1ab24474fefe881b7ad27805bd8942051fa9421c277b0ea0909361 069a41c3acd6dfeba2d5ebd1ce0e568d5ce3ad51
+18cc02db4956ff4c1ac8b49430ac9aa889482ebdf985e8f218415038466e870f 83fc82fc80ee42dc76405745ac74a80f7b7a9fd0
+18d28fe4d7da8143a66562a085a1082caf7abdc6ee0dc13c48a509f82ef9a6b2 72afab8fbae47da683ed24f4a3b5deb01c73ea9e
+18de7aa78fb2acafc30a3bfb0b5620543d2d9c21b8474f0d02ea94ac16b3e414 c1f22c54fb7ae97543f8fe6c6ceff95734f4f9c3
+18de852cc5d52a03ac90027225dd12cad93079ca8e1a2dfb11214ee8dc06deea b447fb5a08337aa08134b854f8d65369f03c37c2
+18f2403ff16f42833737b7746497f5f79c014e1cb33bd639c47d7869cb07873b 480cc70e318d8a80657f36fb55967477050cf3ec
+190a1349522cc11f8682e34acca4ce4e1ea8508dfd77c24cefd461b65cead09e d71aab4f9b04b45ce09bcaa636a9be6231474759
+191782022d7767a9a15579163f106741358f2503fec2f9c4c093a6718c0c764e e5f6ef80021c1a1ce27300c4de4bc720a08ccfe1
+191cea84239bce688afb3e171e9e4b3aaae9d419515dd5629b3c01902210334b 2a7e671b12478a4246a11e8f3db61ac76f241e5e
+19762806906133d4265885d96213490c2b04f17560b8d724f91770913531488e 422ef9df86d2b3647e8d9a0525318b1d33dd9f34
+19ac68c5ed3b0a7a8b9f5a4a7098d002d70e0578f8735105ff622805287dc356 8e8169ce53213d649d52304e3a8f98ea04c35801
+19c0e0233f0ce56698402b2e9bc0c77a02e5089c3e28d03f55c9a3bcd6c1df57 76a8c44727406a76d251102bdee607871887a119
+19cd37eadbdbee580b4e2d650374b1e2517600ef4f45666547f9030a1de25a40 a23bec23d8075a05cd04df2f52fb2fddc8ab4185
+19e5ca97ae44d0f46334d1bbed31bcecc2b753ab4de4413e03c3020a2ca0e68e 8157f9e57bd9de5ab95b89fb9c7192a5668322f4
+19fb1c78b11f0f8bda658d6fa6cc63c0b573c0f6760ee5a9c2df6ce2cde00c5c 09fe9364461cf60dd1c46b0e9545b1e47bb1a297
+1a002e34aa1589da6dec7e55014927ebbfb007d33aa6d93dc1aea53a9711c061 e9c9018f4b898a2be9aa0d053153cb7d8c8af22c
+1a08ad814e0d9ee5f719a39c4efe32a55b5fa1bcfc7fde7cb527b30e2fdcf33a 1b30c5d6f15d06aaf5e4edc55d33d440890416fc
+1a174438f39a3ef0bb9d11bc1532ba677dfd530d2c71429eff281102f8128793 3517bc697600fa61730369f35cd91da86e12d595
+1a372ad827add2ebf07d3508c8636f891bf9fa15d173b7299614d543fab4208f efa3c49e538c7d0724cbd9c32b24bbcde100b3cb
+1a6a20523216002f961c5b6b0e2b9f93fd002adee3fb48c0b038c4219dd46b35 5e78a5bc12d1dcd94751e36dff18badcfd9dc89d
+1aa24b7ebd910f39a676f2ccab8e9a79f14842c20b55ed18e3dc297bdbaca279 70957110ce446c4e250f865760fb3da513cdcc92
+1ab4fa663d22416f45cb1a007d767a58d0abf5255bf86f888393dae637b37c3b d0a44bd6ed0be21b725a96c0891bbc79bc1a540c
+1afe3af49295268534bff09062da89d993de8bf539031ae5b5deed8c74e2ed76 b371c056bb696430f0dfcef0d5e2bf62944ff323
+1b01b7b52d7ef909782114be3168d4c11d9125138c36dbec219de41bcc729c1b 7f7103b840176225a27d40ff95c541ecaf74bb59
+1b0218569c4ddcbca6d3c5793c5e822ec57ae0a1132ba51edb9131b68b361946 a916c9b256fe6e1c75540972d2c6ec07acd46384
+1b1b914f2ebd1179c06130fee875bbdb44fba22bcd879e460c8cd295854120c8 a0571e5b921af9cc8aeaf14688ee22fe9146371f
+1b4b74772bd83ff28bf44cda9be93f4afc2279623bb5b36c9194a660b7623c24 be3563ae3f795b2b4353bcce3a527ad0a4f7f644
+1b8fc08818cc6f44cc340576ad2f114f2b15e4f8bc4d306e86e97f65e2043eaa bd1a70b317032b45e10b9d24515905c86baa071a
+1bd6ab383a4cbd2611367ec21c4742326fbeead3ff912f194af0f853e7b63304 004393eb8ee7f51fc57f25ebfee55193d74b3b07
+1c24b0165ded9e7bd0c8848c667f0b08a8212496303aeddf741d5e0e4da3f81a ac04bdf6e0ee6bb4286343bc70d745146eb1e506
+1c34ba81c57a802a66d3026e14cce495dfd8263ba7a98233c4927a74e441aa3f 08d5d00056a7237bf6c60f85a6e72b7549cf9133
+1c4cfeabeb57c496034724e4649ab5acbff04788b6dbef87c50167e16e91b571 5a408036aa992bffa67a0000ddd163e45be5f457
+1c7bbd4852fde2f3dbb2990d329a20e76ddb3b2b570416e4c6ba5633972f67eb bbd29af5b49251be2a6498bd84b488bb4304ae96
+1cfb8ae71e9e576d1b16b7bd1a62156d0641c6e51f5d76877be6de4f26410623 b1bb1d888f0c5e19278536d49fa77db035fac7ae
+1d2005951bd5058f1b001eeac119a95f15ae052239a17e43180fe02624d1ee54 a77eac7c388ce4cc9da95c0c66f0be2416eb1197
+1d3847d94a4153fa5b4171642f366908c7613ae239f8135f47a38baf47812292 2cf16038b9c815d6c2be936c90f76049483af23f
+1d4b030078160a5498398766e70bf11699359798f01d47bed25d1883eed4c139 c0972c6411e01048c50c98361c50ab1969ef8bcd
+1d7bd64ed18b5ce0ef15a15ca1294e92e403b58fdc621382e4dd8125b736a203 ac8abfa28ae1dcb1ff4bcc297a7269ad64e8f486
+1dacd6409a61346885f7998a7b2abc74bd00a588d100800217a3732b55d7e027 1763ca88b7bda3bb7e98f1dca8d49bb9dfa3373b
+1dd44fb999c3043ff69a7d846378969eb6b425971eaa49d14628fdb85ce58345 c23841c833ab35d82b32553d0659e815859e6c01
+1de74dd7ee94c061dfcf5906456ad25ee317925d6f6545ed7e5c8deb4dc2ef1e 7c106af8cc957a256d2a9dccecbe6b974a49a9c9
+1df5ac46362cb6d1e92e3b62ab4833c8b9db62bf69faec2456b88eee8d1922e8 14599df1093c4dd512ad3d54892c03102f7aeaac
+1e0acf5db1f4a90ada03fc3df61f0196d3ea09f3c592de0a83f2cc6d5fbb15a2 9bffded46b22351f3c12eb5c020ae005e57cbc90
+1e0ce38d00e8f3e613febc0f8b275e0fd7fbef8af293fd62698be46dfbbc937d 8ec696a4734f16479d091bc70574d23dd9fe7443
+1e82caea1fba091c1795671232b6de19e3c9b18015bb66a158ad4728bfc8e0b1 8b2e33413c0e43bda8a98c5ef090561605a366ab
+1e8a2396a612e14b5a4a7f23ab5cfc15df6abbcc5ab6ff9c89a3788ab450f0dd 3cc606359d5ac5c869901d89d8f25cac348f4c98
+1e9c076a9357a539b2126c275c8774c961ab8bda2dd6cd37750ca969dac15d6b 2944c0cded94117886bb85e4e41f7d4a3a553245
+1eaafe5b4dff4769bcb95b0adc254d77016aa32c1acf1d765cf44fb85c5c8b4b e2ec61507666a29ef12e60eed443146f8431edad
+1eb53bfa2e681bf9a76be9dd3a9c2a5deff28be13d29b2f633f74f9281eab61b ccbb507cc3bb0c961c35d08c7a1d18009ac3bf64
+1ebb7c1f5a6a2f0151c4bbec3788d0d065bae1f0bcd152c9a3ee35b41e1db2b6 efaa4277c709be26d6d475927569d592db39b4dc
+1ed3f54cc02a9ca7528af4986af6870319d1f9ea1d2a2ac59c45cc75277c34f8 575cdc563801dcbef0ff667322c8d00176771516
+1ef82afd4f727427bf8d10690824f403713558c930ab46a90c2572e214bf7aff a9d70a87634c0932d8c03976c80467cc5de7522b
+1f6ea2cab887a2ff4bb1557a36dd6bac9931ef1f36794ddd22b4b7b7276051fb bff8618112330763327cfa6ce6e914db84f51ddf
+1f7bf17705d025c6ec01f2c3e48ac73674b061f4d33704527b12220d34fbb32f 81657de62397e72bf47229c7a0a27f0325ddb8ff
+1f8268dfb6d72ca7bb47bef89869a745d98b950af1dd62d716b70edf33850f33 c5e5c7d94109f5b26ebb69ffceb81f0530fde633
+1f9efce84e985329c26351dbdc81516bcdf02d1e5d64a92fe097b62f9fda8228 8601554dda0b46a69fda76189c126fef0aaf1ba2
+1ffe1f5d30a25e6517f439e1a05b59bca7ca16fa26870557901218e2b3cdbd7a 6b0b66190924ec57928b827412a75ca7643ecc97
+200f1e71b8c5655069f997534192616f9a3344ea45caf96b889cace34b547572 2ed634540823fb7131f54c5f1179c8ff1c59dbbf
+204b6601aea846e40b93e2859b47760350d0d29d2e100def2f89a4d9aeee4e00 58653f4e36c26ebc8e3622e8f3922773082cb328
+206acf23f3313f369c63f14e9d85276e95b0dbaa3cf271e9ab13f6b03b70979e 9cb1d49a7a94f9cb757f414ae46186f1bb36b839
+20ce0489de3716bd85f6b5787f155d53bfc81ba930bf4329ed57dbe4bd99a367 818d98c0665384ae6ef6f7bb0f8d4b0c34acf9b5
+20d7a7a6fda600c0c703114b07d8469a9d188dbdbf1fb3494ac72b2af899905c 09e1e12190d1de05ea714c98cedc81777eb40545
+211597b7b8ae016a314953731f661ce2fb4061ca2f867668fb6114f1b2693b3e 46b55d1d63bd191a9f364400bc1c9112349c5ee9
+21492c6dbc50134219f63a081f52e3aa674d90070674a43332eccd2f4fde17eb 97603e2d1760651b6749067ce3d980ccab9c715f
+214e2d61bdf436636b18c56a7ff55107de6315c85e7d60ab793607b173413a17 ae692bf0e91255fb9ad8393edfb73c6065eb82e8
+21824283eef83846585f59963be963b547ec08faedd27f5a994ef76281d0d2d9 f5a98ad911c9ffe375ce43fe23c1a3e4ef47e999
+21ac834dcd64c8c3759d851ed4ebd3a9121338d2a77c5ee0853046cf13f7bd4a 19c6a202cea3421fb72f7e4c4eb90fa35c391554
+21c3050b5f1069492acf40767ef180b24b7949a9928d7bf52e4278b53b64467e 4430a3812186c60d7a3cc7048f97a4e05f3048be
+21c709ef5ac66209b70aef877fd0c8bd77701fde29e7e6343eaae9cfea3ddc7f 7ce8cf840e9a4d86680c0c13788fb744636658f8
+21d1e21f58b5003ebc6c47526f1efc9834c4fd77df0b7c201bb0809c881d5ed9 b290b470aa40a42fc5b24a408ab9250443aed5da
+21e1e1ebe45b2c1ef79ab050334e36a8015a546f0740bea4505e10d81a946f61 7b4384978d2493e851f9cca7858815fac9b10980
+2252e803f7d4a9c197725e54f40d4d10272edaa05570832be4ff849ae4431fbc c6736542ff91f0d0c6b6a8ecf08eccd70f202cbb
+22a3c8f57f9465c979a96ae07e60850d2b19bda93021c982fb9dcef491bd9aa2 c863948af21d4a58a4daaf359f38881263b3568f
+22b6705b86e4aa9120eff203af24709d483698d9f78695e86e82de121784b570 dfae6ed8f6dd8acc3b40a31811ea316239223559
+22ba8f17bfeeb46d141280d030a87674e2be73e2360c6b60f0d925778a894cff 791826cd86946d8aed19ccdf7d7530da2023585d
+22c61fc7b3feb0f7cb851cfc5fb6a3d84f11a63a4a32d9f06bb6ac0a332f4888 a4af2dd790a63f6312e6916dd0881bfee2cb3201
+22da3f3c129409fa9d299e05428fec54d0a4e49e69400d6808d9caf21d3e7253 880aa99fe67ce18436b9d253ca15565e22423f15
+22ea84a1b29b0fcc3889c026a418eaf785cd2f87702b023045e60c76021203b5 d74679498086d0fc2293dceb59155c696b11b86c
+23380226b60b663254cf2334626a2918975dbe0029ded408c957de839706747e 6110c89446f2281e5db9b798a0fa020fad6e63e1
+233c055cc3c747f868b73686726307a307dcadbb562d3271007e4ad25520330e 1e00a3436acf0452f969a8394ceb4ffaaabae689
+2370e245ad47ad0b2c88ad121138fbe3b4931a7c9a5b2102f27eaffb5f09f892 05664605d827b3b2d88b6de331f0c39a4b9ac09e
+23715dc3ee50fd82c9eca67b6bdd7a51c4c65d7508e32096bb42e755489b01fd b3e8a0abbf795114ca87ef5e714d0d2f36b84f04
+238a501cf11a036f2f248008d88e14af624bb07fced6390997a0fa6abdad950a f1425cef211cc08caa31e7b545ffb232acb098c3
+23b010f4991fbff884638d5e894e14280a3f59b07749acc5c40a35d2f955fa92 40a7c27acc737f9efa912a66cbdd29d75bf44c74
+23b3583e5e642fb73f2f025263c7016caa285589bbd8ab905f7b87af6269c3b7 813b24636f71e0ebf9aaf9afbcad21518f4e1072
+23cb97c200205dc84109c248be5bd719c23bdab52b52c51ec92fef9a48790833 6fdccd49f442a7204399ca9b418f017322dbded8
+23cea2b49eed4993c5b92a9d5f0b82efe4fae3837ea707d921de645d04479015 b0fb7372f242233d1d35ce7d8e74d3990cbc5841
+2470dca53501f9587cae6103c471eecfc8089cadc68de24d72eaabb17da90f51 1ff4954e2b4c365a517362e7a9b285532a79e52c
+24893e425252bc0e02b5f056663284f32bd3db39f8ee746c54835db081369516 1a039633309bdb88eb5e6c46d1f8c2ade51f09e6
+24aea63796fb2d407b9f1c63d19dcfe927f7f26af79966636c957bdf7dff58a1 ebae795e1fd8502328b176c3f63a4320c91de800
+24b7406da6799c945658578a2cac92132d7ecb27d03655c05ca8a6eb5971cf9f 3e0fb8fb56426d4645a50ce85fead9ad93ce59ba
+2545649a60be2cd66432e449bb1e0ebe15a05bcc82b50292ed406464e4e66c92 1937579fc4f2bc5d813f3c8b77688b37829b394e
+25579ffadad7d6abcb2a12feb00a49c2160a35b6e2806adf77445a20e5a90b1a 4c64f551d91b63e8b58d08d9d0674e1fd59b2afd
+255a9457976612734498fea47aec5875822a07030bfb87462afb021e7caba0da 9db3e7f23c37f8764357828dfd6e9ea4a58365f5
+25648e64000f520ab94d539a63eb0fe4fe2a32306a70a9ae5b32444071f8df65 982cc52d0e7c0a9ece1606c37d6b8d00f682f471
+25a4efebb38c55b8f2309ce5e3116b2b9287239952cc2fa174074e05c6e5875a fe3a6a42c87ff1239370c741a265f3997add87c1
+26149bf1ac4612f24b532ae50a12b15f26aace3718749624f008bde68670352a b204707bbc546a1a770ef6ced37c7089cc3bfe6b
+263939ccfe22fbd0bc6475d50b830395233a3417bca1fe7d1e74c35e9292f723 116caa6ac8ce8e28cfd7d2eb29670554cba3a71b
+263d72fa5cd7aa029340ef5e0bc8c409aa33ff8d1f5a4054919799e16c4c6967 46d8b885bd65158e8cb53266ba4b627b5991bce8
+2643ed9ec1615eb7e3504de7e9365473464cc93211b953392894f4e262d9f55c ced645ea9ca4170bd75c17cb9c2c8f19f935491d
+265b89b438f5161c93ce2d8346739c1f0462bc9688a4d549e93f4c0b03093ff7 02283e8165fe86c4974c7082aa1c255fc07ae3e1
+269f91868728e97e447d745490b0e7418e8d1bb6cb8ee5d8e766e1ae9a559b62 28c77740506e6099df65d8c7d40f9800c9574068
+26a2dac21f8f0939566570e48f7f4fcf89239c2746ef8d3dbf31d179c691808f af3b99d5be330dbbce0b9250c3a5fb05911908cc
+2726a64752aeac8c0bf4921a99e722dde7cebe782428c471fbb8dad1b2784b63 9469a286a2240165c93b1940280a86802daa5f85
+27783ad60355fe63839b8ab4d1f4e74675d2da204757b708dff7038b02bce77f e71445c43ca0d573e2f61300e454ceee357624b4
+27a8b0bdddea1bad3b442452d2cd2178ad738d0a595153f52a61b0759ce6c2bc 1a4bb64d48619e2a1ef0106be89bba17768bff63
+27db440f99ec1ff5418253bd4f354807842fea54c31053e2064de6ed0a45638e 66108a6375b0a3572ea897ddcf4470534c6d4247
+28129011003ebf7100cd50ea6bb41f61d88db419df95564bf4252aa70771b7fd 1ce3f92bf1c7b10aa4c76d1fd51094641ef53cbc
+281c36286eab5e534f1c2121a4cf2cd48a32b3773a3e78df500bed3f3c9747f3 fda23b974899e7e1f938619099280bfda13bdca9
+282258be802767efbdf8c3ae693049d0dd652b161ed25c75b85568bc32931ad4 e0ed676cdefdc14fc274668b67ebb2be310fc2d6
+28772383fe514695504d51d0dcbaebb5af526f76b3e262ccf54fb3b6001a7768 209849a44961d4fb86fc51710affec6d8c407cf7
+28aec9a4450d9de98db98a021f97026bf12f1328f66e53319669eb5adce5ed3e 4f6eadeb08b9d0d1e8b1b3eac8a34940adf29a2d
+28d4103b9d69469f94bcc9b762b5ff31b05b404eea961bcebc14e320209d9563 540240e7bb85dff664406a35eaeb222890228c0b
+28fc5830291e38452b4b43c54c5d5a7613ccb39c4866de51b890b55cc35207cf 98fffeb8462945a9c9f19d6e8bd40470afea58e0
+290d84a2cf108c074d3764ca8dc56e1215a5a7482837f098dff7a55e23d89d5f 4f9339df943c53117a5fc8e86e2f38716ff3a668
+297b1f32141df100021efd1a47d8315833d19d47097fccb14c80c9217d8840d9 ca481fc4f12cec56b71bd50ae72e3f088b69021f
+29aee3837e46aab84222310330ff8fd255096d4a22be608ddf847df5053debea 3f61a75703b0430062d1908fc0e3e682cb8b95e7
+29af12bc8b8dfc24018ada712ee5727e1185bf8db62cf5a0b693ec59995ced37 a2e130b3f5a8978bbcb28cf5743d7672c5ea10a6
+29c3d5b0abae694f9694c2f7f63eb20b80de152886642e5d0f5282b4792cf84c 3e89665eb6d5ab75051dc59fc8b63316908b19d1
+29c86d618bdd9b53a1df6ec30dd246a221bc2670aef3319b6d688a1965a78e65 4141dd83e5a7b99c7f2fb295709e2ec5a66aecc8
+2a23921ccd2ac045bb0bea1a077d8834d23f2c5292284511cc2ab2380eb5925d 0395b97d1e2df4bc7cf46a9a82b753a8908157b0
+2a497c0a14d1f5cb4d497b659b5ca43d2abd353a35ee86aa5ebd22b79e5b48e8 abf5681c033e83f92198fdce8d30c799a6e42af4
+2a53e939a3578ca6e258a421658d15fc90a4bfd310f8c6b1dce41a26bb09e2bb 4730b7224276579fcc8fc7fdb9bf796ef158fde4
+2a6348df1ac5a449ad2de13641b2993f5707c5aa37ec0108bc02caca9d93c4c6 dd1a5b5b3b7a1e3abd956a0808675001ee06347e
+2a6e55b7502ae9e503aa71712eb38a7db4a400f3476d3c8c91b0de39bf4a050b 279d8e37642a9aa06a4aff44694ab7a6eb68a60a
+2a744551456986934ef43201eee6334a89b1ae4e4c919ee2f8f09f893a6a1c51 2cb51104bbd83bed39bc8a178ea172b234a3d55e
+2a7492a020b054d3af4f1c6ad11021a153198359f50989c9cb2d3a58d347fa8f 1a57ba73220bc222e2d290820bd9f4157c8a504e
+2a7adfdbe35f2b25328c964f8e40855b92eae773accd60a2e3aa1717b6b70341 a6a1a6fa11f7d0c989afae4695d4661514cda8c8
+2aa41eec6c80ed40eeb14896e1716f9439c6a5e99725168bef1f876d0e48ebd3 12b66564dafa01d8a13b8ecf53474b1d305ea771
+2abdec884f1cda652bc5132328df25b97083f3c0d4527dbae2aacdd789ee134c f31fd16adbc7a2165c0091c22e89e50811f95df9
+2af226bda5c9ca85442284f6c50145bc14e632bf62258127f56c7ae77d295771 40721f6b1297f2a48aeb5c9a3ac095767b1153bf
+2b3b4a4a848d85bc2993d0a7e3bb36e354b5053e7cb6165dac164bee2dd9712b fa19c3ef71b1ec077434b0e08bf0757ddbaa22ae
+2b59f9fbfad86c6d61e684b441eddac921c532c40dd645884be08058db3d7fcb 8cb3e7d4c2c5ae36a7ec398299007af302bab6a3
+2b72c9f2e8b8a2b0e041410a14d94e9374b1d8fbbaeba9dd02dad3995d5700d8 7c982100f3c7b81e576b552484d58470631f2cbe
+2b86b328af6dac7919c87c258ed08cc08fddfc033eb0c8c197c45165ef435219 b7058c66c000c55f92fc4ffd7274a16b41b196f8
+2bc0fd59c1b97b08b6018f1243a34a00e0aa32742ae2319c07ed5bdb3d9b4269 e5aedc0644f6be56bba890d932e552cf9e08e717
+2bcdebb6b95252485caa69957ca19c85b9c4f99ee36e4292a74c8505fb8158f1 158e2b76aef44441ab2bfd42ee69873822a4d67b
+2bd621e4518cfff39970c47c32f704838519c36d67380758666e19699ed387ea d54b77f23f9cf4f0016dca8ceadeed48b1ad5686
+2c045ed1bfe1436578328ce00e3d7b6cf2e80742ff260b5c2b524f2dccdf97c7 86897ebdca9adf45f7789399e9c4786d819e09f9
+2c0f52f9ae1f34f280dfc1c755cbfaf2b9968fd3bab1f1eb16d3ac0fafd71940 8fac94df3035405c2e60b3799153ce7c428af6b9
+2c2688f8f004501fa4917b31de04513365c6ccb796a9319862e0f6d8ced5dbfc 0e46b1d04f022804f08de3466b5cb6b91fd366c0
+2c97e388a515dd8871f47fee997fda7ddb7626f68fabe2e2dfbed0d9e5410f04 13ce9f1b96279187249d56cc641252ff617fa35a
+2c9b933ff2dabc5a043061d2aab80d967e41b01840b9790a87c981afde9bc0a6 a256495f5eb22ac2e5de21f37b22ae3c497b3580
+2cc2ff33694c392abbde2169365b575e662405af09624502d3e151d205d50c25 e6823108533f65740e0e5e75d0fc335e97439b75
+2cdcfa2499b832dbf7b855e5a7d210d538be9674dd2dc3ac301a21783eb7b333 c7f0591ff41fa0633796122d09212d3fc325b4d6
+2d22bd62fa3abdac2de06753deca74c77bd2f4a00df6014e0bba6507c076d6ba 3dd02e2850f34d7bcbfa3ccd4e909867dc89598b
+2d851572773ae43b2bb09543fea4f36091522c46c0a9c494bded5cb3d0f302e1 f82a8eb4cb20e88d1030fd10d89286215a715396
+2db6069c27ca4c08b784048644c307e17d0afe29b55f6488398cb59f13feb2f2 dbc0be625bed24b5d8f5d9a927484f2065d321af
+2dc5fcaaf371da4d552fdcbfb79da7a4cec2792c823c9bd09a90defaf73b437e 698d940f85a59f00286c49af24b390be7cd8466d
+2dd4d7ceabcce385003eaf8bdf8c53fbc262cc3dbc2041eabc72a7fa4b6ddf1f 0b8979fc62c435ff5b984d0c13ee42d7ac2e03dd
+2def5408c21e4c0611f22321783bf0d4c21f8a9006a3b6522cf295f493ec34f2 5de89cbd8c0a0c8bf4fc43938f09e58936b8c2c7
+2df3172408416389faa2bb43248e82a2220d09c9f4b56b1d2093286d9a53843e fb20a5a4b6185d9188d82c874db3d9729ef31f3b
+2dff3f4b2fe826157fc7c3fc1b4c9736259160f718bfb7fdb4892bed18378c60 856017fbf64464e3797689463e95d75496c0d554
+2e2aa456dbbb8889923eb6713672427854020298a764967c50235a9a76d7ce4b cf5f7235b9c9689b133f6ea12015720b411329bd
+2e51a5916d344edef37d84ade43e3b93524ed39456a7ea3054bbdbe06e2534b6 d4191884cffeb8b2481197c4c4b7dae933493174
+2e5fde11fa87cedb853bea73f5ebcc9ed34830584c5a7ef74f083916cdd4e900 e896d00181e2053cf3cf6441732a13f6ca83f104
+2e900cde6077a860354bc38e8ccade669cadf2cdfa60396a3071215c5d32cbe4 33a790ddf892b1b7922a6bf78e4362965c7fb51c
+2ea5535daa4731ac4a94a7551a891f08e3c6f29cc2a864be5b164652f2f53630 11f76e30c38265404b042b0a4347e86b66132713
+2ecc823b86990906263a4369e86108176e5971872da7307b73c46f4ac7ed8a38 9890c3f69ebe264206de411473f6220fe2f9627c
+2f18dee4a944014c0e20e1a96046373cd58710db5cc74b584ed7d96a324f998f 4188d28f1c38240392d896fc79561cc461fb12c0
+2f403b3668fc75cd5a4b4dc572dcba3769ddc02d13bdaa3e1c0a144e976aff0a 6586dbd5849fb1369f4719df685763ed9ba48d5b
+2f468a1542ddd517af3dd118fead80293c5c77790af57e351189155e96dedc24 7a2b79d3e2f273750e3855d7a0b15a4c6acaccd4
+2faffb9919a0b6717066117ee9f156a40371e8ba0eb585170188a65ec89a8082 ab5685026cc2b70c18e2c43689a57944eacf59ed
+30312e4b199c64d45ad2bc917e2ac5364ca8f8901adf7ebd1492b7adc21ba915 e412d5a411cf4e9cad80ff3fb315c42a7e718ea1
+304352ddad641770fcc94ee4d9f957cde7aaf4c107dbf8b5ba14d543640bf7dd d0e7959d4b95ffec6198df6f5a7ae259b23a5f50
+307109fcf8b70083d2fb902f2316b8a0f790c3d9f73f7870f4eb774b00bbf44d d8603ed901d4af4d0d2b493d1164c74eae34f147
+31138d44b7d0bdc213b18a0845bd56025bd976cdbc1fc323901e9c50238b30e6 81723c22eae0570f3774ac588b572636f34a7467
+312f60f6c352b8c7367e976ec359c92196d0b17d491066d47279d4e1e2f44cad efa59b726a6d367badc5c39d83e86a1664616da2
+31ae8919eaf87822e8d11a589c35fee500b0d9ca51d0548c2bdb99d4fb299310 7c6be4f3fc4d952d4eab59ba2e553c6b77725bfa
+31b05c73b9305a342be592d83d59408dcd54a5adc94f0da7fb6dba61acc2929f e719ec29cf9da6022610b46b463b80d393d22778
+31cbc27193bede4e2ff534542aa46c1a8ed7c4d2f5e9c9e462bb99d73e5f7691 c27b446edd6db301478ee29880aaabfe2bb66539
+31d5e6deb4c8fb548582ca4d37fd37f2605231277340f5b402fd64904c542ebf 5e8220f46ca2e7002bba745d8c0708622c64150f
+31e01e45015260b88c5131254e3a3f72df292442143d2ae03224d61aa5177c24 8ea17a2c5a5bbf0f5aa72f73e6f980136d72e6b5
+31fccc3f5f0b0e514673895b4aba0dc2a54b7bf1441abe8c41b348ac997c5566 79038fb3d450dd7b37328281a717f275cb7eb7e0
+32ec9339b53b2bdc73e027642a1c990d3ada79a168de1cbcea2afd29fedc9709 027a51a064c6a3d91392f31f32b041bb1920ec60
+3302d4fbb5614b19c697d3f3bcae7ff785944cebcb095ceb418ae601dacfd986 75e6d95a87b9c6a5683a6f4b56fbfc9ae6e53a7e
+33139bd70082e3948104945187410076178d57d31dd2b50542b9e2b321e85776 e65ddb38019b6e2c268f8ab9c28eb19bb162b032
+3315093132a8f28bd202c0a9562d04eebea4943dcd1e1c754341b0389722042f cfe3a027ab12506d4144ee8a35669ae8fc4b7ab1
+3317ced38dfcc6285ecd4187b6fda9e9027cd26fe11a4a81e537e770a892745b 39c222290d1392e028478037e250bfd215635cb1
+332d62e05adc040df538a64bb4cdaa02cf5bcc83fc8a0c3a19081be7956fe1dc aa0c0f471d53ead366e80077a9fc82649edbb4bc
+335633f31770ec3147c2fa9305b5eb1fe95372bb00fc07b8f5a28d0aa40e9769 bb61d8117a8cae026fe4061e15c29a96aea3496e
+3366326706d1691a8e07d043d23df3a4a96945bf9377cbe95d4ca9e695ae34bc be876eda8beabd473360e2dbd1a2ae5e80f6455e
+3381a5bc62348132331d43b4c62f99c69e9d927072eb35fab9f10b9911d805de 15595ebcc29767ee05eb33adb216fc2e92af85f4
+338aa6b9127d19d369e1973f72e10306d02fae93bbefe85e40160dc40417db80 7aa92d44ad52b314e335fa1aa45096ebf284cc30
+33a9bfeba76f77472d80e57af9f6362744595f3dec1fb9e011446ccc43f0db0b 5d7f65df66f2bc9f3581ecb1a7932b31b8c98aa1
+33cba02acdd63428702757d61751c0dc47d51b011ba0f006774a2347763c5dd1 089c2d931b6b68dd82527430da51881d23bbd9a6
+33e415b835a670bb5c3c760efa0433ac0cbd2d44679f68f2df3a9ae7014cf2a8 1385f264afb75a56a5bec74243be9b367ba4ca08
+3447c9eb6bbfce8c4048e647e17d5c170564bb373efbafa65e3f2c64f56bd7f1 5dddf7c855f9c8e43954a99a6f85c098dfc7ed41
+345d2fbf1d306c7ea46a05f497793308357e9e17ab0e866446d2b9894378ddce d0d7e736e536a41bcb885005f8bf258c61cad682
+34e4e17c4c3b2175b0c8eff812e9c3c6bc689829b435c0f529cd73a69cdd7f2b 20c4a63e8cd8a70bc0f894ada6a54afbdefffadf
+34f79ad1c813b93d2ee11c830c2134815a31d9629e6aa9773338fedaab90976b 849a5e34a26815e821f865b8479f5815a47af0fe
+35511d2821ee472ed03f36d2e481f6d1d47a85d03ef56996b67f43b401e2732b 7a750b897cf8d5321db7b7f8a06e7d098b13a74b
+3576c3885a36e2e498004c5eb560a8b98ddb87778d2680aa24bf12c2a34a8870 e8d0c5322cff755bc73d89db95334482f920ccdd
+35f9aa36440bb182dd897a1a2c212fc1dc45e17ffd5cac859c87ec4ded0a36da 698b078c75c911b8361318db385d70cc84543a13
+3609a41c0506fe19d01fb8b4729923362675f191fe5f63fab3111ef804c48fdf ed1ea164cdbe3c4b200fb4fa19861ea90eaee222
+3612a2a9b865800bd6450c6cf21330676dadf843a578eb12d2e6cc6092ba3eb5 088a731f00a39fb3158dc9150b7c8d176df51867
+3612a2cc30e97df2d2bc86ec0aa57d7f332642cdc370d2b0df18eaa6a53bf220 0474870ab94adafa0bfca2fe128d6ea7fa2f3c99
+36693b61b675ecfe1babc324bbcef2e01bee0275b422152cd8c48593555d27ec a57e9a8cc15b61ae1ab908b362fd829b3e36e513
+3669ab580ce27ccc1dea9e89c70fdc98d0853d961dbac4dd0d56130f1784ac12 0bfeb8244a6a16625a0b6df594118e041f16a185
+36809d2768524a8d74cb2513e3f0e4d07e765b54230f7dcdde40298fe58a90e5 e3059f59ca36951d3817675131aad82c626c6d97
+3682fbc67dccfd36dc615ba17e3ade5fb7f1dcd6ebb425104317593be72e529f da5f70ee04085d85be124739bacefe69e829c0e1
+3699821b431131e6a684f5faa9e940a1097dd276bc5fd41e6a9f9424b442fbf2 098db3d369e28b5e5355db956df3fb45241f4feb
+36d63bb74fd24718c0d6113c70db5bc718357bf0a9b336dd23e0a08a51fdfe6a 4275617b02912a72f62ca7d2a1b8f22602af4de5
+36eac24505d4c4405864ccf2f30d79af178374166daeceefbf11e2f058d30d60 270b8ea76056d5cad83af921837702d3e3c2924d
+36eba302d2fb99d0b1c79bcec1198f1cbba6cc8c804a19d3bf2bd3883e5d9fbd 4e0d6d864d3632a820d8bf3dd89ff333b9bbd34d
+37113624744ef096dff48983ffb612b765818092c6b30fc0756f22050e9c9cdd 03c3f39467c727707a5522e6ecdb4fd2ef09f8b1
+3740df04c191176e7dcfb8ffc9eaa32a49474fad69a959fd03a1234ea1e5dae0 5b209c9654c83719b07d9fc1d2287ca361663fe1
+375f69d3d41e36d6904bfa86221690ec49de2a030664a362abaf86c426f9f7e0 df48000ac4f48570054e3a71a81916357997b680
+37930b649e0a232d9d5068e3eca85924117dd83095ee0855e2e9524fe227ab30 864af6d01aff80a76f16241ceb82c74d9df49e34
+37a3d0dc04bf341eba75c9a147cda7995d68a8f9ff1c7a43871b9c7a7e3a9ff8 e24efbdd0d24660b10a736020ecbb98453bcd99c
+37c7c3d1205434567f6127eb53c246e5760f03742e2157813c5809152d461491 f15b75039d7d4db8e989b85fc085e6f1412ea318
+37efd2fcbb9d39295e0c1521d7a4c53b9be48cc20028ebb1718aaff90149ab2a 7e78a9c8d5aba74a0c85d77ef590a9a9a6426bbb
+37fd90d6abe96a2b664d80443bc426a3d47ab5d60c68e06b29bb32b82c9c702c c0d11745152c0a3bd8bd0e94a8996ac952604ab4
+38245b6deef0fde5656f71d86a9d89a86886d42298e46ed740756281cc07ca18 4638c830017efa737b74da9e55236bd515ac569d
+3829e422229d9c5b4bc01df9388483e29b4e52935c4cf4c531904edf80f012b7 375649f879c2d828c5a10ab61992e5d84c016dbe
+384d76a2f80b78ad569d3619586c957e6dff985e2fadfcc99f2f58e4f1690be1 9e2cd50ab5fa56644adcaa13bef9e3dfc7bf8cee
+389af1fc5e97b1e7d9cb01b1e387b08862e26d67c3650788f51b8714c9f5fd6e 60f4720d8ef4cbbd09f7f9ad8e41bd77b4814cb8
+38ba5ee9660e8ec8b261e2edb1441987798bdaa4f19d478241a76df16b88d0e5 dea66ba25c0b724e0dbfdf494d50f7f3f2ca780b
+39bf1ac28cc3f8432ba7cfeeca6bfffd9a0fe641784db85de2eb0f57b7553869 b6361fc6a97178d8fc8639fdeed71c775ab52593
+3a0a4805f179ea4e115d542497fc755a2c1ea5792853609a25b26b299553df6d 684a1d3d44cbbc86381f61d4d9305012799d9f5d
+3a0cd33a47fcd0c7b8f8c1d407aaa53f648e25f2ffe2533a7e9c09c3d1b9da75 2f9b6b6e3d9250ba09360734aa47973a993b59d1
+3a103fcd415b1565358ec83f4341844d2b4cb68e1db409778a7604cc47ee8663 92ff6464177928722632f05a3083dfd9c5dcf47a
+3a1b33e58ce33cb9658a2ed1cb6215a4120f4d8d066cb7f4c5979db9070fa59a 1fcdf832d88aaf0f7abe480f5636d0cea10aa109
+3a32ac3a0452f13635a41fbef02879bffb3733491b4b791fc1766b6f208acb59 3a612bc5fb913bcd8dd90fc3042f23882d626a91
+3a3735b8a28278539697e5f6af5c45670d526fb7538ff1594e99df6331c382b4 495eefc6e0986083b95f87974942afebde688173
+3a70044491dcb883ea825b2e299c512f1877761862d5568028f7ac185cf38604 17e194d81de579d956587ed7411eeb77f88df277
+3aae8af9b31d378f55fe8390becba6e9d7a4cc07c2df45fad2289083bcc090cc 12dcefefdbc9972cf851906ca5c8e8fea46d1fcc
+3ab0a48f387c62d22abef3b52bab7bc7e41a3bce649e573912d0de4c79b68af4 0aaf8708b0f67ed9b99f1c1e2fd28492a671123d
+3b1b991ae70d1f5388ad16b63d2285e99ada7a618c6f5d01e50a6d4b33c4767d 2f06098183b0d7be350acbe39cdbaccff2df0c4a
+3b58565ee067f13349cd4f89aa396d10f71c69e168d5c48ea23de59734ec3ab1 f0a2a10243ca64f935dbe3dccb89ec8bf16bdace
+3b76cee4a13d688c4c7f83c2394d6a0b3908fb4289d917c439431d85e53e08d6 b3e014dd4810983396c9ab09edc7be1e0ed1ff51
+3b80aefa5801cc70308cfbb6300e7e04f9eeaae97703e0ced39d05f6ccb3a552 a74605e0562a64dd538a56a3f29ea85322f4220b
+3bb429f2e42b885e937592255fa2da4014dcdc63fadfcf62413f0660f438a85f 79ca2edcd4e7a801400fa33c2c705b8f03a5d7f5
+3bba055be795e5d49a89496f0219ea2f43cd9eb6cb084669eae97dc69bfeb459 a7f70745f85f445596125cae6e357e84b84cb925
+3bcdf0dbf3cf72b38fd65d0dbd8d6c6c4d9e3ddbf3916f03e1e6e4de72785c77 20d191c80cedbcc63ed52096b8b0e180c6bc16b1
+3bf9e14c7f197bfefdff9d52063713de4bff0b857f53b799db0f4050bd62d3c5 52f3dfe9b5593c9dd45980c36e2499f2e9de701d
+3c75c9f9f003694aaaff66b2efb4932dfb0216bb85d6ba5500d6f4a05e92b0b5 eeae5bdbc9a3075ff9ee6a08af804b5df11154ec
+3c96c1697a81679472afac3dd2723abe86f34f50cb2804eece8b0c942b3a6d9c d4d88ab7e48adcc92099c41b7a5e85d580f9d77f
+3cb25d62ced555f8409804796b32e06540c096ef858ad45c864f31503dbd4982 e3409fb59571d2eabd07d4d7c09a0fcf07b6cc5e
+3ccee1f77ce4b4db6e6ec7162538efcaf479f3ddd950ada7ac800abe7e9661d3 fe3c74b75812f161cf1838602ad7567143bcb593
+3ce006ae57f23548f85a5527e5cfd9ab29ae42aa1ba90057a807346404f8174f 94f7fb59f74edb08d375562d1814645dbe7ffcf2
+3d14ff2d57c0186871a99a497966bbdcd17e61c41739cbeb860efb0f7be31c18 dc5b2ce5d1c4c9c38b94af511ba60946b8761681
+3d45b4ff158011774b796fe55f7041f932df6dfdaaac2dee934a0b6f2a2e5d4f 8b049129be2405e428a3bae21ea9b99387a96afc
+3d47ad957bcd83e6603d706016af1b6158878b32c902fbc86d28918d640feb0c d490452617988fed2ef9cc3ff667396532426903
+3d8632d47f3f70b96b9391e692c79b6237506bf999a012e50c1c3b15998748c5 7fb15ecd2e65e379b6f3af1f25be0024c0be27ad
+3d8a6f490eba51281c43d4b67e0336a2947896a4bfaac3c0449a7dfc84411128 1e4ac7e37cb4d50c35b7a52202c646a81e5c3dac
+3dbaa90e18232adedec438665cb022c35cb97c999ede79097d3ba17b1810df0b ce4344fa507b0c6330a3559850c9cd186d1b052d
+3dbc65bd993e6e700790c5c51ff0e0027b55f55699293e73fcda7c5e53a8a3a8 1b6dfa9817a8f324f234f0f31cdc79c016b40264
+3de437349b8b47ba5cd83d5f70956594de271cda393792922fb2416e3f327f5a b7b0d0ed2d91c83b59914db77c3dbc34e36e2c0a
+3e00d8cae2726dc33879adf876b30c306f50e7a85b15c8add4a27f84d88616d7 1088490171d9b984d68b8b9be9ca003f4eafff59
+3e24bd404d914a9195b89466b1801a0bce6e55fec958ca7ca9a778a08fae6fa2 010f258ae4bf72c23d01e8902d7f5dc8e4533ab1
+3e29ebc6f1b56a649256d7c35fc227c530f1477638fcc68981b3626e49746928 ac7d251b493d022de34162880d30392aaf88cd3c
+3e5411e6190b46bd834ffe79f2bff3fe5a9f99ff2d4b5520bfe84cb22e295b38 6624a3e24af09a12acd9b5b98c3109fca580410e
+3e9c52a7e147ac9dc1a9e23ed7193642e108276f5e74397201c630bc1dcf20d8 c8df0297553b2e8c273ced67b3bd3d1603c9d4c7
+3eab74a6894d790767f3d92615a6887dcccaffa9e48fdd2ce482b5f17efcf9b9 111d5ccf0bb010c4e8d7af3eedfa12ef4c5e265b
+3ebff01bceb09f6f4e2a24596d6e281587981dde381be64240283c0d161e753b 64c993e1ed74492bfe41ddfaa8e5f7999b5b3952
+3ec0a36347125293ae217e7d4049dbda22951ff9cd0d5207118f6e963a7428d5 60ea5e87d97ab72853fe358b4de61a68ca7a3908
+3eee10d9f6089f9d03d64c65b9aea882217f833ed9538e7dc49c2ff73ec9e41d 0ccf3c2464ea829a6320156b5ee131337898f2cd
+3ef82d40c8f2f25a1f20d1e459d083eba406bad227af5881c6fe97aec74ca7ab a0b61b552c08fb538365870b3ff49d936a46c21a
+3f0764d48b89e7d99138b291b09ec88b9132fab0a60de5b6505ff9d9b383e843 8e9e423eddd73420ca4b824f54211208f33628c6
+3f429bf36329d28d40103a6b1813f92b8322bdffb7bd5943cea40569196e6838 eccaf6f8e31a3c87b89243153770455805ed4c1d
+3f5dca26a2f512d6681ce1957b8afba5e031bf63d52fd52d8f57093bf92391a4 7033f9ee0e52b08cb5679cd49b7b7999eaf9eaf8
+3f7fdefa5ab3f52b546c3cf59cd50d61c29efbe4a2c40b1d5ab8e50ef34fa398 3aed57726754bd5c09bcd425d9b99add5db50a78
+3f838c3c9c70ea829eb28dcb763341b8c730131251979eb1f60ed6819f6a500f ff02f4077fc8420d328c8b91c1f5b2e71a7c19c8
+3f881332ff93d2176b18dcd38c990146ff160b3eb83a262bc77462edbc246a32 66ce77617726f19d295e56cf7de330c848325646
+3f933cd9565bcc7b8be630d5626c9dede75c7aeca14473b2bc2b88d26417c7f8 29f0e90ff41bd7079d3e620e15370e3a8385884f
+3fb315ae00172e2f6cffb933843a407277ea426015fa6224865a7c63ecc37d8f 2dbdb824f0cfbf5f583e6b94aec753f276ed3368
+3fdd086cf7ac8ab728ff01b763ad65b9d1b7122580d88aee652b8ced232647fc 175396917d98ba13e5bc959bc3dc237cdd492036
+3fe6ac134c9e29c44bef2dbd0b11718e203347e4b867cecdedc20e3466bd9896 69dca959508cd04b226b3747c0c07f89f3bd1a87
+3feda025daa440402e3c020cd88a0e9378dd2442e55ed409c466376d5b424730 ea790f337b0e401f5e4acabf9af9c2bc756d5f3b
+40154096dfe3b0b1abf64230345d327bfb530fdc2eea093d407bc245a94cd71f d15e94c0d4eb0fe06dd1e25d7e9e3c4940417f56
+402b3758191ee821d652dc759baf30a8949a66e3b7d073e7e79d91c053a7207e caebc63b34886497fa2b6ed9814a327d3c91e545
+404b795df44dc8a0830397f7598ed7383ffc5c227c2c8a2223bcf9cac3e6a4cf cb98fecad0c4379496f32a3f7ce3aea2ca553b3a
+4066249c68b0d3c8b39ebe02c9188935900465acad02a49269710f56720fa58e d0fdf2dcff2f548952eec536ccc6d266550041bc
+4071ba3d3cd2494d4951a322550a934507c44cc7278c90d5f7458c512407fc8c e58c5633474c35eb16f9dec209d57aaf881b97cc
+40799f33b8cd9ca41f36a2f89d8ac8550537ad01dfb21fbc76f01eeb62f512d4 bfaf8c42eb8842abe206179fee864cfba87e3ca9
+40c6785bdf24b49d3b75f3f1f918dcdff55b2a001b66afd0a411b3e8439c9066 979709bdbc7b1c91505138e1aeab9f8b714480ed
+410cbca5119f2d6f16c3e42b52d56148d5f72d45679c92ffa3b6d9a2edb756ce 80176fc970e2964677967ca1a2a3689364513593
+4187fa8d107c1c86d8615ef4712f1f7c64829749a52a1e68c715ad9a531a6e2e 33f0f5ce19ce81d7d32752b140dd9f5871d72eca
+41aa03e11a4af5047dceb683d7a03cdeeb904c85f8a58464c99709defc5c0301 c45579ca160b99e14290db789f3c690c406b6dc0
+41b613b0200cd70a7f5f0dd85a98cff80cf770d2b69e3a270fda0ed2ea9e3577 4a9c7f5656c7c53f5172e16174b96ab44606de35
+41c166c241a4e878f444932a193501e12ab38ba0634747291df70e619dccee1c 3188ffdbb3a3d52e0f78f30c484533899224436e
+41ddb608f05a0551ca421a4c6031f9f0b0d1c165d8268462155614a741db2f50 ec66baf57304fbc94d8b1bf55a6264b6a34c5972
+41f0c76d526a391e6642bf1724a2f32c926d1d10262aad6183d7cacade456c87 cc7301d8a23a16789de6d298a6b1d2ad7c686184
+42582993ace8a3488078298b40b08e2e48bf576ab05b1bd36bb4884a9ce853d4 6add857acd3537b186d2c8d2c0e3027c364872c9
+426317ab5167d24de98d3d49614d713fa8e5ba435e1d9600c3b95d2fe9f2d785 f3489977f6f6d5839be9f17118bb723fbac74a89
+4277a22c721ffe0b89f6fad5e7779f6fe80a708bc471ab49bba329d41d5843ad b1bdce4f69d6893727df16ed00fed96d701fac06
+432fa95d99227269dcc7298e892e53873ae8b6a283041bab4febeb298fd3ae10 eda57c53e981161ad7cb25103fbccb31661181e5
+43630957599e6247ff790ed2a0021c6dd072687ea8952d64b767251f79135d42 53d25eef40016eb27787814df58e0b56e76d9326
+43723656763f3659a5e094a87df27c5b43d270840870dbe1734142e2a9466d7b 1711eef6e71be6d243016b5e138766b3777e08ef
+43989c902407cb7bc3753f4338f4847b21f53f49c4e9f750cb866507b64ab669 b438016ecda7648426036e66c4ed17fc93e71cfa
+43e084a4599ca42c476919917e3db8fde0045ee66305fd5e634b0c793c536a1b 4a202b346bb0fb0db7eff3cffeb3c70babbd2045
+43f15e413a5b988bfff18d10d4b3bd546b13084560e0a723f4500fc094e13558 783257d3b6a3279dc62d194bea3b7f301a899351
+43fc14cd889029d5ad6e285b60f162e73c9576d49068607e879a2a0e5127fa5a 44b6a517f15303e5ca4cadb090c2ae47cbdf0c68
+441eb4d681a9c013e67255dd2fa2fd722863bccb7fa9d9a9230b7aaf5f107ae0 47b0273228dd08a6ce617f8f3ab2092a2d4dca57
+443f41124cbcc448cff03bf4ed757ad88a5f5b711f761764bf37c64f7e900869 608d33fa676aab1ed350312cc07e02cd7f94847d
+4481293fc62420e43723b5402eb6ad4042f5f2951f9c9413c4ac3235edd4553a 08167bdf6e553be1acfce09de11aa69b1c3a807e
+44be0bb4fa20d53c8b321492e98794e9054b66ea200d626b9d9f8c990344b32a a41bae0b8aab4991d9d4bf9cddbaac3c6f38ef9e
+44c505e4121cbe40d889b39082f5bb700ccae8e93019335df7242e6c84f8e2dd 13b8725687aa88dbac7a9a34865984d6fa68dbbf
+44db3dd46bf12039f93ff4752baebc137f2f638089fb0e1a217c99528c3602d4 9fd8412e652899d03576190cbafe0ae194357827
+4516b0e63349c81abc6584cb11ce84ab8ba38b105f9de39d0d0a1455dba2478d dff79e27d3d2cdc09790ded80fe2ea8ff5d61034
+45b27cc016ef3dfa31290c1e564c82266dfd4e626d65c10e4b84717f59acaef6 76f293894f4ca1846f52513b420dd68bcb8da127
+460ad78c6b885a65e795a6ac9a4c85d5a6083b49f2a168cf14701b1aac7ab51e ad9f7df6bcf1b6e69be44c85641380848eea36b3
+461f1d5cecafb15ce791d599ac2114b5cd320cefeaebb90732970655e6f85050 aee8b26e6322bee55403a61634d7e01b77aea4c1
+46333d32b3801cf11d9f80b557245c9e32b0e05deca61dae968914fde159f0e5 0cfd861bd547b6520d1fc2e190e8359e0a9c9b90
+46698c7215f6b45759d9cc387e8d3121ee1ebaac4330cc1e1f38358b5d67b973 9bd5c5f028c505f9777c63ea85c5399bcb9cbfb8
+466cdfec4c74f3ed4fe53165e468a52df5dff9c6533ec433cdf235a73e099d32 5052bf355d9f8c52446561a39733a8767bf31e37
+4686fa9fcfbd200774f6b6e55dd719a3eea3da7933217c7da0efd14fa9fc3242 ed2292c12cde99459c5859362b45712deb1d5136
+46cf6ef7c306ad8d79ae690f643ffbda6d1cc3481e46f4202a166c6dd141cfb3 d3b23e08fe7235ea387b45453424409fb54ab7f4
+46fe85670f28bcacc7894ef9227f4816ff018994a67425ca92ca71f58f57c5a1 f5607b58a0364fa99eb1bab8e1c06fd948cc701b
+471b08f85206aaa22b74d87e57de5caf02fca30587512ffc81bbf32d63e9915d 58a948216a0b01a66b21ab7a2116adfd536cf922
+471fa4fc2da467dd94e57babb1912bbdb5e40b96c8129d46fc709c0bfc009bca b0a8568a7614806378a54db5706ee3b06ae58693
+473a0f4c3be8a93681a267e3b1e9a7dcda1185436fe141f7749120a303721813 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
+477a19a87cb58e25978dc3302ae5f089d4e4997257fa09e259f2f03ffc5572e4 c5bf0cd945f7bb251ab2d30ecec98e982bbeb49c
+47f06c894892f592fde64369a0850fd5d7b78d0e3ef825f66a064acf6781fa9e b923f2f97dc26e981c18da93b98bd5e7b44c3b79
+4815816fa5a372f9391088eb904b85bcd83b0f5117772b597691dc43fbf5bced 5df58dda56789631c78aeed62708e1b694440195
+48206be797f7ae1a97312fbc167d2f1d68a7a739844105ee0829635ad3db5001 5cb9d1b563afb84d201d9cfc98aa774d7c714266
+489243ccce2df9992af678d0bac3bbe47d19de6cf9577e4e993e036efb0b194a e6b63299b2cbc04ba8720f77425cb58c7774d4aa
+4892b87dbc8972e6de31028fdef2e8ef01f4adadb782e61e2995424a4e660c1b 55ea3a1ed6a61ba508ad6f9e8b70169fbd7746a4
+48d25469668795d0d0fcaa9964a1c7555b750a8d700869d5d8cd466b1f3b0881 2434915bce998e8aec539a19419f2c50f26fa6f9
+48fc94b3d4233d194db85973d6028ef5da29aa21aed20f8096539b837fdb9cbb 171aaf21d9f7582270c390962f61d3d2613c4d59
+49235ddeecf412d250153a630dd1372fa0ea2953f64edf66f9cc712c4e003504 41e13b227932a121b8971909081382da4236d674
+494fc3881f4dd0afeb9c67b9d03ee0a7bfbdc344db53d35ca91b23b27b8a25b1 8a208841484daebf2dc98866e6d2e44bd9467cf7
+49818c2e41a63cac45e51f99834d583c2623c48a2add67395238eb16609c7f43 d90233146d40105f042773fce6917fa4687b94a1
+4981f3f393dad6299538f859bfc10bfd1a46e6c1a76991a35f66c4a63563bf74 42fd40db68e5e5797531dc1f5de7aef39a2262c0
+49a226f8527a921c15864067e049ef18fe0e56672cd9be551eb1ac520cc2fbe0 29d1016d5fd281f10d5fd8183fd8bd2f1aa37121
+49d34d8e410e2bc0d4e83f55f013feff99a8412092b44fe18c388e2cb61539d9 01ef4fad010ce3b90426982172b2d93a9409797a
+49d6ca3fd96a83a837867c38d32bebffa599cd8f0e1442ec38f9881b33184f78 a1d34bc000cee6d72c3b5e329faa58424641611f
+49ea7b53ee934be208c963260e61d8939898040d12b4e1c166222b5a7400eb42 0ef9d2aa934d6e5861206e8c5dd829dc09f4026a
+49f1fcadf4ffce148c8dc15c655c325b0c52315f3e093ca5e60184b826f1d575 9b17380391d7e2e4cc26654ee4423ec14d379d28
+49f7c79a7b31b51b469de45d980e77ecb6540a138121dd60bdf399d0000db2da 29e77b4c60769b427a0cebf6573bcbe3b8779bec
+4a1b9c078e7bb20759a2d75e3a4b96827c851446c0261750b96aa5f286efe378 cf33ac7a3d8b2b8f6bb266518aadbf59de397608
+4a2c51c855f0dae37a9d35532cca06e82c6c00e1e35cdd5a1294ea79a0c89b8d 8b9579b77d705268991880156c59a6ecf3a00e32
+4a4ebb837e3c9883f35d0ecdc26d4bc76a0f665568b08f3e967096f2fd3fa537 502acd164fb115768d723144da2e7bb5a24891bb
+4a7732457b004efb34e8eb1405a9a26f66d28866d8f043ba3d732b4a640174bd 150bce88353a5b322b1600a5989e126cf8288562
+4a98d245f29b382f3bcfe34639530bb5d04f6d5074d9c22359b6c8a1d5b25540 1dd35dc8e28b539e6b2e15ea2a99d43ee4d2f282
+4ab6132f0fb323c66309c552e3d84cbe8a374258ac42bb51b727e02d881b04df 007e075337848055a92e218bdfe137451a4c9635
+4ac0a355c8c8c1d9f943292761fcbaf0f9a342b6dafa1ece1145903e2a07ab44 75d584305598407be4c53d42c85eca3cd58c973c
+4ae0fd2cd8725f4c1af5517529f28e608f1dae886966739d3a6889b8722e71a1 bde6fd7aa4ede6f79d41fa5be13567d12388c79c
+4ae3f76027b14d13e85f0f5498a4a697583940df57ac8733aa56d82900112a80 ec250c6e18e56d12714f9010e1b15e5feec5f473
+4ba2e6fe88717d069f04f6504a12052b38307bb7d50adf36b19152f50b533082 4a869a273478d93810045203fa44e2404d0e32a2
+4bb30c70803cdc8f5945d4f61437010efb53e992301ed4f406b0706d0edd26c8 3f84b7d30bcee174491ff0015816fe8831b1440a
+4bc0f94102287f8e84de5459edd04872cdb10a27652c49499a9689fa073566ed a6a793147da3bbdf15931e03128af729b5d0c4bb
+4bc142808884e472ee6cc331b132e66ef18f564d41efb055804ec1dd28efb3f5 a71586c1dfe8a71c6cbf6c129f404c5642ff31bd
+4bdc2bd639e67ab657405823281a1f4e8185eecbb81a4942278212d1fd47d941 4b09c08aefb8298b3ef03691eb8b4970ecadb1a3
+4bf5c64f79284904a0c0d54bbd380a63b7c7be4ded56619ac7aba0ac763345b1 d25c9bb2bf4c052f41ead5328a068f6828d75ba2
+4bff6d41212764361eba5a8167bc0168cb027f50724f3c53e00e2c435c92fd06 46f4e377719b3df0279e66f4d8d7677c7fa16dd2
+4c288bf404c8e93868ae54b4a9e93124c56c1c61184466629d03310065031e88 388e9c621a9deb2180cd601e30a540cdbd310b53
+4c989a75733680cdbe9068f0896f30aba0cb9c8cd4334e349dd815a2e6ae6b7c ae3a1615a8ab6b9a13ef98fb3f60efe727615310
+4ca78a50e220f784d9f0d792184efb85d2e78ca1bc8aa01713c794cb099c0cee c79dded300f279a6d8660b13f4fca3c684533449
+4cb34795575974e851198c515d39f43c8482c0f82f39518e7ea31b862168a6c5 ff5f93335a52245a405e12e9ad1091f4cb875b5a
+4cd983d076e60b69cf7cc6c645f66eba7df5032d271c9ee95d74193b8e3dcc79 795f44a7d7e1728199aa9ecacf35a55d3722e06c
+4ceb14f374b242ce6b94a527429bf46799f37071e59d43add03c79cc3f78f7ea 04e8824004970f6889b9df126b5db343013c82c9
+4d068ba9c35443df0a7723e96ec1eb1b0c86dafd4b6892a93491a5d818d944ad 98f3b5407694b1977ed2b4fe548831916e788ab8
+4d400cf49a7d61e1829d382168d34818c10f174e6141909e6f253142c48bc725 62496552534d8c5a4fc1839c20c33b0de4ba2b9b
+4d46d9719e425ef2dfb5bfba098d0b62e21b2b92d0731892eef70db0870e3744 e90810b8df3e80c413d903f631643c716887138d
+4d95fd7a1a738b7b73ff5b0c595d8953497404cb61a91b787ea266450bacb2ce 1d1be8ee22a69ad37b6cab510bf5f480dc6df779
+4dd37b9df07bcc7b45ce72a44e3f5fcaf5f0a9a5f3148963714eac4c99a60388 d03f567593f346a1ca96a57f8191def098d126e3
+4de260deee1620a10ad5f497cd446e3c6bea110a5baf5b82fc510bc6ce5074f1 c620f25d7fb92598b819001c8265d0d324275546
+4df8ed86acaac5dc82b5652170996ce459d39e3a441e9759b635b0bc4ecc43fd 4b22b35d44b5a4f589edf3dc89196399771796ea
+4e04d7c66334581183749a291a12d263492195f3418d12a06ad507705dcb8f5f 290ba2a03a1b3c4d6d76737df0c9a8964c0fc192
+4e731979325f7c7ea26f941615779e107442e05af41f66959ee130f0a6d0864b 37eb3fae578d0c74cd43af472a96e58eeb29c7d6
+4e7d3270a3ec5957db4fb47c36ca53e140252a975ae3019565280787952f28c6 8be856d8f8c8aab89f093583f091979aa2a4b8e3
+4e8061916861af6c1400709d97a34eb696efb43e9d862c53d9920fa0c71a76fe b580f2da89f867e9031f9d5dd8f58a20baf20b33
+4e8deea38a82e0ea12ef279bdb6669f3b31e1b10862ecfdf0f4a2b1c37ae14d0 96e4df3bdb0802fef56077e3f2b24fbe4b72b4a3
+4ed01278b8fd34390518ee993e4454928b40d85760ebc6fdfbc8e66e45ef7fa9 abb8a36f30d20e6f6c1ec2f5639c014e3cc18535
+4edae24c115b595fcb68ac98ea93339b9f2f168ecabacfab22cd6a8bab93114a f2a98a88cf3372bdb57d72c7136be6d42b5be1b4
+4eff51656a824127b4d8c5d9a6f4880830c91fe325fa8d213fd1afd6790affce cac5d927b51bf378cf599a02d38538cf7ab70146
+4f67cba8f2b69fb809b5b8303d82624e443647408af3466e59c10aedb2422e7f 0c7fda8e41f67823610884815c71cf47c6dde496
+4f79bfa3bbbcee0f835fb81706a3ea7264ea4ce29533000a24ee291748193d18 491442f97ec18dfdfa88912d20c2304d6ded378f
+4fccb0e68f9445601a507d0ee3d00531a914a409bd2fceed6c07bf3189c25362 1ca0fbb0838e8859d5928cfab9acd749e618b6ec
+4fe798a4c86598a3d39cc2e8e7cd4166f110d79e49d14fc0ce656016142b9ea7 018fce57e6ca903bffe9abadd2b8faf1e60c3899
+4fef7f7c937fa759ef00bce38f77e622a67b3bee32d6d98d50c84630e74c40dd 2bf93fa1071c3df7f43926c8e6c3bd2353d78160
+50085f68f619f133f16b57b7e3d18636eaa349151ebdcc0eac3f6de491de0828 e323fc5116fcc4fd39bbe3dbbeab1e2712052e09
+50141d4c9e46aed05c08d59a50a230e5507cf172166784d0f5bb6a1edca97377 c5696427b6d53a3f79baad35ea33c556884a410a
+502a0aef29fd792e608b9d0e312dec720cd1b1bbc41a22a5ff05b5679ac9de94 6c31ebf84bd6eff927f1e6cb5fdcb4ebf56e1e4c
+503680aa43ed7beea11c79ba04a43cfcbc84741e7e8b9fceeecf7eb3a3e46e62 7f12e62c5139c9c43ed54c3d44cd3a32263d245d
+505fee9e489599e4e4d0a3f966a981a7aa7ac60ba8c774b2b942f0dba4b60ca7 16ba02bda9682555bec1bfc9225921d7e949f16e
+50a8f69b7ad3d2fc73678d3b5a7d474998c04c83af503e57b2368a78e8e4975b 1cfb0ff4b6193c409e846a5992683559afd4be07
+50f19348faeb431dd64cbc6c14ffd04d1ed09f3cc7582d56d449cbef87a52b72 84a5237f8ce73ff4cdf8b644ddfa9f0bcedb45df
+50fae421c835c89e59c0103070a489a071ad663c992308b67cfb346218d1da78 f16c489d96a9a046cddb3de04198e96b65f73330
+51555c7599dab2ffe66391540f293df885d8f5859b17b8de3bb3ff7db3832619 a5ab36d1d5a5b73d0df5425e5b0ff25eda320563
+5216691483e994addc87468ca4d0e29b4ed2d2e85cdded14f5a0ff5604edf733 3bbeff3fc22b75c1a26f4ab9b64449b33002aea5
+52cc121e697beb8a03c666a7cef327534c6093ec79c3a53babcd5e8daf5beb4e a4e23d6af621573f5e01adeae0c34099f66df32f
+52dd20196726c4c9586b9fdd025af66adc7eb0373f5c62aba864fefb526cea55 64a47c01426a36cdb7e598d17018d5791e54bb97
+52e11d5ceb65af472f4665ebe312542aad2b6cd032093254539db22126f7f7e9 1906f2369d2906cfd4affeab0852b67c4a91ddca
+5327a985a8eae90deba5b4061d53c803cfd87ce7d5b6102b6ba8a440f1708a8d 32d5e64646c0c3a5229e2008e21a45a741e197f4
+5329dd2fd8557be5ad06b57882cf42e23d767cdc8a4b25e464fdb00890649e07 af795e498d411142ddb073e8ca2c5447c3295a4c
+532bf3caadaf4a236b802370418cfcf91668947474f540cfa8cfd54223435efd f9660220534f2ff457939a16634bdd5bc55b7984
+534f1da60db89d7c6279315acf64e3ccdd1d2892938f9bcd0ec9850f127bec92 38c513b9d1f6c19f191927003c5befd2fa70da9a
+538bde541f9512cf48fe308a110a279cd36ae036d3845db0bb7574832dda72f1 e667e1741dc49767b8563796879f344bc2b08197
+5398744baee56c62882d02aea2750298ac9f54415fbb62894d246d9c0a332676 94eb865e6b5e041f6ca6ad16ad102ece39ca3482
+540354213f70c39f4f6e39fafc65ea211a96e6925403a3857955d42097f52e39 8839d5b02bf316795bf8716c33efe255c3b6c8cd
+54139ddc224333e61424ecd3e0d1d3657422696d8215228bd5b26db14f63647c 0d9380246ef66cb3702c70bb9c1733fd200739ee
+548f39b3c94981fd63b03b135f58b8790e2acf91bcb754546c7ac87820fed04b 425aa0032cbe69c0ca70f1467e54e862fbc572fc
+548fc7632f9b3793ae8ca2f9bbf4c60d640973910cdf5567d252d5074dd79e8b 581a704418ba8f49517cbec2bbe44e281c2f5042
+54ac7856186ec30cf5e419d09fc567128eb24a7e73244f70f55b4860065fe055 74766fd92581310d08c6faff6998dbf307800282
+54e3102db46f8f1304dc4ab62763a71f915e4918ce4c7dba10c015a4f807fe6a f4e43ffc62d7d238e971ecdd8617d45ddac81caf
+5522689ad5f3e1754f7cc5daae217735eb70d0f68d55890333e8e7522ada298c 62da145b914438c95116b46e7ddf11ac3a56883b
+553b8a974a6f8d2a8cec357147161961adc5a0ad4b9f5fca91eb383d8043a16a f9d0c1adb25cdce71cac5f01e8333f201208a781
+561439ae8748339d28a29eb0497876fc8d47cf78c515a3c989739b674ed7df01 351cfa4a4983e1f9241542a855d53d93c951fb5f
+561c1a1f3786c440d90fa9d2fe5549290d95cf10881d334c11fb919d3c81b4bf 5d1e7929bb93b783b52bb144372985b8e5b9ba2c
+5629b9b5e602665557c9c7c31f9b2ab72e235ecf54ce1943c344dee027db8564 a1c0728d12b170e1e643f219fab53b03cd4e1b09
+56359702cb503f029d099bd51e6c54d47b0166dd43efa99ad2d05eb548773970 933cb118437ee8a4422e956197a8a4f09fd7e9df
+564017a60020eafdc626cf1a2caf4c57f128c489d23845e70e0c3c4dca8a187a 9ae72bd6780d6cd354719a1d84120e0690ffb5a7
+564d38d384f7e08bf03f021d1088837f3f4dd0c1b2c495fc3733c241e7586e19 58abd58a7f232ec3468da806682f39267d5b23bd
+567e9815220b48ce3e8b3710364d499f84be5e1beafbf04e4e9d0772839e6213 72ea4e962dcc9bc157391d5679f13276a21f8c37
+56abb178ac61ea5ad9e6d2e0eb7dd731c1ae88bd15af3c65623f8d93212b48c1 630785638fdad6d35d47213ba2867a702777dcd5
+56b44edb90e571e38446121cf36270dc284556d8b5e1150ec03f9fb2f9059a58 83f7e7bb0a88634bfee2c4cf3434a2418c5f2880
+56b5280262679ad90e14567f62e22ebc108c9765f8421beb643e2ce0499671ee 95d21f5564cb13338520ecc7fc50b55866a32b24
+56b6ff774f9a813cb058c31144b98d4254329cee2d00e595fb26336be9fa9b96 b376cb120f0113294b80e7fd540d5dc197797764
+57ab87cb9eaf3afb28933d81fb2e3ca43e699cc1f02da50a56c3afef103b7673 ae31ebb7078c0bb2fe5a3dd697195e2d9068dd92
+57b1d9ea18f9cc3a9c596ecec921938223879a49c375968ea034608e077283b6 76d50675cca89a89b263f23d2014c7de7f59565f
+580474d948cd2ebd2e5ce7a5b81b872d87ba4639c1ac4c0fa7a11a8eddf9827c 412ec4e4a6a7419bc1be00561fe474e54cb499fe
+5818ece015b48860c7e518f12b06399b60d7868b92c3fdea05f2d25d0077e476 498bccdfec1fc223c27c0d84030ff419058e452d
+582841d0c8af7a4d254d30790f1b07b3ac8f3f1c947be0a31791e84e307da00d 9de0a701bebd5d07bbae73bbdb3f8c39e204bd20
+585d35a8f1d6c41b0d48ab5722811c0daa8bb51164f24d77bb4459f95cb05169 44181c23ea6c39d51a4b481dc59ecf2cc3967e76
+587d967295661afcdb5a1a7162f59927c824268d19cb4d9b81fb5962d55b9bf2 225fe21522a98075bdc18dae90ce459f797ac366
+588e7ecc3c2704834f904a41fb90bd1091ac1eac8b5112bd60fb2382087aea82 9a827fad4fddacb757be5c6eb3e8c5f323ff9952
+58923faa87c7d559d308a114ec2b164e5d6046c889420ed1def6eef2d55106a2 785d3fe8e7db5ade2c2242fecd46c32a7f4dc59f
+58c150d2dbb9c2ee86c46b5124a9508f632c1fb35325d8a8fd1c59dae3bb4b42 6dafd0566786a417cfe1131ab804b162fcc79d15
+58cbb3fd7fb9820caf0f9c15b066ab41df8de6fdf1c83d72f3bb460a9922b2d3 7b08db51663cabc4794305fe36fb5e09c575d883
+5905b697743f4998b3deeb3da29d5270ea6bb52c90d4dadff6f28f0f72edb968 2ad730b25892080b9bcc990c05079a8d605946d9
+593b262bd7c0c40d61962a36f9e9983402bf8b4b585a6245a47b161a31193807 7c3f1a8504912d590d12048d32cd31d2d75d69ac
+59a1967792d9b5338bfe0bfb7658a932bd7a65b3aa8c8401dcd6f149bbe1e4ec 046c8a0d9a405b354f298c7a73e8755081a949b0
+59cc00acc478955e567e5d9eb9b888b8b538165673147538b6132b4113010171 e815adf588053e45a5f5410d44a586f69e66c1db
+5a025657f0e06e135eff8536b93877c7725b74f2317b6844c002ea135797c531 425b3cd58cc77a921d6970967aafaa4391cb7f4a
+5a0eac41da13655a7cfa4f4586d152049b9ef83b5cbb41c290e3529a856c7fbf 2a0665949d7f96b9776b6f36f60940351b47cdf4
+5a1fa5495a4229c962054c7a09623056643e55db9601d584db08039af54bd01b 33fb00b13d006c5497ac0152361769b650397dd6
+5a2d5699fea33657b42ba98c22b7898baaa0eda205a21cafdcb7e0f94b07bb9b 9a03079b8a8ee85a0bee58bf9be3da8b62414ed4
+5a417fc113d54074a22bcbf157923fd439fae36ef7c22cf96e6a99542809495b 200a9469e6f76a538b8539d671161a573c3ac91a
+5a48249041aa1dc714d3f4337776768d827320553e118cb4d99673dceb9c975e 0ebbc36594071221b685805590415d74624f41e3
+5a4fa7cf1e417c1032786472b9906074d75df51bd0a5870b34125d3e386d5b8d 4c67e2e95f0bb6f0e214bd7bf052f914d365f129
+5a9353a7576920c090a94ebf978f786d43418c111468ae2a343eb561324dfdf3 3442b9486ece0187998e802a3e98f9c97258133f
+5a9391ddc692a70f59eb4640f4f221bbdddcb4dc9ce0e8abcbbfb15ccb9a1513 beaa5abd55600b276ceba3363285fadddb906433
+5afcaa3ebee991ad963e8bc7d3d947da769dea7095973e5e6be1254138855e2b a62239680a8bbdf85cb5602325caa42abd141d66
+5b0f9a00dc1ccc48a7d52f512338cecd3f4f5b9706c227c5f8fd158419862da2 c63cb6a816126549e95c8585a65942981ff4d634
+5b264a6c0568f6e60ca657ca41b3608fca3a6ae87bd77ef9635edc75b5e421ec 6d681ba6396167845281717f4ae90389f884de48
+5b92057969cd5f96af9b9f1504b532bd3fa93b9dcd5d58c4d650c3ff640e54a2 b8d515dc02a663f0d260c69e23c6cc42a363d5d6
+5ba7253f47d390ee2c7c7afe8fd9a963a7a2674bbdadeb9a927665c9246306c4 e04529998989ba8ae3419538dd57969af819b241
+5c05f5112a30ead09ff2ff553056755dbf568c06127dccecdce9e2696fb41398 634a64b10a627e64f1a4370d085eed0be242b6ed
+5c14a1005d727dc5ce74effcae1dadc76a77533167c76347e04844c290aa7ad7 4c3bbc923330f9896bf5789864212cec21a8ca0b
+5c18ce500d2a3c3085f74b3e68dc4ebe703a6210b3343f50796cc15cb18c7f8e 20e7f426c3d56ba9e4b55f31a61835dd0031b464
+5c3bddffe44de776f2d7715ee97a62b190049e623d3b278ec131336f0a1cdd70 2506dae36e0f9cab6f81fdd825d808a9e4c12dd1
+5c54a41a0ef2f1b7f505d12cc7902120b6ba3ada7e023307792b56537fef2a49 e98f74e52cd1231424378d9d26ea40d1ee4d7fa2
+5c89f33a737d292d062924589b856045d9d24630fd3bd1afe5e65e53166cae89 192678b55c30d0652356a5021b521f8e205f3428
+5c8b348f9e152d98efd79d2990dbe4c702eabb06d4a1427472c1435be0a13cc9 50b20c4bd550428a6f33137bd52db4b69799f1ef
+5c8bea399f78d3d6a037a41cee2e763d00024180b66f2ec738d443b6a3dd7081 fd899f45951c15c1c5f7c34b1c864e91bd6556c6
+5ca8959deb2b8327458e0344523eb1ddeeef4bce03e35864640b452f84d26848 8e73b769e97678d684b809b163bebdae2911720f
+5cebe9f8fc63534c919bac2f0c8695c707e33647d44792b16e28702d26e0ed4e d25d5d3bce20e400407b010132579541d116a8c2
+5d021306f157c028290dc5eef52bad4a3998b50006fcaf283cad4e6918157c6a 54b9460fee5219cb5a57118bce066697704ef3f8
+5d2460e61d9d5cb4fbdb9a017d4761827f339c067ec209c8c44529a5d9c93239 36f0f61fc8578478a9dc9b33a1a0d07cdb98a5e5
+5d2e103059f5a5629d12e4bbec2e6abd1d89f225dee891dc630f67ac331209cd 96f34447e508c58b5444992d4522d93687c9ddc9
+5d33684397a6875ee09f048a93202b5ddcc468807ff5faa382f9508833af38d8 7ca4ceed50400af7e36b25ff200a7be95f0bc61f
+5d4e078cdc4960b27c7a0f8470c9d797ae21983e08efc65d0cf36583737b183d 0129895fa52dfb06cfe4f1f456d57d8e16453686
+5d7a52475763e50597142ac2dc2d1b33d771ab83f3a719fdc0e7b880bce4513a e589dde541c522ea4096a32308ee1db9bad53079
+5d809610df93ede304c638ccebbfb2aea1010020d5a04e25836320a890e40381 b20f1d8a6eba1c138a6a41206ed45ba0dfb7323e
+5dbb1fff5c0094b31b25b4635ab9fbee66d65fe5dda47dd0ac5f01dd69a84c6f 43da5ec3274dd061df152ff5e69853d562b01842
+5e0bdcfea7ab39bfe79b8e00a459a68f5b60b2b0e7600bd01c09a526734cc769 399b7d5ee364ac49da9ed64fcbcc4ce2e0badf56
+5e4e3a2f07a2d26f7ac4ae12b4157a7c6201141b08a04a296d5c3d32bfe9d4cf 5720bbffa1377642eccac7fbc34b35a4b44fae4e
+5e53b0f3e603756d985e82d66a1186c2467f2c5b027a1f4baae651a5a68d1aa0 c2ef0cadc189a076b8ed0d855da1e58502210507
+5e60eccf824d865dcee2ee9ad6c947207c3649dfc0bef1cb940c6d05168ff55b 627513e78ae0c8dbcdb62e371ea674495c841aca
+5e7c2a3395be2546d41331f9e310217396252fbff62f139e41493df6f47a548d f9fce2b42184f2181a5ceff90dab05f7cff12697
+5e92f55d41b34d254a0fc5e5270c7f78ba48d70743484489a2e81e0c9b420527 52f2390b4308fe51ecceecbc35a87bf6e74e9aa8
+5ecf05b5a0c0b45065f977149190b13ac8bcb18342c35cca02ad93a3e7236ee4 5213c69284b521c5a60ff677baadd36c97a5b333
+5f191eb81f39438560c516e2f091de40fe3b7e090b89b854d013caf446b0aa8e 51fcd3cac86ed8f6ec215146b79b0989d407ec48
+5f45642bfa66a6eabdfed22c7dc5fc170dbd9a4d93fad22e402b38cbbcc28444 bd0d32c74ae66ddafc9c875b391717e1bdfd6f8c
+5f45a18f90f2934e7c7985d05b2b5b3584886fd057c9202f26f562d6c3080038 112998d425717bb922ce74e8f6f0f831d8dc4510
+5f53944c9390e883fcd33819062a750cbbc9b483c15b554eedd351696583d215 f85c76fe4882c7a4befdea9224fa8c01574fdfce
+5f5f4cc82137a85080f6995d5fa9ed50980e07b0d68bf96c0d8c9834f8d4ae64 66a4bfac99c07b79d75c015aed8f5972f0a4a336
+5f877d011f066c0131dd3a53b96dd2f776651a96c610e7194fbc07de06d9e851 56846420552d85e7d5e8a19109594ce4e9792b7d
+5f884e140db9164254a551fec3b2da3596f9404b80a9e322ea01ae3a46f45247 6c1a2d8c39d1becfee3cbc738c9a126a29f98c92
+5fd43a5fd154026f2952c2974e251c98989a7350228cf84f27c58f0925eccc50 fa33b5202315671c762ee1612d5d153c55f728ed
+5fde3c5b024dee434df0642b1f2068bd65894a9fbc346e15d7bb75608f948ebf 32e41390c34dbd3f59c8cd78aa18adcc45bf57f9
+6004573477242428d7b6ee1f642da73ddc68de2218e36b8b037b068bc3de006b 0d65e1969a5c01a5ec64b6950f17f132bac18a2e
+60087c8cdabb0c7a8fc1cb6134747d82f02a2a920d4c2eb7dd783e7ab1f37850 b3715dc1acad54598fea69d118c992fff7ea4ee6
+60b2cd28c2b0b58ab103d838cf2ef4522a1c42490cb93e425df77f39d7105e03 458c271d8dc57f36e3c6824d54a7a4462bd3866d
+60c64d140395cf067197db3df59b33830a8ca7410c0732a1c1643dfbab2ed069 2ce6f8018fbaf125ed50e66adc46ff4f9d0a9288
+61068c6c7b2f2254e55c83317eadfd4ae210a6dd362dfdf4925e1ca20c345d17 b231ef3acdcf396dba5f83f89488be7519da551a
+610894ea28aa99982aba7156a1a6ee0d18652d43f7ed7b2dfd89fe1252b9e645 93d96a8a0e09ccd1526ae4e769b5d41c239db3fb
+6111c38997cbd2dffd851ad4d840c9dc45bf992d342b827bab5114ff519ab57b 1a2e9c0f19f0143c69fa2c4d5d95da3d5ccf1357
+6129f1672465ee7b9e2edef53fbf3846ab5d06e8e6a1d7fb51e31666a8b411f8 b0941f9c70ffe67f0387a827b338e64ecf3190f0
+613faf6e366095154ba6b9cefa47d7c3a664401174497daeba14a13c3e444fc7 77e9dca7958f1ef5a01dd17de6e5fd1175a13ec6
+61489e9e831f1d9001084d39b79f964c293db8620d679ea3596673c8a326446e 1810dff58d8a660512d4832e740f692884338ccd
+6152d01aacb9fd63bdb908a5153ec9319bc837b50a22322aed77ac01764364c2 32d6b9111a767ee0a7500f132f797280dd042367
+617e5bac096ddc00f0c17e6dcd6a084cd21ae6d4ef7369ba888060f3c7e0a988 2917c22c87060a43fedc431c0a125cb15c1e3bc2
+61894490bc16340ae5eabaddab9816b93d2231629f5c5709f0c09d4c9dccee4c c985f0cf48b852798f4c5752da322a34f6d386c0
+619f24a7f37f8ca922c83b3a1b9a384eb6a444ff3a2a52c712f3c60dde6f24fb af55d0cdeb280af2db8697e5afa506e081012719
+61d09b305f785a367a8e1cb85347dc38d4ae9de484dd3f2a5bffcb1af3b2417a 803a6b4d418c4b2d7463bf23a86a09cb2359ec98
+61decb10e8bcf036b7b0668b5f1e158381a26ad14f4420bff686801f9824aee4 1f8435d47ad5fcd9e92a80d1cb2b8836fb711366
+6257fc48e458a95396b6781a738dbae7866999cddfccef63eb16f0919bc2cb82 4d25aed8f9ae7653206031efdb0b682d62ece767
+627d6943fa03029b8c4d730ab2acd266509261d14042b1445c477505b29fee21 3ae3c85110b04ee92aa528c3da0956391e038cf7
+629e9c4fa5465689d98c29fe048a1aa7f52da0235c5d67842322cf5d183e1175 b72ca26740c71371258bd178188a3d981e39701e
+62b1222084376703ecc7737181def068375c47640206721dc4674491b8980a5f cd874895197adf33e41cb14cc4b5fa2fe7ff758f
+62b4aed734e93df5fa848ee90fcc38fa472e13581d05fa42f11f6aa8a388da89 4a143abf80a82b6e51a3a32e0be40b4e559f6a17
+62cc32311fb4f113536d2004edf25611cacaf657bc1f59552032c7cae29cfd6c 65912dec2c33ed1cbae320dfe24f868e10f30ee1
+62f462260b2bf90079c917b3ad2cbe8eb2c8bc136512961c839ac53845f7bdce 784b10b4b075a60fa18c703b88a744a30fa7eb3b
+63071afc7376250fef5787562b2463404ff4002698f92a61a774bda0a21a6ff8 22b3e83e3cdca53a20808202a795c73fb47880d9
+631b70c3c1335f8aec14d98eea4a36890c3a00bb2367761e8f7d1e209baf74d4 1b858839e1f08792f2e5e1165bb4fcffcc95fa86
+63fee1d7ec8c84e8854fe394dcd134a633d8f3de7c6a5749b7c12cb26b8912cc 99228417f71549fc6392a359d59d33050c055733
+6408a234856eb88bf60ecf977da417e65d38cca482547247a143aff624e66872 7ce66fdc1f7778999b3b3b87608771eb2f5c124e
+643cb3995f617257573a639e4b8639b46bd96335f61bf6d98ee3706397c75544 47ee6e20700957518dc21886f769ef415a592568
+646b7e4bee30efd073aa27ddca866ae7ff72bb284b035acf721306ac5dab00c0 56f77b95f87e01b56f732417c1d557f0b6dc0be9
+64887aae9bb21a35ea8a484354297a8a079b3bc20d11d253b71afc1ec36b1f74 0269c3f82d4a93b859ff58582b7c6f1843dbbbcc
+64dab4ad3eb854bcf575c7d9c9e9673021ba74203147d130a209ec2f04a98715 850cf44e8347194a57fd1fb637f0a12f1838ad38
+64f0605de2dcad18e95b1cbf6cbb85064f916406f63e8f76c9c223a4e59d1e55 eee3d3f684fda02fc8614dc4ea5c399ee71e7e4f
+650f6cd874aaa3fcfbfdaf49d6683dd6a3e9e3e45d21987dcd6d67d11bd12632 7cd60e59edbd298d5e2790e2e62aa5c4dd55e8a7
+652412419a24ba62a1d897f40aeb80eecbf873797b04a1bbb8d71918653ef65b 6dcf9bf7541ee10456529833502442f385010c3d
+653aedbf79f7c6e9377832bb81f3d408988d1ef51e130b08c29217a9a53daeec 4a59d93f4f618c2b2ede1b21c807cab24453056f
+656dac701c40a400c97a4d145190117d6f226b41ac39801032b5ce2f8a67881d db31e1df61d8586c1992036ce4585a69fa82076c
+659c01981f8ecb286bf26d7759cdf0e59f3250dbad69c5d74e38c5ca5c8ebd36 c1052be270f379ac8e245838c8362f89528c8e34
+65caa3413382890c53fa78aec55069027f1918985bf6e62c97716cb846b74f0f 0b59a10d29ac9446320f6b9424e427ca7548af77
+65e0543438a38463238bf25be5064d5e6a9a9b80f0d67c3babe8bac7a3f9b269 edf57b4b98fe7845c0f37b6d261f15eaa6a27556
+662c71991cb89a89f8b0d3479839daa1c3837455808983dcaa3c89131757d4dd 408de023c9bae4e7cbfdbf7ea65f0e41012f5a4c
+663848827efd772f21ab7953f2c3edfcca12400bccf92de5616e9ef57aa09897 7ab2d5413945768710d357e69ebe6ea89d0e0f75
+663ba0d9c53f18f52af699fcc1f7e1600098961324a48f3e264b98718e189498 c9c7b0e147c44682c9d4a100dce290c14762ff85
+6675306226a1869a0e696a57ae9f8172511d961199a2ec17ae6827e39e4304c3 52e47ee702754a385a930079d5e127486e52bf68
+66a993bb9ea76040f448de0e3bd65d1f9d88dd5192921cbf12f234c813466452 75e1e84d121120833cdaefc7e764878b7cd7d602
+66c5b943797fa9a7bfe9194d4f1550a9c4ad05d69c6d1a1be4e97932cf06a813 4c9a39732942f763191d47be51b414bbc81bbbfd
+66f3606b5eb16bb5a34fcea47edad9a68a54c2804c09da37afbed6bf512d5221 ac8237e18da19ff375f051a973bac91d6dbb2f56
+66f736d33cf07582c5d6366a9a1bc39d39937714e729dba38a7b61faf2b156b8 67b430937482d4d1d877ed3bc4a6ee743028c3ff
+66fe8385c6378bfa5ca5573bd0fdd773e4eadb0e86416b483f2c50c839859ecb 41bc8c69075bbdb46c5c6f0566cc8cc5b46e8bd9
+670332674a169ca0bb0f1d14bda945c03bd6687b756b4a54bd8da9208403fd07 5e9e1f22cc64d3a31b37e3d0c865228a71c4415f
+6705ab009e12496e243d5fae60f7ce6c77fe68325a8818ec75ff317ae80c5e78 eba91472284330a048142950c1de90afbbbe2c0a
+6727e691fc664f1f28bb23cc30d6b84c34382029e56edb264b2498117398f8fa eaa63e1496702ae9c36436969edddcf7e9817545
+673e079162dc9e99a8bc43698e05492357041a3a661b104d1d40fb37e89cf965 dab2ff4ba3ebf8cb58f5b52975a58c308b2ed283
+678d331b936a897f3ada21a29b403968b075611588c9b176abf5a05d415e275e c8d42b9bd1b6e45f48feadb5b02e152c5e5f1f62
+683b60d7962844415b532765aa212699c5414b0833974f292c233c6c8c380dda f2b93d4124d2a46ec7070cf6a40a3863e2c15556
+684b9226d707a7b783f0705986600b2c9c7decfbc9cc72938cedd113a8f0dc83 7e44c57fbdc0eefa79348d25870369b2f4b43ed0
+68a467e533bb9e4b2c5ad712d0f8d1b484bab740dd667814f1c9cac3a4a30fc8 19af3949ca8ce2831049a4755bce3091d7f4bceb
+69136323b1d7ba81e8cad8626dd83cba0c41f780caa43421f0e5f2462d78acf6 cb3ab00e68da089aecd496ba4e39b1c706ed7c68
+695bdb545f636d454b4825effd29db96c46d81772dda6c104f97dffe2ec509f1 4e8cda27ddc8be7db875ceb0f360c37734724c6d
+696503760a18787240ba52ad1abec3be6517bb802238e9469b3a8999cbd6432c c07204a1897aeeaa3c248d29dbfa9b033baf9755
+69c1a2bb3151164052ca0435160424d460eb6268858cbd027cc551a174a52785 5fdc7166eac68b0b0923439b8685a29ff4c2be27
+6a23c1c1d0570cfa36151e678751e16ae587b0a8c262efd011a4716555b345e2 4d503f884a241c507ec4e474e3e3463c2e394d52
+6a28b5afbed89366932ea57b68cdc739f347d242f0d6e6a0f8e9a794205a5213 11fd982b055012bc932fe17b6187629555000b76
+6a3ddbe9560f1509d2a15cf4f580ece49e83b83f9baecbc0f5ea512ee93e63aa e35ef00595a0767f16bbae5182f7dd1c07138834
+6a44891d48bbbe85ec77c332a4d809ed1d7bdd39be781785d7e8b4b31a97f586 963f3cc863ffc5d238de5ac3f425df6ef1e3e3ea
+6a4f8e777996a56c3d69559f2006bc0f0a990130aee3d2b29aa29fb3cf7fc437 1b1e2deb5f90be7f267af8d3d335bb47d648944e
+6a5f397f63599bff44400a30cf482d44d5b76808fd9b24c043e8da3909b7971d 85a843cc1363932d8cd5d1e88024b9357f0d5572
+6a837864fb44516a249c5df72b8674fb3f16107af84e2f38c9c4f2ae7bf8676a 357bf823711de56d93f51d9f4618ec2068d2244f
+6aaf452708cf86455c8ebef269c0cbcbf873993e9cf003e3eaae8569eb997da8 a1a73455eb3d2a9571208c4d4af74f4ec1b1d161
+6aee1b075ec6d9f63ec6ff0689e80f4df81dbd2c0c2bb17a8627d7f0602345fd ec6a1926d4465e61364a7a8450e8f4c86ed841f0
+6c04b20ecceba56f5ef3dff0d5b93a551d0c6b56311599a3633ef16c3f2604aa 0051f09759ad432aefbacba58fd306dba4a13f79
+6c14ae62c1369df64a8feb0dc01acc99445e13708726f5687343ca15185a3e9c 86dcfa927930bc90239e647cfaad5c7706b9f609
+6c18ed11d243aac62a14a6863430458296354e445f0ac7927d5231161ad90033 c945829d434378a0bd235640ce08144ec35a8cb3
+6c3b3ad04c2ed7bb11f59cc76d0a980cc087bc6b0b27d96d395af4ead3950200 e272b10388ebc4b7ed9fe2b42dd46e367193c218
+6ca4b09e9c92f8cfcddf218cfb39cd76062c88e0ddb2fa387bce031b902247cc 0a902f96c80acaf50a534832e1892cdc99ac6d31
+6cc829640a9596f33442bdd65ce68aa387caa63b8b0ca914a3af4b8143ead15e 8a6be5524f20162044c8e48a530abdabefefc083
+6d0df366aa3aa46ebc26fd4099838660b562e9d140ced9631fc091bdd5f72b32 3ba86b2be1383df8e6ac574538dba7d1d5d0120f
+6d159afbb9fc4660e17efcb7a3a0e1944cfec34d8f8b7d1794faa8507e5d42d0 19190397b94cd8b56e6cecbcbb4ed24c3d454d77
+6d16425f59d59f573f029a4128206020fb89e849280d0ef894b8cbfe38803af6 c994bb473428299c9d568c99805ff1b49949aef2
+6d429bf11e88cdcde78b43bd5227e273911cfbe30b8f56aa170ea00227811ba9 82b1db3b35e34c87862172bf3f4705c4aca8cc98
+6d47966640b12cf618c9bac61c60c2cc245ec18723ed4056fcb5e771e313b8d5 09cc79a662b98af20006f2601826d8fd6085a37b
+6d5fd291bb0f67444e99ab492f1bf1fcdf5dca09dab24cf331e05111b4cfc1a3 fa49b077972391ad58037050f2a75f74e3671e92
+6daeb00c6942fb4696f08232d22ca0dfa56d416450633b39cf491a18c6e2ef76 e8beee4c04ff7775b7180a7675acbe95d5af64f1
+6e22fb1278de7b49fe6b298192ffcbc3a2b1e8abcde77b9cb2ff67f3faacf3ed d9eea640862b43efa179924882eec554fcbce684
+6e490b63a52e4f2327be88b4b91812a05e62cb2500f8dcbaee56563803b47fa3 241514f3af6dd20d6d647db9ed37a6dc21d9532a
+6e657f9f175e434bad449932ac6211bbb129f4df1c9502f4ecce7a5cc1fb5fd6 2525ae8a3e074a4c65659ffaad29315fdeffb698
+6e6f43fbb89dcd1526fc897e2a42008f8af30ed890af079de9961befe36ed36b 1699efc4217d925c50abee60d196d9f6e738a72e
+6eab2abd4d5c1d1ffe7e473b3c8b2889bc8801457737f43255166f3ade399992 f68f0b1b936c397976127b08400c6e30c07cdfc8
+6ef8ae778c5f998b9beae6b2da18a6ea674b268a249c3b55fec38d1b8cadfaa4 9475785cffaf1ab6216a9a5f1e1b4daeee718657
+6f0055a8c0d2d3b66d21dbc546e605d7097533d949fdd85f08c5874c01ef1723 ce022069960b6347b20ee2f90681ffe7802d953f
+6f11d93bfb269ee8c7a506178f60c430abfac5d424acfd9c0b0b27b98e6ab49b aefe66d192771201e369fde830530f4475beec30
+6f26102d332afdc855dd129b9486952f8c6b7c071fd96a6f1f762c95a79a3d67 064301cc3528ec3bccd07dafe9af824d87a50dba
+6f3876830557f53900630d24eb67e39e64f116501ee781f18d5d3c1c823f255c eb815f96b04732b893bc17c209665b211e3cab0f
+6f6ea36739eba39758b45f4a0b0e7ac3d5c3facb390751101e2a8998c3a6f190 0f39781c25a06c1d38877adef4ff5a6a5f67f1ca
+6f7d74e7c76bad67c52697562414ac40cce152a6197b3621342f4009c141ca4e 556c36fd15024aa7e888c3739d74dadedc6ed424
+6fae137ba81d0d81c2a85759b99322e7ea8103bd7c8b85be3163b7e91e18c125 cfe96f31dfad7bab49977aa1df7302f7fafcb025
+702a6340ce839f0cd2601cf6fee0e4bb5b308fc8c0a731aee40d1bd1b0ed5f6d 4498654c7989a59db451179ed264ac43d3b7131f
+7030f925768d9beb65654ab8f436e3ca0a82b25eddefd237bf5a26a0441c2aa7 814889a078c031f61ed08ab5fa863aea9314344d
+7039e3408aab6a7cd4c16bc8ae9fa81407ac415c427466a602bee592d3ebb243 0238a56890c6185070331056033f4dfe61a275f7
+70bc69623357648bb7ce7526e92d8abea0299a9273b9fd28fe5f9ad55048445c 73dcf2876fecab9adba9ec9bc148ccbab431af12
+70c467f2c60c4c2b12e0a8343c454edcb457bb7daee059b6f7f625db44827ded 12a30e261b490439ded615bddd7d6e3a135fcd13
+70db96a9031877b2d11791f4a75ee2e2db4c6c657c9f1d5e30975e69108ee95d 4078e70ce62371860584b6f42312097b1fae94f8
+70e04bc26c957ee1d57dbd0ff0dc8d8086ebad49e3dd4fbc7b158b544eba4b21 c20cadb993d1ade2db86def0b3e107765d2ab3ee
+712b2b96ef712f696523967fc471a5c5d446dbefd9bd46853e6f3030fc4e42df d1ea30c399629de48ac3fe68869a21171ad131eb
+7151491618209e86b24c84d0bf4962828c4b1ece1924a44ee1d3cec82d0c7ef1 8b6f008edad28fec6e3732fce75c20b0608e4c46
+715588dc06122ab123e11c9590ef6fadb817b103da857e89d619f98381e194fb 33458aee86009abe87f4f182120e0a01dd828ed1
+715ac0c5f0e08622ce2dba0358e6180103dc26aaad65f463fe319ea28227c991 7ce510638eb4f25e6d74a788e941e27557831291
+716e598151cf540036a73177dbf04dff847cc5f0123027bad6111a2b747d6403 4b44ce23b4357ded8bdbdac545ef49a39d5bd6ea
+71fb49e1a6feda729eacebd50518cd5e0dac988101fff035bd27e66a2d1c020b 54b5223aaa8e0c973ad508f4741e2a96961c0f3f
+727a5310c154efc27b636efe2503aa36928392b543a121fd4c67e991e53be3e7 efdf2bd1d646b85961828b897633374b09249fcd
+72b2b1341efde56221a00b934ea70e0e0bac428cf3853f7f0432371cfb2694be 744e1c78fbfc9438ed8c947aa87beb000fe4bab9
+72c472319cf7d5d59bf9fea9e90b9785d7ab39340003fbc68619c11a9e583c2f 2f205b20fc16423c42b3ba51b2ea78d7b9ff3578
+72e5af4874e5dfd926179a7df9b22f5c784d0953c08f52f57b74ea4c429bcdad 3e337843bf57f0fd5b29d56e8678d23bedb78b49
+7348a064c19fb5f536cf9df91b0241da4dc493b2e4eac9b886b7de3f96b0c414 ca4bb51f66396b06853c444a1f3d259267a7bafa
+7350dbb12c8f696a5c1f758da310e02cbca318c96c7854e13ed9383a313c4a09 3c6a4c09f57517d0670e5e1d78587c643afb7d80
+737b6922276ec4b8ff150f102403c48c4ec60e6b3d4ff6904261bbe2ba2d61d0 552e23ba566d975b4dd48163b91021892504f021
+738ff86401dbc5af692c83e660a4d510603c3f36e782a1a32ebd0388db6411ed fd4959ce7510db09d4d8217fa2d1780413e05a09
+73a5d42076f213bc0ec6816f8a51e3786d5fb0eedb6d672b9793d582eec8477f a7c60cfc6d3af29669ef5cba9df325719b9f30cf
+73b4f3c4f3182e6c8dd2c98aeb2c7811556538e7673e4b325307c71685fbf5b6 fd093bff70906175335656e6ce6ae05783708765
+73de6bd126ba92253a3968a1081da3bb585f9010339fa8b9c02ab1c37f253bcb 6522d02a70408e526425ca1579215bcb6bc505a7
+73e67e592fa176648ad7fe7a65c8e3e782902ed1e6a2a03b2fdda1ce0648d705 0db888dbd4366d6fb2e5871a6bba39530e3bca70
+740441a445c2ab20d2ba91f9237116e39c25aacb7527bff9252a15a376ccf1cc ebd94df2050b09575346ce82a94079dba504f057
+7436189d4ef74b65e205d88fbe33f8b130e907b7951f03e12366ed6124342aab 88c3c7230f3d49807323df8f01546b8a7fdce9fc
+7453e1303e8cc0bc8fa0debfa7545e7f6b8b0036ffaf950c1d86f86710ca3bcc 562c86cad456bc709af6982e24256844661fa5c1
+74a75a34793adfc5dc91b0997b113e820f1a08ce3f2582580b21a63a22db2dce 977c1793305b307275e2a12335b22346efb342af
+74b69ca7e493351440a95d92487789420cadf3ced93cc3c4f9451e4483d7a1b4 1c2df27a59b90ce934bee51a95ba617efce1c77a
+74e28415489b8056cb9537fc207015aea0e828fafaacc5bccdc93b2f1609e479 be01c47996d638f76c9149a90a25939f624b6cb9
+7509f5f98d13f7a093342e712ea0876cf17e747f8e2d04738d8592401da74586 32a550a0213bc2254d0e46285d7df4e154573009
+753ddabab8ae9c1e733cda15e8e3c83dd43f5a2d939ae32cc3b30b0be1e91f96 4d8d0fd9cb6045075385701c3f933ec13345e9c4
+755b0be6d86fcd39eb376f2324bc61103ad7268463b6eef46314e079a4d2c34b db31c0661cd0bb4fc5104aa0f27b1986ffbf9214
+757f587c2ab935eefe8ac8e05e3ca862e9bb838cd525a6c4402839f532713b5e 360b107978af0651ca59f07430fd71ed52150e4a
+75b0ed5f4a2d5c810f34d867dbca51db6a596d4739abfaf24fcc0f05d99097a8 10b759e734e8299aa0dca08be935d95d886127b6
+75d6f2e4eba19cf2adaab6f58e16c9e3eecce4909efc53d6690f865a4f89b53a ce524c6b3a984455f474968d01ef86156e92db15
+7609c608c1097270356a6fe336a8756ff124d4a9c2e941bba26a6e8c3becdeb1 2ef4e5d838b6507bd61d457cf6466662b791c5c0
+762099bfceec4cf75e4f0cf913c7ac6a0ba6754249fb45579f7d820466045d26 933888647a5d500b90c472b5c99fadd6b8691c86
+7655c1e83698d9a5d2fa841438e1a0ec815d7daddbc7a21a7e930587c880a2e2 0817229bc1a1fd88bfdf4f35e2ca11172054756e
+7671193d6cd77b8b81681438be0bf15db49ef9b60f5389ee74b907d7254f403a 5069c192113c59f791d5f566c0a57f6714bb856a
+76c1bc10fdf66c17d7f9c02a12c80cda9d1f14fcf9a467e85160993f807abfa5 7cc26c12adbe5ab35986e2e57a572145c86bbc05
+76d5d21efad0c83f17a63c2a68ebd39136b56fc25f97e0697ccc6c73973c9753 81aba2b4fc907644c29735ebcceffa4ce01dd23a
+774fc4ddd5efeac3ba9d525a968612df8097a9c903ba0b5b33625ca86eece2b0 9a4973ba6bf406aafc48b98677422fe6e54cf764
+775a1415621a751174ecc0bd86be251ae64c305f39c0b6423f8bb5a2c4cace70 60811b0baebdec5b8663134d8b754b912039b6c4
+7771d48bc8502e2b23c5f87c5f82b446f90060d54a8094d4dd829da9cb5d716e b3178627077e4c6b240ed61c4e9a3f80e42d6c21
+778c14d7c53286273b58bbaf5f42aa7ce8bff5c63737cb1b5d3dd99fe43fa32a 46a29b40df56c1885fcc16a59a95bf319048fcdf
+77b15f8f906ba92609d8e70d038973964661a30ae5a1b9ab52f96dee694459b1 0ba17ded678e92f9150df14c2e9a310ff5a79baa
+78247330cfbfe12044d4a85428ab774b9a88413b618ed91d812cbdb1694be9eb 7e7c39379436c6c048670386fd4d470444232e30
+784989941709ad0a0f4a6e7c9065f081561dd146e7c84a535a38b8c2b89389e0 84b9cec72cc98dea3353325e42ef78b3f7e7c79e
+78568215f27ed3fe1e34ab5c944349511304e3f2b9721610599b3fe24ef90f60 42c07750c431b6bd77c6a9e1ff4997285932e352
+786ea2ae3bc3abb0f17a985bd588c7e95934a332b0ff095ded0e2192e29d42c1 938317c9319e3280b38d705ad1cf74830cb39eff
+78ec10765ac8bd54fb141ff1601aa5fce9abe86141d2b5457c0a3dcad48dbc61 166bd0fc25eac4f184a3185eb5994988cfd6c201
+790bf70318c215c3fd3d8bbf2c6aa799f7a9407409aaa79a6f286940dff143fb c96d985df9957e7c042290d868d44feed8a4fc08
+790f39b54161d26f82f98c7ebf3620b0fb7763fce49a5d2d1f6213671c2b1bae 8be50a412d448035b974312389e9a6703e71e8cb
+79239b015d62fe6c9c543e6f394372f63ac181b2219bf7eb451d397836377890 d48d51dea1dd8e90bb8c960e68afe72cabc5f6aa
+7941b4226958aa66c7f44e76550ed49408f8665dd32d823fc6c59eaa16ab8f02 6e2b3105c1c5fa82ae4e33a8c24d50d69c50782c
+795db8a78b6836d82b72af2904b6df4587356b800c06e74159d39b83f2ca76db ebe2b33d7c2366205d44620e57da3b0afde2524f
+7989c0a71ef11028135720da34e14d29e795c8e78e450cd85a49d0bc7913a8b1 1a7bae4d0f9d9314b905109b5b321219b7e6be3b
+79bc735b91f8dfa9379d1d6c21e2d519ac1bf0d04d48534864c9ff571df5297d e0637ddfbea67c8d7f557c709e095af8906e9176
+7a07cb0fae32a92c8faaa8f6aebee30b9e10b25e1d4f49726d28f223f4bd5255 c34eacedfaf132a6f506d2125588a9094eb82812
+7a135043f1708123027e529d2fc8102581d11dcc2dc51e32913014ead7132ddb 065d464e42f271efe08daf3f5b69dbe266266880
+7a1ae05e508530aed4f9bed33082bd4191feb167f2d351fa27180970fa375b09 b3be0fc7562d51df415c14abf671deb37d8f89ef
+7a1d4d9971f84fc5afe7f66d5925e78e67a8ea58e5569a519c40f671f44d0b8f fc3ab91bb4df267ae9de1f7b4ab596406485cffe
+7a5d59089d4a3dc1b9df7f4259be2ec0cf9f9819397b775d53a6592d62c471ff 4c65453197fd21460f0ddf2b722ec2fed6af221f
+7a7d3b7a1c17103608948e990a24f4a67f6728b7c8a5dbb3f369e55972a55d4c 73c4dd9253f8d43c436fc88e64096910f4f1b8ee
+7a907433347ef815623322907d4cc216939ba2c065306fa81b2fbbd49ac42789 4852017de90aab7f3f2af89ce8ce29fe8226af34
+7ac8c1830b6a44dfa1a41203f9368e79de094e5b62134bc3783069ca70080cd8 0acd9f8ba026c0e6845ca4cdb920cd27503752dc
+7b0d0dfa23c212f76f2317ba39d30710ab0014c9ac4bad0f5ae54ece22cba249 04dfbd14950661cefcaae35a7ee273c8775d1bf2
+7b5110bda6ac70764dc1801b16e91b662364cbeb80884b3f6a0ab3e4c4028ba7 f7c4cf4a40255c3b0ca8d8981121e329478a92dd
+7b5359b4e59ca2f60b3c528c5effabb858b81b1a9b5cbdbf70977379230f8f5e 2da4231d050f9761ba615b77fae3ad00a7d479a3
+7b761468247f90725be8d05d9744bea962f660617685c76bf7b2c58fb125dfd2 b55dd77ea78ddd49d9ee082e2785b3c1ad9de7d5
+7b9d5e67db60bd61f55eeed5ba200583330d36ff4ecb53a6c341c2a6eb3f681a 4063e6c4aa51155f18adbc2bcda3d0ee63880c2e
+7b9d61429850c13d9e3f280d37d51b2e0e3873495d610f371ab45807cf0b3bd3 e8a952561c4e59ca308d1973de46fc32ad91a022
+7bcb94b54e168e6e26a3cb840139c11c0ae7634203e8a614c3caf1eafcef5fcd 792a1db7cf2e1cdddaee0446a8cab4bf0bf2f6fb
+7bddd447d756b99d30b72a45986b2324e161a728cd3af6d44a089656395b60d0 d23f6863f89e23c82bf14b91de931cb446294af6
+7c0d59b28a150c519159ac4562b1a4dbc1348bc3caedf70af29584fe226988fc 431007a7fb7a938d3061cfbbb438ddc42ae95c8d
+7c2ef1ea335fde84cc76d1a10e4d4012c1f5238e170499606509ad3c4530ab39 ae23486285f4e16896afd53b20dd11180d26381a
+7c41edf4209d1b0b0e793a714e78107e7322d7f473fcef602d52aa5664bb5735 367ab010d69ec4fff533c770eba5b1882f79cb41
+7c50daf12d9002ad995f31e02d6dbf7851a586bba49118d87f69fa8ee71ff890 9e90ed0d151be3fe089cbabe216980e2f00ab242
+7c73285498380b4af00105c8d1f887472d50fe26cfd3acc2dab9725a716f3efa 6d091399f96a97ba9bf5f3d82b43179c82a93312
+7c79b5d0b74a35d095bd72c42c8855851df2a6f2b07e926259a819306ed7a657 a1a5bf7f5e8c069ac59fab62d2f7a9aedf198413
+7ca86b4b5f7fa4d66a6dd5715334af377f3627977caa9d68a3472a6e7c3433bc f971ce419affdcf8545527ed3e55e6310ab8731f
+7d31d02993384dd0237937ba6ca89cc504fff2d366aba10bb81110a82f4de656 2cb057eeac11a10cd4864a66d8cf4b5210bbe308
+7d3909567be3abdfc8a087e14457d7238887602385f1700ef81ad5d65f47d130 47fd30c3508b95c97bc9177a59fd0e2d0a034277
+7d3b8d28c951267a7fa4c1c75dc171d8f0bb826b9b919bfbad2aa6d181a53a52 ac3e84651504dfc63c144d35e6802a111fc7d75e
+7d41257ee4425e8a204c6d6a4ab54f46f3a370a01dcb5d5abcf54060f411c944 ab9e1881cb3b612e775f1ba27f22dad911fd0cc5
+7d991a5ee9468d8278d9d790567db72ca7c907b7397136758e18c267e39ead17 caa749d19261a3d284833bad6d8344bf33ba6e7a
+7da15ff8e29e2eac38e6f4fac5611f4c4a396ac483e0be7cae06c9186d2808b7 f5e3dd78875f51a20d22e4bbe3adbbaa20974387
+7da21d9aac71e4797714dcc6ca3350b265f7e144e43715e9f39a401c4bc96816 767f20ca88fcb1617bedd49d413884875befc79b
+7e4633ae1b0e83503dbea4417f9d5ccaf22b877c5a4522b6d1d2b16090ee2f6f 8496071c1b46c854b31185ea97743be6a8774479
+7e6e4b147775fef8d337da248ecaedb10ed1f00cd308c85cd142055b5ed414e6 78abdb650f92cb34a78cd9ff17a013f383dac0f9
+7e9424c06052ca33bfc599bccadee60065d8664a9af7648a1455100c4f772e1c 258f0e2a959a364e40ed6603d5d44fbb24765b10
+7e9a1ff18073a5033098583da250301e2f813fb87a718e66b6c21e6b9d78b8c1 960678d19dd854cb3d5f1d234959a680bb8656ed
+7f14ad6df05c4b6444d964a5b963c3c753e8ea8a6d4b2f51819a90b841f788cc 7dd8a9f71052cc12f8dd9c1eec2e99afbf08df76
+7f1c021c028dbba42ebf0688415150e8d9eebb1470b5b23ad41f9b4bc5149406 6267cbc52698d2158581d2d63a4667ada2d1df22
+7f1ff49eb6a35b7a50e8e1054e0690127b6fcb866cc2c32283a0b595c39a3a42 0e6e7fdcbf9cf558f09a1e2b1d9ae76b4209ccf0
+7f2d965918db64ad856f1b565281d55dc401d04493a57079b85724ebf834b6a7 b51eb250ed0cbda59d3108d04569fab9413909fd
+7f2f7afccb317bb3fdd28555f126846dc4eebe5d9ae7b8d8a1456e8ff85422ce d76d8a6390d1cf32138d98a91b1eb7e0275a12f5
+7fa1afc6ba5045aa7a04b5c88edb03a13ad98702fe1a98f7effaf0a128a83ec9 8669fbeeb6d19f564281bd064a21a31206bd18d2
+7fc47fb594ba964d7397406b5a2ea930a40e870652c0ce3a30c16797d537bb79 eb9264e3ac14439f2036d9e47d31f6f94f073187
+807dc79b9af571de3b9c82133b77e38f81eb8ebc766bcaf2b2b2c7fd58feee7e d9903730e055e85e16e62356b11ba755093e72b0
+807faa3586b7f1aff2797a7c39c135b0196647c9ae7ee8843322accc960b2f22 6faad60901e36538634f0d8b8ff3f21f83503c71
+8091b686de8bf697ef632dda9b3179f2419717275e3bfd2055b303489dbbfa47 1b8cbad43e867676df601306689fe7c3def5e689
+80c5983f528a83fb288b30f073e52614f1530e85904c71974a5343fc4b16a40a 8030223178f0bc0ba83a453e0b7d1585de4adc9d
+80ec1e36b983e68664e8357c538cd35b30638bb0cb99626f906d145e2d2e2558 fc3c3a2083e9f6f89e6bd53e9420e70d1e357c9b
+80f961fefc9978d410b73aecb091bc67e255e94f7e7c601f8a6addad6866b290 13de54b9267a98310d25bc6cb06caf569b2bc26d
+80fe2c1b41caeccb5aef5b42580afcb065b928c4f95a1094d46b9ca1e3702428 f3d6802e942425bc120b6971e3bd8545059eb063
+81274306bb28af9ffe7c212be4e48209b9e13f2c82ab3821bd402b175a10851a 72b9511ad87afa7591ea80101da12f8c17bef161
+812be9eef0a2edf14229e1d392ca8d4957eaa2e45c8d3949b90dc3aea7950648 0fcfda73c48cc5cbdc6b0a328b9fdd7f2ed43837
+814681285f754a19aa21096d18507b24910a4eccca24cfc30918e830f6de83f6 83131fe4c37bbc26706764ee63732315906beb89
+8155958bbda08eed88c8ac908dc44452ed38911cffa54ccc06076f30a1ffb1bf f60079018b664e4e79329a7ef9559c8d9e0378d1
+81a810b2374dd6ddede7ca2b3daf3cf470b54b7e9290d280c6d7e4e92f076247 3e9360aff20efa836e3592d1c017edaf881b936d
+81b4939f4b31e1107a389c4964f1a987098da179f9c574cf7e5449a4e50f537c d3231f4399eb8a1887fb901798d5ba4abc02df4d
+81ba4e67aa59ccb078e3dc9ff3075f50084ec1696bd867e8e4284fcfc34fe3cf 2ef4faa0f82efa00eeac6cae9e8b2abccc8566ee
+81c13819eb19176803f7052925538cd08f8d0e3036dcb6caba2e27f862dabe9d 0c68adb5d31b9605bd13b92ac56a3ca6c76e8ee7
+822761cc7e699abcf0acadbf1c7717045de822f5373bb9bcec7c56cfe35e2c60 b9de2100b3991e6ed3252d4b240eb84b87e0aa0a
+82462a4bf3fd4d0de14197547370d4708ffeb5c3bd75236ef485d67fcf04ef6a f34fd002b826e94e60ed67347ffbedd93793fb0c
+8259bf4baab8beb19e2e194f36fb573863dab4cf1898f9c3be52efb0620137fd b433410c8d0c3f8345621e9b7f1603656972c5cc
+825ca0a496df92f4a70387d4e605a509d083b4f990830ababe6062e70592373d 68b3dbceec6248d67e7bd8b3065fd8d5ff417c22
+826057e0780d68f304f3a202e8444b7283d92c1394c75866249e67f312fbe4ef 0a6dcaf4b0c72cb913e860eb634535704233ba66
+8265075eadf051a5d5ba5eb3d620ad0a859693239c82128869450a057638ae9e 49306beee0b66c81741bee1e004706b7e5c9921b
+827595cea6baed7b3a76e99c658c2efe68f41efd0b9c71e76c39849e0f11f4c4 06d6e03af9a9bcfd3c97687f1afde4516bdeec57
+827fdde8c1c0714a38efeaa0325f252745eedaaa32837a45bf68e0d58354571c 195d1f67da1749b0a8d39adc087c5cc196238b59
+829deacf4c5316eb399ee7ed590a2d51192977c8ff901b8143384dc649be1e22 56931d1ab4de660b27c56ce488245e78f8c713c3
+833ecfb032c26b1a04cd46875e99367a6162e1720c81ee410ce504d7f6aa7eed 255a0dabb28beb56096af18dc20187deca4a545c
+835a70ea81f05845bae544217f94ccb867c80850d363f7a237df4e3242bc96c9 4a65039859952e2ffe776d2e1afbe0c7ea02d14c
+836c31befd72ff44f39e142cad83023dfcd5d58816cee2aca9740b4566150c46 ca52813342a2d2cc406c3173f6b6d65a752fb783
+838057f426dadbb890b29a79f70d68f566b8c1d19d1d954036e0d95a681d2a28 8c57e3ed53bfd1cb5f5d907a171a86140be37e06
+83b17ae4b422cbf5002107b436fb2e5ca0fa6c3d0ec1838ddeca4362bec37624 25263fda46ebc849617f65306ce5c626f5575340
+83b6edb74bd99f1b5042e0ecc2403959f19e61674663c245e76084ace8db9a9b 640fbbfd48119f1c4217e81c644b28e31362e269
+83b9e2440ea84e5e467bcf921ebd6fda90c09a1d781e8976b1550e3b0302969a 0dac883d02d2cd142a85f44f642afad79853e982
+84005e38a65f4115d5c94790010dc57e1a3297f4aa89744f5927f208af758bd0 10aa3fa72afab7ee31e116ae06442fe0f7b79df2
+84503271d3c088446000ba59060bdd4ac4119f6a7cc021cbaae918e86f220c17 9979e66b2e87b085ea23db0b4839b52e09639d55
+848b4725950462479038f34889436ddad0d3842332417707821571cb0627a31b 760529d873e72200ecd6cf05179fa0573ce77fe1
+848e2e89858bf76ddc3208ce52d8a6633d0b9c86e74b9d447fa0aff3911666d0 5a6fa6e57189ab9577c62bcb4fefa2b80cc16730
+84cfd6056673cb703ce9fc11316be0f4e9bd58b0c69af563ec8fd8b36a105847 37e46f4918c08ff7af7145dc364481a316b34c44
+850a21529a706f522be5a979f4b2dc685755658d9bb42c9c929673a99cbb09ca 6baba0d067c8ce4f23a148cb1b7a256e6fbd76b3
+85513265e2670ddd1ee23214af654254e62ac330883340cc73f1329014e53c48 b7c891c629d298f2d82310d8ced2ee2e48084213
+8553f7236da96bd44bc84c4281b4b3c059510a908ea6a4bdb06ee01bfe39a4c4 d7f80d5fb81b7f1ca8443a2298bdc07eb3a144d6
+8559f031d21ea80c51c33842e3df2b69a4eadd01786fbb119b321d457b40fb6d 4e7596567f9f86fead9cd398d3e3b056a2867fdb
+855d77c6095e55b8d217076bf2f6bdaaf5852cc4b7c189660454cb311c6e3be3 f101cec32d82654159d264d177ed9ae0de42b6d7
+85b09a51ca2cbbbb68cffe492c905d4b20e8c3a4f988f5baf7f5032e2683e84a b3039beea6d0637e131b24e8b6d61005cc1f6515
+85c1508d2b524c0ca3001873e6f0f8d2f291be2dad43d12375faf37ce19f72e8 de2220a48fcf7901432f8093d3223e65f4072ff7
+85c2f81898a85957ef3bf6783a34d161a568cffde615c3248f7ccd0021b36060 18a7f61c29ea8c5c9a48e3b30bead7f058d06293
+85cb06c94423ebb8ec44805dcfb22cd56419a0d502cd6a7eb3d1e157fa0b0c27 cbf7144d8b79387bb97f115273515b9453e94b2f
+85e0897e275601bcfa3d653d02bf6b49530d66d5ba2fa2977a6638059cff46d4 4195117c1ca5211c7c74366ba45b4dd2c8f4ec0f
+8618d77ee61738f3e6679b5892a7ce404bd0177775fa65d647892fd42dd4736d 56933fffb8f2329d098fb9ad6085045a14c9ec2c
+865c71423b25f5c4d2565a0189352e4162207a3e3d711488eb05f6e6553dc664 7f09466ca8150a7bb9eb9728841b0099b340dccc
+867eab070ee07beadb0193608a62052fde41f94ee70c3574395679fc30c6f021 186a08f4b6d4a08b1692365cfef59755bd8c0485
+8699dbbfab2d020fa8fee7abebf6ce00fada2ca40eb0d09de73224daab3838ee e8cc449fe9c99f9ca35088e3247ab9c0088081fe
+86e228d9904af64586e9a8378005ba654681ff5be3c43ca930bf6b1f28d4395f 6336846bd5c88d32f93ae57d846683e61ab5c530
+86f7012dddeb074d3313851cb47e7e6d2a89fed1d23b030131b7b9796c63beb7 71d0a2d522bfbc72bd8f518ba69939b2123e3f68
+86fb56a271a202b67ce596425048d4a2d0b5d0f320a196d3a4c9b6ceddedf1ce 5001298e0c09ad9c34e4249bc5801c75e9754fa5
+8727c60dc37a204127adefe3fd92fb6e1740225f3a1d8985ce29458c322ff169 ce4be0c1c06f8e311b68f70c89165cff698d5c85
+87ca3d9823e24cb99700ca833ba7aaec3cb8d34eca32240779930de95fe7caff 27aa76e5ab35a01a87512c5f6b215d1c9c736bb0
+8810957e46cdfefbea090991ec0a237fe844f0b4cad1eefa99f05f3c421f3e3b d76261e048bdda2e6d2211aa308e675507bb434a
+882f8c78660ab5efc60c2259e8fdc601ccf75c16c5f787e689314197cd345793 796cf9d0a06b922a730ec98984876982c2d5bfd5
+884130c0e07babd81f0679e1ab15f50bcde3fd076fd540f42c5f7a450647c811 f5be02b49b5b3ae73bcebdc94a84893a012bf46c
+8864b5746d7c5780083bb98449a3f5bf78d8281e8c5e3fd12a8ccd9103eb3a1f fd0ec0333948dfe23265ac46be0205a436a8c3a5
+886637d6a4c8dc11525f740a2e3723692bc67f42753e7b7a75d4e9207027989f b2899380601ba014c011ae9cf00a675689764856
+8873ad21d0ff871dcd53e0b2c4446a7da3439519da9c7ee509bf9a09cbe20e16 e2fd2428625c296a3dcca706dab7873368ae2818
+88a6c8138e7dcc2f7dc252dedf17830b3bdcd67021df4538c05dae27293ee343 ca65c747f8fd5110284f21d624fddbf87f41f836
+88ea074339e8277b932e8ccd92bb661e1b3dba88d86d31e5029577b41da793d5 5e15176dac8b0baa6f7950f5f763608c83b29093
+88eee581883a2bf8cc278592faec71b3964b36033590ea99e211b298101d2357 c47baa4adba9bc69f3e4a78e4b6e295b1f20634a
+88fecc715077807bd7ee9e6a1dff65fde000379e0bf2a15cc2404469cef4c82b 5018a35e0b7e2eec7ce5050baf9c7343f3f74164
+890bb959ac8c20db603bf083bc82f55f9f42b6dca6581d941d0b361188abae3b e032d863f512c47b479bd984f8b6c8061f66b7d4
+89117557e4b6f0e5fde4d058c32582418fda69ed651551c0d682b0bd9a4f5343 ff87c872c7846c5725ec711b6d2005febab7d6be
+894fb499b85985208f105302d3cf3d9c5ef13b6e4c51ba4233656ca6aea65cf5 8add01539268300564482f854412cfe9839e980c
+897f5f26ba1178254ba5170ce0cb7a23a83dcfb1e528c87ad3e26b89c62cf9bd 44debd80c4908e439d4a505ad7f6de367635b0eb
+89cdf765f35bfe191fc18ece04228795566f412e0cd6fadb80102a8268c99085 605324ba5ba92d44cff024069be576817e41c7de
+89dc8ca30d409ad37a872d80b88661ef50d6c226a37989cd089e60c183609b35 6ca549d9a75628c1703ed6d2d06877351a268a88
+89f819abdee0700e804a202787da29c6c14aae8dd6d3b8cc04c50cef70c44756 802589d07105d24bc88c908c9e62edb3fd679895
+8a0042d434a2f8a2e8d47caa4eb454f388752fb3fe71150c1cea12e807cfdf1c dec93efc79e60f2680de3e666755d335967eec30
+8a1e1a6cc00519c4df8ce404c987751446fa299662308622cb63576fb52996d7 6f2cd729ae42988c1dd43588d3a6661ba48ad7a0
+8a5dc4432a7a135282a588c0249f63895f8cdd2d68906a2e94924ca31c89189d eb9ac8b7622f3c144605733fb4321b7cad8c41f9
+8a5df168a787cdbb8fc1560d31fa917061c53071da52148a8b63ebb16335091d 16d9bd5394fcbe6cc3dd5cae5124bd8400343e10
+8a9b600a21987e6ffddbad745f38c115797eacef9117043bd9d2da4835ee3cc4 0fd7e4bfba5b3a82be88d1057757ca8b2c5e6d26
+8ab64652ae74f7d9866fcecf118eb9994a0083fa7e52a4bc49a29e9887a2dd7f 9bdf5bf0bb8dfa08e11ea902931100c4605d1d09
+8acc0ab2fd3b22535ef3f534e51a9843fc8aa927903e1157434c9d72b1ff1503 257bd746cf4b3f1e048a640202493c3e3bcdc1ae
+8b399358a71ffc0adbbe2d3160310e19b5a08da84565b0b74f4ed24d572bd476 ba0bfb30cd31b4d6bcebfe9ff614794e4f5881b9
+8b592ef1a82b329ecbc463843ddb64c4378787bb632999461b743c8c41ec0d82 2683a6b43d73cae20a876eaf50b541b8efc18e82
+8b9acba2b7d2bbc3947820166fd0b7fe6e274a1387957cd6488730d243d762da ce02d0ef9ea8dc621df41d3f244858bd60f41d48
+8be5e8938f38464bf1cc68f917fc9538d598bd4e35462ce33777a65bfb98b504 e6e4e04556df092bce179810d25ce5330b34d8d5
+8bfa45d9dceeee0ca326757a5c7feb70c3bbec6084ffba27c44acf73270484c1 80829e69e76fcaf3eecf606794fb5beaf3561f17
+8c0f41bacf4388237e1e53c564f3a0fbd1dad819856035fd41370942389cfac0 01b905d074ca43b1b84f507264d3175e5659acb7
+8c1b59c9c4abecdd5107384206e51fff8ebb6eda359c6acc8ae9d608f777920b 3b104436374b9785fcca167c9d3bf1e751c1e56f
+8c241c359f8adedf6fd0497cc05f5821570e05b6d92537d7ad8d5d12fdccebc2 bca03c4e40b1f29603ff131d702c46591b8ff960
+8c53c0f9f0972a1c77e40549170b9ae51d365c200ffc4cb220628c5bce3dd0b2 d047b47aadf88501238f36f5c17dd0a50dc62087
+8c834cad51361fc89cee23325b17dfe11294cf9241f2b7579671e6b2cd45d79f 8844825b8244e0cc54c96d73469a956b507bbf8c
+8cb46741dbbee92758abcded6eca24fc2b74f43720c8525633a80410ff0e2b7e 331578fb1d3ff7013b312914fa9c78ee61d8ce52
+8ce4527e0214a617e08c7aca94006d77ae31755ddb5f757f635c0bafb35f2afd e8919be6068c14b5c99b828af9fb84769ce1d79e
+8cf83523411bffb0b74c7f8b5f9576b23ca2b2578f93ab8ba59bc6948efc74fb 974a17ff165327d457cb3d50324e122542255524
+8d4fd5f56519059e2797709107cd15d1e62715e26d83a27eec8160fcaa57a7e4 06a1c29eb70dd0b5f43cb58052641dfc6e8dd2fa
+8d79784fd1848028802597c0ca8342ae4b7c7eecdcec8a9f806f537798f74110 b5e02a3b76c602bcd6230826850672f828e67d23
+8d9d39e6fd6ad7cdda32b877633dc72a1fb7f4da9ef96aba6c284ee9f32ed71c d44cfd460e2c52d67dea14838b03219967cf9cb9
+8da4f409d9349020273e9fd00dc8f7a0aaa655b5351af47c9a220ee542a31ae9 7b2a0b6f0d56e59dacf05a30087b58c1ff93cad6
+8db27a1dfe3454a225917713da4b0ae56c617de64876e549541e8ab991f2d1a4 5ad63728f19e4c606be7455a8a7101c9255b2b21
+8de876e616d65723cf46a842086e338036f8d9ad6c6969ba07ce2abdb27271a6 0f6d2f4cd1a1391a98c6a89e2ee6a69c0afc0c9d
+8dfd647590d3913a31bb0d11ccea6df7655b8c1c2898c49e85550fd5491cc3b1 07b63040096107db747c6c80b02b0619e6983ec5
+8e3ce5aaff68c05137728f5845d627de532b2294b665c3d05eddf79972439909 b27d0a8066fd0fbddfcf8a30b4e77760147b0817
+8e50c5148de4a8ba9fc799c67dc669d6f82cf0a10ee9f03bfa2b5a3641762466 d1621f2e35b6db0d27cee8c6b1b03c2199d7dbd1
+8e579056a6928f364735405ea0694fd779e51a2a873fa32f3c1eee7db4ac186d 45bb348411937ed17e912aad83a14c151f922215
+8e61988c998c96a131cfe72225fce43e555bec4e590fa8c239373172a9d485ce 11261fbff21758444d426356ff6327ee01e90752
+8e67ab781e8d1b4f8c35972ebc695bd8645f51718ebc866be72ca3863956c3f8 b864df623e3b89ad678a888dce4b0d4c997f1ac3
+8e786640865ee4f226cc81422201c22dc4229852bcc61018a2ab7c73cc9c8e7c c3b53a3518b99b4ce31aa3f6e51dfecc5bc772e2
+8e7caefe45c938cd9dbba149c377c1cb4392457f11b1d8a258f464a24752a40c cc57d8aaae44f013e3caeefbf401ae96d858ec9b
+8ee7bff2cdb8e47b525d8d472fef394ba46ead8db298dd5bc09c89313bc4b1a5 e313f6d036812969a06ace47a56c539fbdf8e82f
+8eff6924525965875cdc054d19a4b3a00c5e7c57538ef7ede78461bb6829c818 5ddbd5edf83e034a62499a1a9c94645d7b9030dc
+8f74f6adef88cea42ab0854fae5f0e3f195edf161acfb12d5f65a5e9717f0cac e235f89f548d732c4e05baa54b8b3dbbaf5537e0
+8f9cede149494538f4de2ae7c79d5abf3e8309762ed0846a9d2839031cb7b456 7dd46af6b7c177bb38c3875ee6d79a78dc1076a9
+8ff22fe4eca09e4f6bec8e71cdda911f37d836532f568bffa0da55d90822320b 6bb7aa1318f7f31a346c71ef81d2b33c6fd41600
+90115fca32a9cd85c4c9c0ad4c23e1d2772e2e91a105d3ac3c92b76f895f8b92 5c0b005b617d01c512a8dbf9e9dc1aded652f244
+901505c3355518bee35475c5d3f23bac1dded688b2bd314cc32b7f157e100724 c47800c7266a2be04c571c04d5a6614691ea99bd
+902a50088f5721565b264e26665043ef0de4e9d2841414ede099b24b3793b1b2 e2401d52544ebf052730a63e8acfe4ccfb8fa0d0
+90445c1dd3c04315c85766841ef3f61e3bd6cf0685e03382dba4376426d365fc b6c9e4203b69a576ac5c462241a7e2f676cf551e
+906ddb4156860b47274ea8ecdac5f374ee64306d9b9f03c34bfc9df5afdeb7b4 74eff33f8be680e821d9674ab12da3c0b76dad23
+908288eddd0888db0d536666139e193ae7e2867d214033fae2557701a5d8a9f9 80133dad8aa9b6d8bec7050a77d603c53ecd8512
+90884a4cca02648ee29efaeb429c0af915e0d2eff2d9aa281aa8dfb2d86f415b 470704779e16fdd3872fd111089ded59aa12a576
+909cfa7665c9be2db4a58346155ac887ba00f6079b76f71b4f7d4ed9939cf0b9 eb942285420814778642962e7b4cc95636bce88f
+90d744132ccf86487aaf3f51ebc92ca3315c59c48e12b4d576e253be91a0c460 50acd0c53572be81b5c54379b2442b19ee240953
+9107412362d36b5e2350e5b3e3b6950ed4519963bc036b84509f452bfb73e580 a24f1bb1a8d16429bb17455a5f332eec88e777f8
+9112f74e9c8db2d4574bb1d568099294486e293e7625b3d6baa257970ac1f81a 1765d783910805c69509416785b2b780d9b36866
+912aafce2240cef7a68ef8c0e53e10b0d7450818c471f5b09f8f718458ef9c4e 1e564f1ef0e3a4a5fe861b46024daf93bde4834d
+9197064ab68802fb19dde16fbffd2a40053b37850ea393274d10b3cf5fbfbaf4 d337abf625b6912fb8501993b7fb2b472d5ebcd3
+91c9d8df151e1161258091beb0822444b9af63bdebb8aec39417153503c0b669 f528160ee7dcb57d2c56341befcc00aa80393b5d
+92128dfb792caea934f5218807ec993867b0c8487a3de69ebac33e067f64d38a 700f55d91d7b55665594676a4bada1f1457a0598
+921be768179935cee45bce4a0b2d27ebdcf05ed06c7d10fff2d9cf900298024c 78f9923320d8c6ff69015ffa8c0410f6599a3499
+924786a7e975fc305e917d97cda11a71eafae57d7b3c916cd84536a0c2487a76 685145309c964db9a49d6b7ef96140db6830c131
+929ca73a254eb7b0dee0a7476e09ba2a53c0b6975473c9d7574afc0228c34e73 c22bd2f5514799cef5657d67dec855c6b32a7eb7
+92a2ce8258f27dd45ea652d5336dc3685dd3d60627011f6215e923318f7325af 15c883bae698321aba3b162df438254512b316eb
+92e6474ccbb1fde2326731bf69e57142cb428ea3e916b71b2980e4348ede2a15 0e3ce9a193137134d355caabb98126cab35ac236
+92eb919acbba3d8094a46d43a4fcfaeb6243859c3c15b2897e0f7f50be66af37 4e67695cb9de10a3dd32f78cfa01eed91ebf155d
+92ee0adc53ff899c85d7f42cece06277f063d89e0b496e735fb68b25d02e2b93 c1044cde11b3aaad524cb3ea49d75227ed7e5f48
+92f0bd5f6ea173aba9d25ffe352a2a7246dc32e30f0aa2905cf566464db2182b c117a5386c76f01b4c444f608f4cddae9d1d2233
+93010571894137ed6a1d91c6caaa46adf9437aa37e672ec4ea55ae0fc434d601 f6baaae117d058baa0865206b834cd8e32fa4e6e
+930d5c174308a2d7109171b86756093b656cf7f129524b1fd121f66a840f63b5 2351b9dd3b52f5421a6dd9e2effb503497b1c447
+931093620e5f050e2127fb0b96786ebaa9ee6535fb698ec01b5f7a800fa27cbe 1a443023183e3f2bfbef8ac923cd81c1018a18fd
+9315ebbeb52ce6c79a2998a3bd9486831c6d2b2b3925326a3308aff6e5d879e7 524570f2c3b95b5a9f1c8df74893451e04f1017a
+9391424f1c846bd6e8aa6a2ab9d1c9896f415068f516217c20484705763082d2 04c9c16e55c53fc12c2eed43e3d7e42f78fe7005
+939db02ed91a33c32932ca7c00f3c5f18bca0c2d348c06efe566f70bd3b2d18d 96f702218fe6bccb09568c2ec24cc186ace8c575
+93b0ac3a6caa8be7b891ec756913b8f3f3071a20ac1de863b16c8037e2f4c21a 84a13dc9b196c2b0db6b0f664e4ab2bf9d6ce9ac
+93c3547a4e0bdce7c7dc444b4cc7204be32bea44e740daf0a41cd32a069fbabf 948171a894ff8a25635232606c5afa7bc3224e38
+9454571eb895fa350d59a9fec2b5b2ca135e1938dace531702ca77bc342424d5 4633dd81e3462424635f7d231a2373971ce736d4
+94a67a2dfa7ceb5a3416e25db885e3bfceba064499fc4b817d7945cd271b1b75 1801cf406d4b17f019a789ffeb9346c1cdb29491
+94db24aca3f8e07f481744f62633730feb4fc47605280381a08be510ae971ffe 91822c50ebe4f9bf5bbb8308ecf9f6557062775c
+94ed253efa9e86fc636805c294c441d08b89b455903c0c14e9b16587fec081f5 43e968a905a821532069bb413801d35b200631cf
+94f81211f6452f3b46656d5ffe4ced3377ddab58a2e9063a6a4b15cba49cc08f cf16919dcf33635a64999185522263bee1428e26
+9558e844b96edf250889c0660f121678993205d280a3e488cec0605b979f370a 7b6c856c6e276e9a3689914797d2598a37f4e1f9
+9565fe314fe3bf77a01611ffc14a48246459ad6a19ea01d4082522622fbd001c 1cd20d3af067093c571be764bef038be1a39b502
+957a8f955cfabb1507ba2fb3bd3a859a9f74b4707424dac86ac543db0d69c667 09845e76453ec9527128f73fd5ac7114e9158432
+959c738f7d2c764ebe052a66001643400118c7851aba3b836377623501a14222 1b9e92c73bd223661fe63dffa0c9138da4e1ea80
+95a2dc8f7a4fd47c27fc95dc9d90923d11032f4f436c410c60beb6f4d5b6984b e2337f39c3a4ab046b7a572fce89df27451fd2bb
+95bb14319c7449829409166e9e1d1a750938bc52ba7523d752150636556803cb 5440906feb5e41241a699ee413475b7911284c41
+95c49d1abdc7b172424e8d7db1f142590e40c04a882441728b1e9b2268848cf8 8953b6cefc86a339924d5d0ceb7fd523a149fddc
+963954464526b415ff976b8a59efb85e521ba5239faac654bed92979fa976f92 14dc301e7f99cd5f88098e32366951f803e9832b
+9670e7ceb635f35942559001b8c628211efb5bc4f57380909523fd828c706f93 73bb602a74eda507838372d66093c8e85246159d
+969287ad751eaab33d0109bb39436e2babafaecd5ef8405734713431c64250cb 468b12adb15f5546e7c5536f72204605fbd83f6d
+9699ea5560b7b35db0fdcd4c7d50269402d5624d72cb1a8646b33b65dd416c07 42608eb49e4be32002462b51e86065368b342c05
+96c18f0297e38d01f4b2dacddea4259aea6b2961eb0822bd2c0c3f6029030045 45b983be36b73c0788dc9cbcb76cbb80fc7bb057
+975c9b644598f22c51616e9c8afdadff852639aad6c08b6c7bae1a34e2d812ee e34dee0c7f0ac8abf228369e1016eb6016c40758
+97a021b36da9610ff840213c9277124fe653804e85f2081f6dedba953b5706df 8a7d625f53726fc7703dc0a413686d1ec15488e0
+97b0e3661fa0caa6200c50381233f8320b907540ceb9d17ac94fedc66fd093c2 cf6cccf1297284833a9a03138a1f5738fa1c6c94
+97ba6db30e1bcc6f9e5916915fea9dc0e205599c97586f7846b9a456e5e9b6b5 b47ba8387c1d7209d4976af9c3928f6ce93ed545
+97e00ba4c8028ea91e7131c8c7596227cd03d3d2d14ed2d179fe0f305ebbca39 6f6a17db05a83620cef4572761831c20a70ba9b9
+97f425b009376be705660ee81095773e10fc99bee7ad513046fa0108bdec5d22 1594f6c292f52e077142ffc0f35b544e2c5dc108
+9832b7f86876eb62f53f0fc649fbcae18dd43f2ea05ac7302239f7f91848d554 db01475e9527b251dc429b03a96ecfdb2928aa1d
+98488e25f5011c5d690f33397fd78528c38921473a0a4bb4b3a4d70b0f5a8d84 8a8cd3e5f3aebdbf53e677b176e3a434231a26f5
+984ef110535289c1e7afa6a33058e1ced09d7e0da058e419d8ddf8e8ca060b24 07f4f5f82f7825893865e8404eb2bfcf4a2e6932
+9862a961bf9c8b544304d2dc638c340b9c9aa6168ab4eb93e309326adb2f4499 657cec1480bf4d4bc58119da119f12a5b0545b8a
+987d206013d0289d45845304b00c8f9adfa2255ccbb3545db0157f79c7cb8ce5 655d381a1948783d7d26ff9ec5ef54ed6bbefb29
+987db14ff31dd4b8eb26b09aa1abcfaab773ba9c27b6040d47033678e7cfd0e7 121c862c3a2bc66c12b64903e508d8bb8d2904c3
+988a04ad188e91c521853685421f1b7d8b0a00767a6fee4c58a98bd1d449c3fb 710a14e927dc232d94caf0fe87a42f0ffffe4b79
+98ab296fe0c2cb1cf8c37553f659614482e37c84f0b50fbb63e9eb33cdf1f85a 94b6d09da1161aceeaa537f55802d794cf021627
+98bdca06d862a2b96154af5b34e7567f60421b307d1b067a0218d6f3532eea0e 6cdf0445fc0de286fdb7a343a5dfcd1937666132
+98ea93628189727f2a49d3fc8800e24062ee013433b4914e2f8a6406be1b733c 944a1233c2873c5e21f941460c3940f8a563bdf6
+991cd4eb50d0bd943326a09398c691e3715278549d2e62720c1a90495996fb85 51eb2f90a1469542799823e0f3249520bf8f9cf3
+9932236d190601ab8f93e8ce8ce0fa59dba7f393d917390c1d53b34ef05b41dd 5614dc18f626902796fee9c87f1f703694e59295
+993f6b6de11fdbd469b7f1fab0d06ae9c97e47b4b15fea92903cc8a5f1dd981a 5b9c679bf878b9eec21b022f662da96601343fdf
+99556a8adf928dd8b307733e4ecb5a8ef495b490011158d71960ee1b0a0e0718 e3fe32b6a4ecb340fa7c9802285711cc52b8a101
+995d546eb0fbe7f94b918920c68b83f8f92a2c433e48fb458374d347982cdc33 35df53402ea1bd8079cab9bdbd887c79319baff6
+995f00a0542d56fea94d5ec6bd4912016c7bfcd9f0609103766bb8c8a0d1fd50 daee7af942c5f7d25a00e3ec4d25eb587c61ac94
+99676bb02a367fe46c82e0d17e7c0f3e85a6c39c3a7f51233c85bfc73a20401d 8c870fcebb8f625a8e172a49a44153af8f37c8b7
+9969afffd2839b9abfae52451171231fa3d701bd6b3d0be45c2381cc993278cf c7cc7cc6e3a1480a18fafcd08574a337648f68f8
+99836286369db283d666122f999d6bae55d099525ecfa19678919c75de3ef920 558d6aece77743bc4be56a0a62ca9838131d217f
+998a830952adcca170929a187cdf235190873515a9d8577dc7610373720be0dc 05504cd34d6ed35cbc7c99708d226758a1cf8b57
+998da46ec222491d7911e92bdd6711408dae8e47f65007634cf0286f78d042f4 0daa6cdcad92746551f78edfa93be0bc188d4f4a
+9998dfc144a21e3e124bef5dc0f9a60e0feb92d600ac1e0fa77a329b69f0d256 4319860c60d84ec2513be34ee1a65dec5eceb6c4
+99add46dddd278865eff998db5c7e17e806ab0696d7cc8514ca638873fd4c6be 3fdbbc28dc8eef8c0bc32fa6940a9468307f2dc9
+99e8fd0d2d4d41d946a1bd932c4dc4c600ec25ec1ca10d3dbcbac0542c85f01d 84675cbcb6c1213c1e662afac915c861999fad7c
+99f3b405443221141eb0fd1e0cca5d355f893983749b7fb455769fba434e7945 0266163a49e280c4f5ed1e08facd36a2bd716bcf
+99f81d6e58403d464cb05e5425c6db0219ac6a03dd4b12d8db19f8ad7894eadb d435e706e0daa21e06d16f00d0605d598fc21b38
+9a2db41cb4dfbd68346f5aae4ef7a75a2756853da451e62b52999bd40712fa08 f57d4aab1617ffb4b923ba461db47073df131478
+9a3436818efa95ceed279b481957c3881d4387824b3ac7d6a4e5c4cf57d1339f 9a2edb897c93a7d1bfc28aaaab1b9634dd684ff9
+9abb7801e72353060a1490ffa3331674d6882558e7d6458de397b4b00d31ff8c 50330c02bd4fd95c9db1fcf2f97f4218e42b7226
+9ac1548112cb48d9fbe867db82c9a73eb6557f77d941f8fce68ff14d276d3e87 2e6776cae6c71d745beb9e102a4a18429f3c4cb6
+9ac284bc88212994d14f96edf294d17a7a4796193e3138f84f9e60eb1294cca2 dbafe4e0c5def65ebcbf13789a84e996cdf8aa25
+9ac9dca313f55249c085fcaff33f161594a35636e465e10368e4ab9e7b977b87 91f3b517f65492e5225d853826e3837d404c6ca4
+9b66436f2b9350f6d20d44171b51b0dc1b8859499ceb556249635125a86578d0 f2e2e7e17751b629cc3c13b0a7d0cab059cd1df4
+9b91942519f6ea0ba7841d14598c082615cbf66066995e85859813d3eedb43d1 62ee0b89958479ae19eb68f18bb23de238a6a2f0
+9bd609366724dee19ab10d3f795965cbedf785ce8572f56dcddd42f48454ac91 16b9dc5202084b857d167c8af606422df771b8ab
+9c0f06e8344fe1af55ae50f4be06d090a443c24455252539371c9aab581699cc 1213764b28dcd72fce1be359db724fef38265ad5
+9c486e5fab95b06f1208424d889811dfaa8d498ba8a64af6faf2eab78e005baf d4594747a02e72be9399b3a54018676e0799be22
+9c4b7bf896a50fcad21d07e1a9c21786876c78350dffa6bf7309ceee396942a3 3d3552e8fd709214634435ee188e6fb4930e7b39
+9c627d7d80e595ff49c610c35fdf73d3e04757b12c75b724270cc51b1778f781 8c08cf624be754f3ba55777638f6cf54007dc516
+9c67024053a5a19e5c5f27bbd02419c09194a13d4cdce62d5873b9d6289a5e55 e5ff267406ab4a456be0b46e38fadf8fe822e13b
+9c72eecdf03014bab3444907a5c9b1abacf3068537c5c7651f9492326205cb5c ca88eb6224eb55fefdf6ed43963b5d34c3558d03
+9c7b63b5572f9c6e49382f5ccb71e77747a7fb3723d13dc91f62fe6e3bbaa5ba b3099082e5108151c0cc93ec6bbf8b7d6a28c4fb
+9c84470c221d8722ddc005be2e4e9f662bd4ddedbdbcdf0999328b84b7aa14ed 20bb1bec4aac38a69c0a6fcc62919a472e33a136
+9c9d32c9c37ea95e0e7a22420e60f28c4ec7d16076fbdbeb9e16485fd7323975 3aeb4c1456431b730322d7a7d88f5a2ff60299ad
+9ca320473e41a10134f39c3d2361a6bc82c68bf5328ece73146233bddb2bbecf 485eaa8bb045019e615302bafa10302f86a01553
+9ccfa556cd7f73b426a7bedb7fc3a850e94f8c5ac1d71b9afa365a89005aff54 db793a00a5615eca1aac97e42b3a68b1acfa8bfd
+9cfa4ebe14380d4922f098d03f17be12019fa52ed3e602b9925ff90f55c5a314 c94eb4aa7665d04c8412a72f3554401d2e89e03c
+9d59e5d73d2bf09ae93c4a9d7afd5d4b7e983a20fbffbdf97ad78eb4d949f3c5 1554ef7957dd89f4d94f00dfbcf7989d3a409306
+9da6f7f0cc86c1260d40470e395f1e86aad5ab8e27d29bea60cec1d35c017b64 b946f1a6f5fd8b14500fe986d18d1d008cd00f18
+9daab17c25f647d652c72c8cc3cf4602c270a369beebc7d0b67238897bbc426b ae90f12eea699729ed24555e40b9fd669da12a12
+9db520a5a88c7d75b86a4faa1ce9010edf38af922f400c69a4a93aef69e25c4c 32581d0093429770d044a60eb0e9cc0462bedb13
+9dd0778372a1290bbaef59f6c04ad41776480beb00e529f6534550ccdec849bd aeb13951b1f97e44e4274201683e090cd7644046
+9e0c79efc2ddaf22864c1fde0db347832bc1a4e132fae802e95b6b0c5853c2cb 8399c6e8a4fce8eb0448429ad557eae77d2d78ab
+9e2bad8166fbe654963d974e55a2f08da38a9e3d1db676a5a2c14ac3714b01d5 ee0be6f12e1e53703f2320e67389b85643305422
+9e77f6b7446eb082bcc2cccff17f7b83c69fbcb03117ea110012cb8bbfc37515 93407057f0107cacd2ec2fd97f940ed842caba94
+9e9f5a22329db59e32b25d8bded97e479d9fd505c6b61a52e6fd3113af5e88cd ed6e85be8971b49a86ef11745b5a27bfa4f4cb2f
+9eb5ebb282122e48e20e161b3715061c4381c5e6a24512b0109c195d2f2ba73d 154eeb7642b8abbce7954016ba549e399ffeea24
+9ebb9db12bca36755036e35e51abff05eecdd42a23c620a2a372d7cfa55fee52 213e720ca80207fe1bb48ad95e2c422e17281a9a
+9ec93e31545ade8f8122f1ba534269ea72fd84f1ce0b71c51f40f74b23cae7b3 a399208309046656ecc01f7653c5d5b8905fc16e
+9eee45dbee480fe07ecda366c972abae9c1a4f322f4e2a00143638b6b877fe10 8929a79acf82b9414cc37bb9f464c9d0bcb384d8
+9f063b7c95baf5482f968577719e51ae9feafc11121b1d1c2b1460ed47ac713f a870abdd5f33c3cdd75c9c6229207346d1a3e5a7
+9f61cea7f0b3e6e51d51b3c63cdf7a875704cf5d8bdc20d1b4a05daff2275286 f863bba4dd0964e82908ab6ddec36bfc26f8bc48
+9f61f57710e2f3a52ba694faac763f14fa68329d758e713152956f67156aad3e eb160e949ef7a76c384dbbfa0d61d580a11d095b
+9f6353cd9e03b3325fd0ea23ff06cca2e7871b39d0dd546d023743ed4d0e9c81 47d75e0475f54c1f51fa4f3a508e3a71bb3cf27a
+9f68e485be09cb4f0406832c3043ff73bbaba9057dd32ca5120bf58fb968dcd8 c341bd71e5bc97d012fe7d788f5d95ad61f421c9
+9f7d9c3ff7c7873a474c6e71d117de23c0ca92afd7dd838e6425de0259d807a7 d17bf1cee2b79f0c371cffa58246faec7fa70292
+a05508af8a460097b5be87d0d1adebd9965d001c00c0342d5823d62f5d504147 d8b9e83ad587491de5e0ce5e105d6732da7efd02
+a0806f2837164079433fb98454b3beb353b38625d7f1f2e5b2737909a2fd7f3d 9b52f4120bf54829149cb3ef756dba5018fb812f
+a0a1c80c937e6f8c7f4b9deacd53dd76b6f9bda0710ef14762f26b5c7722d85c 488de7f1158680124370c16d9b5787f2cffb290f
+a0b19bf38b63a7127318ca02600424c2cd491023af9dce6d707c0e5891751207 bd65f47097a6ff27de3e1d908ec1d53cc6b0fe48
+a0e4131177d5b53a0a0008fd5ffa88bc29c07ee6c3020adb8f45751e28eb16c7 5c7507cc2e5b04fb9acba04042d900f15271da8e
+a0f3dac8fa0e22dcf356aecbbdf79440715687c1053bc59b83354f276d688ceb b196a807b323f2748ffc6b1d42cd0812d04c9a40
+a0f8444fdfdc6276b3b2ab225d14358833ac50141d73bc10cd016a063437e6e9 d7fbfe155fbddb41936407612fbce9c34276b671
+a1034d13a76b0d29b83f6dadc5a44826ada4accc7889f4b2f6ba880763f2ec36 634e22b2323599edd0d177e2eaf69e7ddafe49b2
+a1053628fac1667c26c16ef757cfb87f4bc6553b90a659cd39bb1d46c39bbcf5 ee1765e529ab6b44adbcc6a0ff6e9ac1359c6cd6
+a13eb24e3a3948f74a9d83f553c937e82cc6e2fbdb7948bd12f2794d822fbb6f cb5245e80f90f14c1b8daadf95bfc08d29c2467b
+a13ecbc514b571721a9a1c92af7f89d473a5fe13228904f8d17368e71f273ea1 702bd70595a7b19afc48a1f784a6505be68469d4
+a14fd01f6c75813480bc15c6f3ec6f8a2b18c541212c93fd96f6287fe82bc104 6829e2c4923538bd75c6ad6a2590c1aca8d4a212
+a15a130a98c1cae5e6dd70c309b31bc21fcb9ea731653d21054e0df82d4f252f c18626eef6cbd1b420b85fc9f8a44d5031ad2fcd
+a1b4063379bedd4c5c0940aa2dc8c07b509d3a5164a853f1b5a20d156a7c5c33 b4440c0becb8f009bab65b3b3c901a409c49add2
+a1d1162067d6018f0b1d90daa0ea14dc570052758b6a3171d7895073fc15d992 7350e6337a2d94c2d2a105845fc78ba0ddc89ea5
+a204c52c18c7bcbf5cfd33f2739b6a67af9938ef27d904cbf102f5dda766044c 0c3aa34742a8470a4ab4acc60e061bbd9a85650b
+a2127a5161de12892e23011d647ef0e291101a6120b75de2a8cad765e56311f7 880dd9e150364fa22ada592cb5daf913e775cfbd
+a215658dd4f0927c758ffcd6487b359161f0ddacd2543cf0fe86bf085c174bda 870880896dd1c399bb940510903a3639ee61bf68
+a27bb9f32d0647d311aca00a8f7664d5b30182a0eda31b1352f003bbf22eb58b 36cf0f3c2a9b192dde9ab57992dd730a54a2e302
+a31067ab4135316257f12ca5852ee49031e0cc3c62fc7e36857356a1311f864e bc7ab9aaf82cd5778fe998117b465b5feeb58c41
+a33b7c23c1f42033a24b58f5ea0d33aba4b6fe18d4bff86f0f70a4d266b66b69 64b5d4fbe7bb8ac0a5dbde1fef81dd84b593324e
+a344b247217e51783935ecdcea5837be2f47a56172d3dcc2069936ef3d25dea5 7c866536731236d38f1d75711a2af253d479dd8f
+a37c93ab010ecc9c7f017623c38324ae2b7d06385eca57fc6da35102a2c54a54 e5a2858907d153905dbc09d1445779caac0adc6d
+a389c085c2a136c9a2c2b4a818b851a87af9904f933d7fd6aa99846208efe800 f501265f976a745e5c0d21104635d695227171cd
+a3a074de072e21878238d9d7b7b1081fd4dbf3bdc50c145e85e6e4d7a09d7909 0967f654549002d2b6e8495c10cd0bb20ff3afff
+a3b7619b6d836ece7d4dcd5d35eb3cd636b6ad1fb22bfea768ea5d4102cc9ece efd690f67a58c2ea1c3984397c2aefebd716d7ce
+a3c8832d145147c568d4954618aca12117705d399fc02f00272fa32f3ff95ae0 dca7499de88fd02b75a47bee8def272c14b5f7bf
+a3d3035f44784137774392f722a38f0d5a43b9df0a631531d0e47c48779cd940 141d3dd299cb117c277cfe0907b0ddaccdaa75ac
+a3e39ed0693d43349755e98d7e125ac17b5d3d2a5dc232b8d5b2ba01302ace04 c15c5619a51d0a0dc6bec0d9961f9ef50c5c2178
+a43230765f7a5a3d422ba2e7cfeed85ad722551db2ac6784b04f6f8b0e1001b5 ea2adb2520150efa688d3c48f03a66de3312bd4c
+a46ca0d0e30ed9fed1eb8939c497f79aba95b9e8e4e712079d73a6e6ebc70d72 f0374c882b77ba4a05ea2d50f506239da26a60fd
+a4813ef6708e6011e8187224297e83e4a285f58bf5eabb1db270351388603c95 a4a7dce85cf63874e984719f4fdd239f5145052f
+a4c29fb8becd3a01d36d8cae4b12b4d3709e6b45eea54d27f2ae2e43c9ba9ae7 e8b638f771ea8e8ed9049b56148fcb2a86625f7a
+a4f0c2fd0cdb1ab3dacb8758af443e9536c5987f7c66c5fa89e2cc79a1b61c92 da7791a0235d172e7be4f5c299387ed1c95c0921
+a4f8a0eab46e58b3afa198ed68ef78d6fec944abd7ffa6fab63a8af923aa973a 521b4e69c6e0a257724d59f3c803f4eb11e0521f
+a50ed806c69fd2c6864e9658b0294feb4f7c24970cd4a785b3788beb190266d1 a7fcf7cf6ab5763af5a332041327182130235ab4
+a5191d9e8f879091e1ba926dd387711ad308a6a0b110dc58a4c9897209b14605 523412bef70b1d4cb92c574c89bf7225e205d489
+a52d36b5dd7c95a9e8596f01aded392be81ae538591f5d990459592bed96be7b cc5aaa5fa825a103a547d381c7a5c0524c4853cd
+a560d1fa1edf114f57b402e16d662c17b1e3b7e8601ff7dcea6615ba7f1e48ef a20d733a9fa79fa5b4cbb9639864f93325ec27a6
+a564b979c786a7a32c6e8477e940a2a43238c57e8fa6be1f8ef7954944c41b89 571a65a81061ea62a11fa210ea6819322be4cba6
+a5ab6e423fa4649571d39b9a29484a0bb17cc70534ee6a410882d72ab1e31597 45a5f836b0bbdb163a13ce0e1ba1e8f7acffb5e6
+a5ad182a309ce0243d95b53ca5eecd2a139795321ff24f6fbc548ebe1f425729 f52cd06b7d0641754c6f7124382b9fb397e4070e
+a630a33919b24191dc33f2e09b46196fbc7cb4b866b6416b8980431735146a5e 0392558815cbd6674d2187260948cf5a1fb22e6e
+a657e241eb57d29d515eeb128f31ad3a8012e71be44872b0778f278df6ab9e4b 0735f982dd5a183a7fa901b0103ea4b0719af5e1
+a66bda0109d2b3c9bc87970da81bd91076b5f871febbc860f09ae997668b6800 12bf5f3e3470d90db177ccf1b5e8126409377fc6
+a679511b71b78a1b0781d6cf5e3c4524c1f213d671a5acc777ef36a2ec9b0f37 b98b09da1d6c4ec25911b2fd859282a41f4225e1
+a6ce423d816299e53b9b87164b3153dc3a4bcd733c33be1c2a13f41f140b69a4 f494e47725e1cb76e98b5aeb9bdb7f8d8271537f
+a710c2c837a5a6f27f2b7f5a198c7797f148ae6a37a2209748845adc9d0bef8e 0087a575a0655d2e53e8ba4feffcc321dcb8cbc3
+a766d34d210e448439135e553915e30b62f09b926c669b7e2d5cb073e96bccfb 3bc2493e6ac633c6119b7899505a5a0513ae4e44
+a787901c8e7f31a8450a152bd8aa7033203693d8ce807348e53125a47afd7c24 eadc9ce6cb6cb722723e228d9e44f001d4236b4c
+a7b3a389f8d3a36403a8b2bdc6b9b2579c81d79f91347655f50ce4356b4f2831 7f07667d4c520a81c4fd6b5631c119bf2de791e9
+a7b9c8cf9c7469bf18c8fd079039fb8d1de1867de46294726c110899d94b5ae1 3d2577feb4985c61a7e393777d78cd9a8e8a516c
+a7bf36aba7ea2fc2eca014f1ff42ae012ef82b450220cdd5e77d7c5bee306c71 c10a39190029484263750293825632cbdaa9757a
+a7dc9999e70a00c97b97f71fa0fa877e92e29a09ef6eae72de2ee112d3854ff0 42150e0aa48a3ee95ffe74b7f937111a4afe17cf
+a7f778c6ab0c219aa051ebca04abf1397864be8c9c69873792c6bc8953426874 ae5ceb4b269403c6d1653c7bb32e71ede7398892
+a7fb6dbb2154115eab700f4e4a6a6eeddc30d3f8a14f0ccacfa98d9347ccff8d 4893b75d346a20df101789352b198beee55901a0
+a86aa44f58a3f3c347dbd0f99a84c1ff6ddd41c58b19697c49d3193f65873a08 c8f5cfa836b403abafe7256ce964e65b24b3fc0b
+a8a227647205ac1f01b263c1a81b8776337124a6e519b67ac69ffd4d2274f682 ce53c27f666673c2af8d406447078ea03bd95f6b
+a8c3ec591a4e8c04a28e1251e391aa6218df72cf9b5f0ae0eba6eca6877902b6 94996dfd9511a12bfa9190d97d33d2bf6599f1fd
+a8c79d136e0c69d1c0d2281bdf7acfeac0f55d6239b0141e17a6de422628c7d4 696bbac1204a1d56b0f482568b1a7d504747138a
+a8d8a08205cfdf47585c32111e5327b328c0fe68098eeb58c939cab2e83785e7 3f88988aa04971faf2b1170fb8a5f7a0e2cf5f8a
+a8eea8c78cf7e55ec2cfa539d860b5e5bcc4760277d1403f2c3d06c583e3905a a0cfd1297d1eed63d0690c167d67e50ce06b6791
+a91887e522da2b66ed048d77858041c9cdb2fbfb0b4d463b971911217aa3a4a6 c2550609e37e0778814d328c47eb84a7ede6931f
+a91e8591cdbcab2353f3d0f75a016d31c14157fa7ba9657bb72bea1772be10de 82bca8633fcfbafe94997fac9fb855bd93e36bcc
+aa11e156cf0329ca3cf624ca8a185356315552962035a549ddf6f09268402084 18c321ca3c1f1d360c8f6c793cd48afeddb4b54e
+aa4089cbc630982cab278c49d506c357fc9a8dc27c002ae1a6f8af32d5bb3e89 966f3c578c405f92510a54de59ef2263a8b217a9
+aa61d4adf622265ec814c1a97198d2bcd3f58fb08989cb9beda32a4d0aab6697 bf92206f8b633b88a66dca4a911777630b06fbac
+aa65747207487983a77cd65713928d62e1b326b93a330ab74e9c9517b42f9ec0 75d979718393e2d0e6d1399e6c1e760cd739ce35
+aa77e77d6dbd35635d786aa503c8a85b08274c73ddc420ce75b66b8dfac4860e 6e9df7119d93ba93371c317285688b49a40f56c9
+aa793f0e9d9d746eba8a7a60cb4981f7e24ce9691910350d7df9b9e94c7567b9 e01b107b4f77f8f98645adac0206a504f2d29d7c
+aa83de8b0f4b0c6d26c97e1048eebff482698b79131cf68b0671eafc40444d08 8654e891d437bfac94db90e4c1f6878e0efd052e
+aa8c472ac90d32654157b4a43e31135a9a864a3f02c2358c3b78316cf175b5fd 1cdb9a4f4f307b8d0a3439d6d496e7ffa0a19917
+aaa1b07f32e2a452b7c24d7068bd63f27349668ad1c834cca9d9a2abc2ce49b1 4260699b37a7a0cc6be231d232d424a858a7d111
+aaa6f15815044f9acc8541d8d28612affafc1cc820a084798ef762ac6978784d 6bdfcbc41317d86eda9bb191e87a57651e8c6245
+aad6240d16f18620120c221b902c9777d220fff8c5a0cbc8071ef6e826f6c630 4801a2389fa38676d2a42061f5e3841324667b10
+aafa750212c82433e5b7a0ade7048fa1951800536992c59f6d66c46b2337ba6b 3cd8b687d5dc8006a5eae9e9c4dac212e8df67d1
+ab2a5eb5541f5accca9d9491bf53002b131b547493d6c248c1f51628468b91ee 157999b26778bbe322028a30869648267bee7995
+ab4ca17ec21ddc7e0bb1bff660ed18d90053425adf7d85aa320454e873a18b75 c29a831c884ea240437bd2459e60ffb383dcd149
+abee32b3339d1566d75613ea61f40c14bdfc5b101b60fde4f44b58dd06667640 181037049a54a1eb5fab404658a3a250b44335d7
+ac2a850fed51b1da02abb706f3da5768337aa2d49b414add21a668e2497ae125 2cd78883e494f23858067087893c38219aa4fe76
+ac2b785aef8cb5a9b563764be378ea45a50cf163d8bc37daea68fe2cabe064e8 6eef8dddafa405da3230fc1dbfbfc7ee8565fa26
+ac49410f64fad10760838866a40107573e42c86908c83ece433d64b7a8b57f7f 2f1c5d509ac5bffb3c62f710a1c2c542e126dfd1
+ac7908fb8ac8b6f3aec395f7b5a82f320ac634496b34c4e5534bb291bed1a8e2 c6039d8f24940f4bebcb7391e705b6b375f8fb93
+ac88849a26c126b03fc6fcb17cb23ec563e87a5f63b7afe800ad0f436128ce98 af292c99c6148d772af3315a1c74e83330e7ead7
+acc7061eeb4b06b989b9b95db3a726463793a54752bdaf978f2b643064e61650 37870a4c5009c19f3da47997b40b786f6f2f8b58
+ad00202dae3bd195b18e458e7f527e04135398a1d5f9aa3c25291803c26482de b6fca797357066296e2cd9bc9bdbbcd2489a67a4
+ad05c66a177f844f8239a1d186a1f803a4daa6286c959538838e222bc6337dc9 4ff1dd0992dd6baafdb5e166be6f9f23b59bdf87
+ad150ac016bb6e3d11d5d640927038619573205f34285a0270426b5d0d9171ca c867e4ff48cb00173ab50011a7cd593ab9d3905e
+ad69d65326774c8e0f1a8fe7b218d2f4786db7657a5d6b03d8f43d8265fd3c44 3d35c193ff6508d92b3986a52c103b2c1fddea0f
+ad90f638cb67720b20b904478471504acebacc7bb36e5dcad3e882acec496fed bed08a0b30b72a9d4aed7f1af8c8ca124e8d64b9
+adbab8789a2829bab3ae26bae696810557ec48f125e57e26e25b22a7f375a551 c405f734c2050e2e4ad3469d087368a29a98d27e
+adced03f19d05aee4179e749bf666dbadbf031a12cd11796e4e463b0e2eba5ed 5ec2b329adcb74a8bdf99871f0f6c048fc90de70
+add26f5a369d9230fda1aee868bff357cfb63e39bbc21abcbe5e87a77dd70393 8e0a161f97b84d42c44757798dfc0449b1ad3c9a
+adde54361f01131673d95e3f74e73b5b4645913941e061efc66bd5c85c40bb02 a0c0512a8bb09a7fc87c41528ba63083b44056fd
+ade7d297ede7bb58008da582de1253f0a55cb76e82d1cd376f82ccf97f70bced cf7992bde17ce7a79cab5f0c1fcbe8a0108721ed
+adf2fe0b01c0f20184cc5f4cafbaa7dd71f292a8f06ed0ae3690b21be95f661d 615cef56af79a5f5b39e4f337cc5d6e5e5c1759a
+adfb7008e983eca01cd37bbe9717a22ab7f62bc731f2d5bae26fb99589628853 e33a4bd5f9681cae1b8956247dc73812a7406615
+ae235704494a6aa176dc2c4dad7705e40ca8932b44796287278bb70878206bb7 b92ae7738d06508c5fbfd1f2d08fb5190343ffc8
+ae29942a0032a27d0dd5dd802d5feebf1500cec3f37b9b0997070e9ade4df219 f6b73d281810e3ecb7e984ab7c951ba52b72c10c
+ae52d4711e8115fa72fbb0397f995fd9163849ddd522582c1efee23a4371b846 bc95d2dc839d6993e4ed0a13966361fff93c270f
+ae558ea7cc33669b88e4cba1d9448d5638f5ad5c6effc852948555f57f8321af 8baf75bedd0f29bcb61efc7c7c95761dabce5e63
+ae8542d347eead448e089ffb0c35067c2df35b7abfd9eec4f62eeb701c59b05b b7af25b7c9b2f436fd6a5cbabf9d974d6111f6d1
+aea29dc305d40e362df25c3fdeed5502fd56b182af01b7740d297a24459333c5 a8233120f6ad708f843d861ce2b7228ec4e3dec6
+af17bf05f3b3dbd780997fd54887b276c0c972aa0615ec4cf8da9bd960d560ec 1181cfdd77061b39dfcd72660eafcc1c578fef0b
+af2ed32dc25c587ab2afe464a73b49a0c5454fa2bf12ae538a2165c373ac2de5 bab41e61c338ed174de4cad036da7a5edb40d28c
+af34d66ddd3c768aae865ba6958dd9158ea5f5c47fbb5348a8e359f85f89cbef 9e4700a6033d42474c800cac6dc0095bebb14c76
+af4b69c54262883b42d42c72e8383a20843ca1521021808f73dad9216c5af6cf 6607b1c62646fb35b6f55f22c11a1aa14f0a1145
+af8cc9a93a75ef2e04ebd8aac5c62beb755ce4c1162d8c045ef578dcfe25ceb1 d9f106b9f6fe553c649cf682ed66b72567dcc367
+af90f5cacbfe4caeb5726627f9ac36e5bb49e8497b1d5428858cbe64a332cec0 f161ce12cbe824defc0e445bcfdbbb6f3d5050c6
+afcd6780d3255be3d03402a43209f1c5c32cdb3bcb23068b94e6e9247ad13e7c dcc1b764890f85180542055150c2eb8a7f3cb9f5
+afe1fad6f6b22eea530ff7b373d6b9b787b39792f720e6fcd0692ba6ef99e02f c0220fca67f48b8a5d4163d53b1486224be3a198
+b01b505b9db0c6fe12355a5dd4384184eb067779e23028ac2e1ab9a504bb1bf0 14be9ebaa30a1d6085e889eecaf2a24968eea24e
+b01e2a8d4c07527e6492e7fad1f749dff75216d4f129e0d11ca5caf9ab6d8273 b60488e1d7564716dc2ae7ce078a415280bd7df6
+b0516a64349a18f3d4a48850359ab66ec681ee6575103523acf4fc9b5e201e08 739bfc1798bb97563e72c0491ccf8fdfecaf6a47
+b0675d24f637e6c2c05b09b88dd2169fa169c37dbfade733a5e0af0bb1e8080e 4386ee2acbcbbf1fdf06c75b91da3a9653075c6f
+b06e3a0bfe758a68c5c6b9720f281b2526c19564179a19a0ba1844a45b089e9a 8ec389978cc56e25a6a5bdf6be993c7664e762b5
+b0a25f084f327104a3da545a926c6b89526d5399fdfec65d1accf43c8f197bf0 6e9ac9c85e1329debc18a30c520e59130d5b190e
+b0a6aa2b450048e43155fd6d655cada03ba242a2c1b31438f93638a69e891727 94093ddb4164980ef98d78b1de318eb0ed74d933
+b0cb0a55f09a8192d882c14405fa0e8a366db3d07c17214f41614fa571566ff2 3e1d42b7d980e29595572e550d5ce58c0a34f15f
+b0e890ff4d407faf502bc1eda5a18bb9f08f5761c2da4f3d6a6d563dd2f0b1e5 ffb55c532ccc1cb3c47eeeaac6c64240ab88fe29
+b1328b04eba6d6c573e7c7aa9eff201a654a1cd2c077ec9fdfad0499d259e7bf 2ca59d57a4451602a6db44da4b2d37a505a84698
+b167ee336fa10383d04670681af258d040347e6e1edc71d61af722cd19f1192e f2ddf1eecca39a307ab8544c2076a59441eaf5e0
+b185929191c7ff2f9df80b08b2698ec2811f3466cfd520aa4df2a8b777aea135 89b765b0e9f0b54f9dc85fa0a982774d07a935fa
+b186cc0087e119842e1b7c70dc70f705d7da0013de7eb434a6f48dc299acec75 57b5df4e635d8324ca75b0dd33cb96271b426e23
+b195873b48c824d995c974a3497ade7f62d2cd818bf388775cfa721de4068ebd 08b041783f40edfe12bb406c9c9a8a040177c125
+b1a61b0e46d4d5ff7268e381a6f7d32eee81e5c1304481e62ae5fba97870c960 9eebf8791489850089738a95773d2f3c1d56d89e
+b1c6b80f177e1869b39215b2ee4089474d685459fbda1bc4936457567036812c 7e822f212370d60dc701504a5512544891f3ae05
+b1d6e5441c09075f9ee5aa32d8501acaa0c57f5812b316a74bd7911786dbb1b2 4915947ace431f2d1b4fe920d4cc446ca2388169
+b1d8511cbdce9fa2ff79665dc3ada50e6ea82b506cf11decd40539e6478b4458 c1b62b2eded035d22584c427487503335f519d4c
+b21c8c27a05a3f0bf9f0f44ebf05e11d9c591b04cfdaff7cc860310356d71827 db4df74a2fc340a0d0cb0cafc0db471fdfff1048
+b22a9ce429c6518de3a48dc441da4387fcec90fc88631499e61702ee5a8f8b30 345881abc471d0c65c8bb7e4cb3be10571cd32ee
+b236af68cc7637d84a5cfa565e8b666c303570844c3d3dda6534a30b4824c352 eb2da5c7c3cbd270a1f945007ad098eadb4a68cd
+b2732eaa1b3cb8942b40bf8da2ba51b735540dcb5605c29b694d7bf1cd500e9e cc15381ea2855139cb87d3a5d9aa64841f98c1fd
+b2bc5b027b583a336347be589add47e0a89fecc19dd8a154b826c363af9a4345 da7ad841bb28fffb5546b529a00463206e47c8e1
+b2d355727ea29d217971a84e2a88527e0f6996015bcd01e4a2adb18910dc3aad fe6f9f29340241491470ad8296ce178ebcb428f4
+b30bc6949534a21693aeb43b8379df1b6dc621136a2c6c356e3f6bb86b9858f2 d570b36d8ea2d61450a40ca03c3cff9b144bd147
+b3364fd9c7680d53ca88929ade181defe8a00009e26e073ad7204fb7571aeca8 da8182721657446127a006281e0f1bb4219be952
+b34f4bbdec1daaa7d6e1e99aaa1e6cded1bec27170881f5c6527fffaf55adce7 1bb11859357114684a1a740e471edf1a7541b82a
+b370899e23e1a0b5e50780586fe822e2e6e17dc03a2e56020cc1d11e072f5160 a9984a4e60291958a7cf0045758f47db3d214040
+b3836efc8cd5eb1c0ecc0d99df3644902cbccf9b6c7c38c3fc65900492cacb21 41c1bdce587d5c8b8ca03a5a8691ea3f09f16316
+b38a7a2ee69d55f021efa91caf59e23bccdaf6b8a9c3f83acd978aa177587537 bff873e9853ed99fed52c25f7ad29f78b27dcec2
+b38c89863825241eef7e7090bb11233910a0117436211183502d501ecc5b2879 e4e56117de8b3bd0bd899701da4712caee27c7d6
+b3ac32466d95d82432e7aa5a2080be9e3cf9b69f8620177053557d982a5f6eea 6909925086c86d40934c73e6d7a4b3886d5037c1
+b3fbad0e2e846628da5954b92c1c9b9bce24236f166547c5352503d7abe6984d d132e975594a1f22a5f3a480f5695e6001367b53
+b487428ddffd22b992094ae29527df9741cc33075a2ec0f4533bdf26459724ba 3316387b546b1d495ce646422e95dc209cd23705
+b4b7236050c279fcd2b6b05b6539c178614db05615eca1895ee1e9de98d73b44 a57d1866c26829f12095fd4f20f359e7552c52f9
+b4c3e22b042d111d7546f8d3bb4d3468236d28caf926732b8ef6c93eefbad39d 0cd5264e932f5dfc68959d11b5a3bb3a8714aa87
+b4ff5a6d6ac893413f20f16c9b3c999a5703e5e1238c50585ed32a64368a54d9 334fff1495c554746ca66f2359281b7de69f35be
+b51d286a9549d2d2d6ee18aa839b2fedb8f3b4235bd763553a2a415548e7c81f 6e0fa05b58c140a42ef25dc74041e30f25772b2c
+b5454cc2a66d713d5be85d5297def275ddd102817d96014c46f438814446e29e 5e98d798bcc9613cc34a083719c378d5c66bb9a2
+b61b940a8cd979a32e005682c5c09c22053675e2db24ea6b4b28cc75e9c10890 5f34cd6e3285089647165983482cf90873d50940
+b6cff922b0be268a213f763aad8e357bf2f30e905ce7ee47d586eff02c5ad26a 1aaa4daefcdf508ae661e81131d810472fba488b
+b6e8427e3afe1cf0095d0f5aeca0642c4fb12d4e529f62e8264b6c4db72f04b4 6fe7568fc3861c334cb008fd85d57d9647249ef5
+b71ee6c8837efa5b3ba3361f88c321d391ac05f41d5b2506cad39319e80716e4 c02d0b160b82ee72469c269f13de4c26a7ea09cb
+b7238ffe9e20cb2e62107858809248620802f8f15c603594daace4681810bfca acf362a92101202f5f09c9b51db352be27b5bf7e
+b73c6046e934b9a76e5b9c587c18a20b7a69852801d6b3517bafe09b78d1cec4 964c192fbc2997e871c6101cb63f69b3ec377b66
+b75cad007d473a24d06563276d7b254378f2a0935d231cd82b5332944f22ad1c 7b6e8067ec96acef9a4184b43210d583b6d2f99a
+b790ebf3f307102c84da36abefd196078e569ec4279f9cba04bec0ed68ae93fa ffc359bfbb59bdfc5ca1fc95c9bdc618f89dd8d7
+b7bbec7e6e8cc5a640d966739b0c7ff09f5710f534b278ddda5a5edd554dbac1 d42e47121844049cea15900ad772f51164397573
+b7e7455bb13e40eb23c5521f75bd912da55c7cc4882f62cb1a5ab0780f04faf8 a732c71d3e34cd444e9e0386b797207bc116ca42
+b7f1e115ee187338ff5720b118395dafd6087ee4ebbd63883bcb4c239cc1ec2d a59b93fe881d5983360984cc2f81b4d12d306d8a
+b83624f6ac0995273c0034a7ab8c68929bdc91b69ad54ef94979b93eba3f6022 9fd738e8f7967c078dceed8190330fc8648ee56a
+b88071883c4741b0f044dd83f33c8b7fd514a6534f212aff1c00efbd96cb0220 7f11132869231c5461b911c054577d101cff4b1b
+b884efcbb7ccfbdb587e2049b9b28a7d025d3a1a5f9c1d7708f39a2a2431fe89 04133b0608f824a5d662b85c866b2e84244ec0c9
+b89ca9872ffc92ed33fbf3e18f6acf5f9ac58c70a7408137a6f042b7ced845f7 40e1af83bd6b13b718c52673d2ad68edf54b6d6f
+b9134c331629e9cb29d1bbc03904d911a942b451e087543fc16deb0116391297 6fc72e46de3df0c3842dab302bbacf697a63abab
+b96f8b46286c8c2a0e73d2e320abf35334e7821e561a888f85db612b2871a1d1 f4113b8f6c796edfd95d2d178dd27140e8d5eb40
+b98e3de756c625603d536f742b69bf11955d439631f286712927f5975d560e1f d2ef83fcdc0c9cad633e7b654ab789d17f583f30
+b9fa227a38b8d66e3c2acc8a463ea37768496b746d370b95c4803505fb79b84e ff4fd6b1cde132c6cc6278ad7873d7047c897d2f
+ba038509caf46d121547a01557da21517aace95267ee6ae54bb7db1776fb5825 ccd7ccdd6a61f941642d75c3870d82cdea9e6fa6
+ba0a8d2454aefb8f2723fb6fa5a1424439b63bf2f6f47d575aee73a76a542a73 b4b1f3118c4afc6034b5f99eddd18f7dbf15e5d5
+ba0dc4a1787f9159a174b1e010018af3ad2f5f84c8e8eab98f67540663ae82b9 fe4db4d4c93b5fc5d85aab2198393dcfdfd390a3
+ba312594582a5a746b8fe46d639f8db0314522ead4339ee6b7299802443ba5c0 d9a9eb65ed8db7f1200aa017e5ea2204266e7ae4
+ba3e0a5d754cb8fb417f0b8826d943fce3007ea5fa332abca0eaf31ceb99caab 41cb5ab070140451804663d84b8190d1c5d546cc
+bb04bb109db80e12067bb064a5e3eb34c5090e41b4ea8f289c2542efd21fd8a2 662a69f7b8260cdd2461918f55353740451b0ae3
+bb5497a9ce810703e014a2ac6fa1eaf22625ab103c7d141ef40343fbd9db2a71 89442107982a1e968f643808a9e4c9227c1cba2e
+bb5d090bb1914554341daf6c1dd6fe4e5c25e466818e5012ebae812392b58934 bc2c876e099e4a12b7b28779abba186216355c53
+bb680fba7ce88de98d4881df75bbc7921b97102a8c67ea9d9b45baf765a4c354 0a420998aa494c4b9152041bf5d8ebb80a2c4cb9
+bb6a768c5f4888cb5f37b641ae0475c1e8806f53e1e55acf6befc7ca727a170e d1487fd5790bffdaa06c181d53cb966a4521e899
+bba3e6952c7a791c03cb65d4919df3ad767346cde441854153327e24a829c1d0 860bc8dfd43318cc0513e98d4696df7378b6077c
+bbe6aae28af3c8f82c5f1d6cf882f4eda9165750e08de45e9796134a294bf83d e074873b8c02e2a3d3beef03dd3c8ee02cf3ce9e
+bc1b9a106a7ea9414b5149bc9a25a49df09cbbd91a99e5ffd53f52462792e28d 5abe9edb69b20ea386597b062e94f2679cb81fc6
+bc3c9e7c3339eec5a01dbac0a679b06e04124c4f51c79fbc16ea8a68323c0654 fbbfdf9f13e92da2dc31b56081302f09fdb62e49
+bca7f0c01fb672c05f86199908ae2f853f58f0adffb9b97b897b37c2b5633cf4 0cc8c5d79ad42f4673374b0e9cb00c3777e55a8b
+bcbb54aab5ec52d387c70baaceb1ae313b312d354319b95c58b59d5140bef0fe bc584bb33674be3b3925c7bbc129f1f53af21869
+bcbc6e0586bfa74313dcd57a61c4e958abc0ac7abb3be0f2d82d0d08a3d5b357 755a4f75d2184b2ad4ef107932c86c7eecd0806d
+bcc4fa242e55c5e08f64900407dca1cf2451806830905be616f339bf7a5580aa 50298f44a45eda3a29dae82dbe911b5aa176ac07
+bce08cb2060cdbba7216cdee466762f3cc8e3dd655387e5f5092a748ead67f6d c3ffa781d527d08ddd3cf626ade4685fadce498c
+bce2be789b7c5f0d236cb597083143d261c705c2a66a88f4ed547ed9e2065793 87f7f37296ff41d6f2c8603d68f159cdabd4510d
+bd15edba8822cf76e60aec16a0edca6b464f22bedb2f9d55078f51cfc7134405 9ddea2008d33878aded26b0c64ae82ef6def49b4
+bd32ba8cf33cd3049b5dbb3c18c0b0478a52389cfcddc7e7b80f66577dd3ad0e 6524d538430cad9215962d6d01b078afd7720bc6
+bd531ed2f7d5971c642a86f8fbd5347e3b85e2619c891ecd4bcb4e23976f35b4 0bc152bdf2707576e6ef9331189607c89f9ef8a1
+bd69bb8de277fcd70b2accb62a064eacd6ad2e01817188f5577eae25cee3a35b ba6f870d2cccbb6439c43979a9fdfa72c05b1a73
+bda24eb65236b353a3c5ce73585fca46ac4339a386a463afd3e28f69fcae213d 8c7af5e16d87c12dee61f9aaa6cfd06ed93a08ea
+bdc530e0b98dd736cd812408eeed9aa0d393bbd0630b355eb7601e61f0dbc7c4 90f9ff6755330b685feff6c3d81782ee3592ab04
+bdc6e8229c3beab1f6fb0439687b325467e2a8fcd6267373881c429f2f9a3f78 4711d372e66dfac8218c4d5eafcf03dbdd4706ef
+bdddc903f4cb49c257ce31b6e651349f9808d82c320223c339a66a03a9f7829a ab415d59cdf8cd11da6d5281c75423691c0a34e4
+bdf2066a28e11603a1af04157ee4aad97814279fe500340eb3465797cbd3be23 3697d64be941a53d4ae8f6a271e4e3fa56b022cc
+be173dd892e4502149db328c9372962a08ccfe705a22fbfc89190dd52ac9f939 2a6d97c7907f685ae4b18d31d2ef6ec7099298f6
+be218dbc2fc82105b177a9a07b4e0f615ead9b9be02b13b2a239265812c1e739 8c1460102ab097ef014291e939693cc38daa7e98
+be3a95fe895bbfaa243ae46c89573d9836914465791d41ef6404c14453ad9e2f c51355c1972fbaf3cbb5c7be21939d2f4445e9bd
+be7648b598b8c830353f3d8a9da3b434ab4b636edd7c5755171912682061e943 e5d1faefab1bb51f3d0fff2d5e2cfe4fe96a9c22
+be954c7dd99bb22f2730f3c65b8a6ae9d1940cb909cc89e6d83de1aa5ded6946 690624bdfc9dde7d14609ca798b61bbf5fc9e9c1
+bee70212dae887b4181f4c256a008a0509792568c82ce6f78ea5170dc5141b82 58b932645c948010c10a9edb2e7f1f51fc165230
+bf148c977af56b2c4f132adeb987da6eb63b309d7e1755889bd8c17cc9e28520 ecb100a9c8feb1d3bcdd6e13ebd4097eae84be9a
+bf278d619d1bd8cb9e47d70df1929ff019a1f6c4d8bbe070628213778238551c 1f798df229a70aaa4ee221ecc0e24025ad92ed9a
+bf37e4ecb48fa5813c8c587c13b1dbf65c9de2278ca1093b02d241bd148aa36b bb2bad2a2f6cf5dca3d3157b68112ef9cd0c5817
+bf409f1aa76256282ebf1a7cc6c9f4220be9ffc47b2cc42248fcc5cbb67bce1f 30c62a2d5a8d644f1311d4f7fe3f6a788e4c8188
+bf543f7bbd00b73f6ab1cd8203c5279ee3c319705580525916a86f2916a5cbe2 a0d9ac96c359e218d35b6faff16e63ff6271f1bc
+bf575bb55d3a86838a50d8c74f46cb4f00515f36e639a1c169ade92eb7ed5822 82324ac1a5ec79069877ed5d807c87762a16ed9d
+bf66badfda7b5d2157db65c5310cfdc4e904d7d5da57ac5abe17542de612f856 8f0c4b543f4bb6eb1518ecfc3d4699e43108d393
+bfa3b3b9a161d354e2254a444b12c412210e9689c17e51bfc318ce4bb4360f19 2d59075e0681f540482d4f6223a68e0fef790bc7
+bfb8433faf78ecf75ed9fc3bd8a717827bc186db50e525ec46ad318d6182f91a 0a7ee40d31baff4e6d9b302446547e53bdd08b64
+bfbe326cc9d9fd4dc3904de4c9fb919194f3215baff612b6d3f403e2522fe163 8382cd353101c0963d5f401bbbeab5f6e0248f07
+bfc0ee6fe04854c11011539f38cc6b9b73e0c445bac2008de2fb877123efc2e3 e044baa468a1c74f9f9da36805445f6888358b49
+bfcc4074ac517ed24d61b0aaa96359f304c3dc97e95f336269ed474ea846ada5 5d0f8f7891e872d284beef38254882dc879b2602
+bfde5e9939f87db0b49bb0ad5303c14d555a32b2db03dc63218af87fc9ae7cbd d7a09674532ffc0bda73e7c6e028bb78120c85e6
+c0011465109f2622a12479cb68d0117547513d48254a74c1a905ee88943263c2 e8dc745f5603c43ab9d69e790ba6d600f24d108d
+c06ee60e4559ac134deab08997476c059b4baf28973f75ac00310f9c0c0df532 e8abd2f25c5cfb7e6f296699f1bc120a78bcb7ba
+c07142deecd175549344fbf31f3987ff54e6fdd013b15d502e83f67edee4be4c 67df18d487d28edf3fbd965836f212f7edd2fa6c
+c09c5282575731a965aa96bc17770d001552a22577cd80110737c2889a2b4833 4b09231a1e78cfc8e19477c2302ab80b689cb8cf
+c0abe8f37fbbea90e1ff3d571c86ea4c6fadfa7f7f12a4a712c821b065f2b0a5 a0a6eea81880dcc9841f68766351df223be95f1c
+c0b3f002ab7ed5b861ba27d5566f8d54ce86ae8e3f0d7039eebf52941a164e0a 0867c7b57704e5c98cbf67d46df03dfd549cb0b0
+c0c38ad9820923073ff986beaedb4daf3217b3028e48622bca80411442ef6047 629bac23f626ff2f0aff71580b3f46742643b14c
+c0f1323124d0f0a45ad1511ff43041f766fe110e56d0b063d41deaa9f443b61f 5fac2a68ae5bcead128415169a68fc21d9e0f038
+c0f85283375a304cb98d2b47d3b0456a10b934bf1f89bc3f80d6c4df2087460d bcc85e9ef60749eb8a4cd9db1c9f7b3b974ff407
+c11677e589c7d737baef01be425cd0c2912b78f6e426f1750a3b7d5cfdb123ee e45535849cb7187e22c9fd11d14e0eb37f5d7dc8
+c123679643c715765e9fe6859d5a5eece56404b03f29266eea7c0e83ae14263a 6d646a4ddbd3c0fa824b193aa83b48b38b48848f
+c13a073132718d2674e3aa4bc56a039582e61cedc9e178ef9862588a7f8c7675 5cae6c25279bdd525124b7686d67072059bb0fd5
+c15299caeb002894ed0743a79dfd1cc520d3aa71a2a84e377ed2fd7827096969 1b61137f9a2d6f90f46ea3a7fa7b89b8f839b202
+c159593092a4a8e5c4dfd9ca42fbc98c67ef75060f87b92c4bc677b809be0a80 ca3939e682a3198a3d18f42b7fbf84823312dc61
+c1599569b3f7b5ab531371b6c762c9d578a794e6289a1943f6e6e45ca02ea05d 00f43bfc81fc4ee3a1f92d56808aacfc8089766a
+c194ab25a95d8b7d4897515a6fb62a723e809afd7c1039b7a50fcda3c2edb2db 475fe13a56409b64b9ebbcfa1a0e77b27d21d189
+c1f503e2869f51ae5487b9c89dc93892aa92e58dff2cdbf19348056997a17a8d 94c3c71da52ca3d4761c4e9041b384d9bc75ad9b
+c223ddc0bf50e860fd0e85b9b4d47b74409106098826fe330a9d98f2e3a8ba7d 1ae06d0bcc8ac256710c81ba92a16a644edbf456
+c223f1b579bad18635efdeffa7a8ff40567d03fa427e08bb90d9878f958d8021 deb106bfd2d36ecf9f0079224c12022201a39ad1
+c23068515ad0d427ea509d3b0a3b2a6c5d6ab433d6531a10da6b7d63ca0d3594 8a3653350f78e3e8e91f2e14747d6dca4b435d8a
+c258f010a08328a29cde33411d955520e0375fcbbcc14b7636a70f7536c32ef6 b25fa35b38051e4ae45d4222e795f9df2e43f1d1
+c259153848cb0a2d858dbcbf7b4f40546f2fb60c31421f9726da11953cfea9eb 8997caa24765077a3c3b70deb995819488bceb90
+c268fbe2c4169776699a64bf021f1767ca74c21970090388777465437910c3cd 5ee2fe777c41d9ad9e7eb9fece56fe21f830c5cd
+c284394baf0418c32e379cb3bcd5caf190e83e7a8b5056789d800f27be6462aa c5c58a0dad7a0cf18859f29326a0b7a44f23e4ca
+c28e313f349b558f23f9b4c7d209d5f0faa3ad79edb8260fb3fb154e5f578905 22bef3bc97a19b18125656bcd77b517680168970
+c2b1f6e286be2959e3725a1d890e178cda1c31116467d5cc0c799825b17c8d74 6a5c2bc91cc42f38753da59a3291a6d9bad0c852
+c2b535bfc3501f0b4e179d5d6f0e2cea613940fa3813be5923db7e71e190849f e00e46abe4c542e17c8bc83d72cf5be8018d7b0e
+c2c43938f901a6206679cf488e48f38742c36dd7bee0e027fc298093b88d9cf2 b3106cd34a7b69d2d3b3913415423bb2c45701f2
+c3055d62611a3247b1863e5b5955ebd263d8b8e3367d8efe283bfe0462b4db1d 19d13c65e11f45c3be6666c6c4c9732c6f4ab40a
+c30d06fd49797e3135652d654db0de122dd83f8400df1c7a0e95ca3720defb0d c073337a4dd7276931b4b3fdbc3f0040e9441793
+c31ec989f2f75e339b9b7b106d5c1f5386197bd4bb16140fa8e0305e03ced1d7 5b7487bee63e7f5cb6ea1d9090d52ae631296cd8
+c339c838d5d21d9c6c6e4b7efede56c1580e7e957b5da395cee2f689f108709c d3cf2a0e30b4d3ab11340efb3d9af75e61b7de8b
+c3f4fedca384b7225c7bbecd31c52d6158b1ee4872d0a85fce2d44ad357a6b3c 581dc350d5e699a9428caaf6a59fca78709f4bbe
+c436565f09dca3e9556afa41fcc79ecb57c448a462d6c310df86b8b35d5fb604 43bb43402ea3fdb9ed6b4aa82876c38f46d1eb72
+c494dee1d03eddaa9eb923ea640f07f660eecb9661499495899c1601b885c2cc 81d3ab652c6af3483f72ed93b089edb999e7d140
+c4b306fe1f9564616cf048af4e566ea7b404ad069c972ef433d21469dd93056e 4caa8962a6af9fac72ab81afb03779bc3acff910
+c4fb0a710b3cafe7f8f43319d72d308a678c12cebf0682860b1035352cb5d4cc 2ba363e5885997c504921f8c8f7278a97fbe753a
+c51ca339b4668e4ff289c3e9ed3f6c11de42c85e2c5491fcecdad93432a2b13d b8fce12b6878b56b0d7be4ce7123b4feef44c2c3
+c51eb1e41d61d89ddebdd78357baaec018226bff72a4c9296934b1c48fd785f7 f1b16987ec81874cb9cc3d6a2e7d533c950fa68f
+c52bf4d013448d7c53a6598f85de0cfdbd2eb110a058974534ffc27c174a9ff0 92142d22d55a2d449d5c563f6e72d827512cdd49
+c5446a46d4c6637c2f45ce4fa113c64ced344a4eaccd3ecbf2107a85fbe18fd8 47015c6bbd6b6736985a562bf227a989c6340df8
+c564b89940661e3223cd7ded73de0206cfc21827bc0b9bc44e95d411d1df1b0e 01768b00b6b8cf1f5e34f7f416e0d506497cfec8
+c57f2bab01f9798f75e61c27f55a91c743b8d23075728699e84b9280dcaaf900 2812156aaff1a1d7785d56809e8cc6643083ac4c
+c5afc2ee84f7b25ef38420d60f97b8906c178cfa90497d9f5ac5d1825b0e0cb3 f76c2592b57baa77423bb382d2e86898992d883e
+c5dd7dbd64522fc4b9b92c6a56065eba728d026a8d9274c30ae26cca30525d46 b38ab8c4a1c9e346c9520ff9377be3ca45b62f23
+c5fa0af1a59da387fa8082d801573bdb342bdd59346f7599b5f8e9697dc1f076 89039682651474c6e2bf9abcc02cb71897f8b4e1
+c64531faf49ed50c4fb19066a734fd236e6bfe093efd59596dd7d802fd311d71 02e4e5bb290f13ce81d239c1d590621e2d146671
+c67a633f4eb848ff63a1941b3ca756dd08b5226684821768d918e0d839ccc4ee 833ae912e8d5bd6309a2ebab027b9ce85253587a
+c67e84e246ad6aefab06f12ef980425062b46b04a66efe482927dd937b5b76f5 eeeb57b574aa97501bd7f477330a2bca8d1bdfe3
+c6bb20cd7be8c9ff8b9cd6246f5dd2928d2428b6a0b2e38e7012e565bf7d9bae c6ebb4a9404e6cb7ed09f0d775c093f33a82f9b8
+c6e7cde92dc4e7be645bf8ec2b6d2ae9953f7c9ae934cea12fb087a9673629be 64883249d3cbf1db4523d95beceaf0f9f8e6485c
+c72158b0050e8c9fb81af7d4265c0cdc389cae3cf235232051eadd50f4c1f931 c4c199245f930c01729a0d7c60dc05d9dfc5f53b
+c733169129f390cf971099f88fec9eea3e23de7bedb2c72a0599010d6f9030df 6018dbfa702b818590ae682bf9bbede716ef290e
+c76564a8a44e38ab10e01f08b5064779775d050848ca85b41ef2b58cd07fb661 a1c96890e1b1fa314c4b4a3746c86a31e4a9d78b
+c76e3695d0e5e27713dc9b34d2e93cbe8a3c780f0c829ebe2fbbc9561fe2b0af 621c87ce34d888782dc907b62eece21f94b951dd
+c7aa36af51e9e39744a3d71a524f3228eb0ed8c7816cd863c81daa83bc33394b ecd016dbd912f8176bf9d8ade8b896e0e200ddab
+c7b0a7eae7a77dd7a50c57b9221b7955c083c8aa2401b20ab7db4738d93faf88 7b5d9df4c3cff229a132e5684f5e5e7bf6219463
+c7c775e8d426131b0ccf13245977f948f9e6f92f11bcdc748f2e005e8662eb84 84f7ad61f33939cd7bf04d8db04cc9ae7cecd8ed
+c7ff2786a6ce3a0531eb2f4ed36456392a5bfe79b2b53e8f55ff987b31058eb1 1e5dd57214dbec1b166c881c1c44c8930923da17
+c85e35eec23dea4089aee7a2dc7f6d937ad7e13c66bdbd7eef37bd6336418609 b10489944b9ead17427551759d180d10203e06ba
+c87c2cf84057545f38b55aba1b610af68236dbe0dcd196a81f69a050489572c1 088171c4dcffec240af3df4cfb03580d5bbc2a6e
+c9158067646a4f730de9e833b1c57412e5fdbac9391f1d374eacbef4d5906f48 f269af47f67816813da4b4a06935bec131ad7155
+c95f52be90f0078415cd38052e756f4937c8d98dd5404b2833e7d1505744d6dd 89525c4620a1065dd47fd7d3960cc560a289d3ae
+c9a1e208a73a83131879e9a986b05691ff7b082a45f79bd840f1b87e3bd34948 7335ffc31f110ce77ba291719841231921dcb17b
+c9ae9e3895579effbbee5aa744a268beacd3be882e7306a8361eaffd7de9d89c c16281e3250d7103ad6149960c6918b2ffa459ff
+c9dc53358a0d83bee1caae40ee81d752abf4962a9f206702e24a447b766b5bd7 fdbec189efb657c8325962b494875987881a356b
+c9ef872fd3e8065a122b989550e08b24e38c91b6598be9d4e8b13cd17f55067f b74eefdaa96e4a781d649d043524fe7620aa7e86
+ca1bf49cb84d97e4e068bb833a4f2f151401bffcd3aad55fdaf496aca3cf7001 1ddf7a3bc63dd2ffbd9438c3b25881de9ac0bff3
+ca2b746be39b1d1ae42925727ddfdc75ba08bc650657647da081931ed1a905fd ce9eddc98909836d71b0cbacbc05951b90880964
+ca31f7336e882a233a2943787c5e94ba024ac9a4f763cb1d9bfd8e63aa7f7269 9f13f7d0a9402c681f91dc590cf7b5470e6a77d2
+ca3660522468fd1d803bbf34a9c1685a0cbdd1b923528d69e6103955b03d749b 784536a2a4cb6805d0f64821337ea0b4b20daf0a
+ca5237cc6b66c598930504f24af69c3011786d0d9aa5d5da2219f2f10bdde3fe 22237f6c06ff14efd3c233debc41b91c3df29514
+ca72a5c3e0c926b9e8abb95d8cd4110646dfd0dc5f2b283d48b781cbe7ac80e3 7b592ecfb272916e95ec2180a02361f23ed1bb37
+ca9468483c7625c1ec1fc8e19a3a2cc3697d9caa3c4d9df9e51d80791658d4ce 70aab459aa2df8f13b828a06976969ba83612f36
+cacc70435c5fd40c4e75ac083c898a5f35105b072d3863bab571cc63b424cdf0 6b7d1f7996feac885365b05637efc5a4e40a0e5f
+cb1bb869adbd4a5bf2861b40afacd0f89906ed7f2d2ff4ceefec444f0166373c 0985c00bcf2bc8403f5d0c4957f3c2c8bc2808b4
+cb252a39ce30cd7b6859222db23553977f7805004501de9bf5ce2b5cb05bee7f e25bc23dbed506f090c7b7794568171d992785d0
+cb282e7c15fd8aeb2265cd621f5a228cb33dc84192980ca426cf9ab2a48cb9f0 5b5b025afb0b4c913b4c338a42934a3863bf3644
+cbdba7ee4f46c2afb421f33275c78d6bef60194f81571e5f9b027416872d1efa 7f5dd37769557fb8ce6eb0f82dbca7394eb94fcc
+cc360fbcb49b10d8e9b6c5b95564133fd0ca52489f158e37422fc9d6c09a10fb 61650ac5909362f425cb2c1056cbae080c594b24
+cc3d272d457c7e26c5d611923841511a1766bcd58e5be66433698627e6fb3f9d 90bbaa9a809c3a768d873a9cc7d52b4f3bf3d1b9
+cc8a9debdfda8ea2c6c7ff5e0c9b5d63cc23455e53a1653d42f58c1ad34c8db2 cedb2a22e6914c3bbbed90bbedf8fd2095bf5a7d
+cc9e079a90406c7642c6177117674d5e542b08b2db88464291eab80ceefd84ea 19970ce5d4f01cf1e0c540623e7ca9cd6e0d9c7e
+cc9f9094162658c03f18809a18b701a42499695da0c257c9e85c33abbf55b43f 1137d90e655031d2c56e925d51af666d0eb0b949
+cca7b385bd43a402abd3527290d1acd5f68bcee3f331bafdc389a2b4d1cee92b 48bef82ec4dd52cd440661294e511e4ec183988e
+ccafd013fd2ea60aab89c7548df3ef5ec8ec2e7bfb8c1bd50236790fce491c3c 8d330c18a62adc01b16cdd3cf19fde92ef0dafba
+ccb5a03da85607c230d111abfa899655d1b00e6529101a40d42f6acb059dff9f d6c93164c249c8000205dd4ec5cbca1b516d487f
+cce687695f024952191b9a882f65d6659e2bf75ff6d70311c35d1a17a7a72be3 028ef0de72da1ad4d1b2ee4a125ede81e3f2ebed
+cd0eac51035ebff474d4995e000cbf329bb0793da89b81dabab277ee3977140a 6acffa8eb2a20e3391b5f64c961d7176315f1c1f
+cd179a62d181b98a8b7e7dbbeae518694d9cb6314a7ed06c67c5c44c64a6bf17 1764376034ce4f4c899f141c121e1be9167d1e83
+cd9398b37060a3710a0ea0125ea12e0fbfff1ad1f5a835ea880ebab058545bee 0428026e2169038ce215dc7a616cf2f85d9833ba
+ce00531bf1b7ed6c57f8dd8a02fd86e7f9e961019962d5ad5093fafb7d851888 d74fb65670afa5bd44b5d9b996a2dc8e409d1d92
+ce354c4274883074fbfc8f1db21fd783e76450619fe4c09ccb8234f308c9ca14 095a3d15445daaad79df8ea9edb4c7b78ba2cfa6
+ce3ac8622b4d6f466e837b0c7cff550d040be27d80b941950b3f5515ad66cfcf 523f154de39d4da383a9e790d513d111a68b7c51
+ce55f9f5ab1d799a9ffaa839539af196d13f35677b3d0761b0fe034e764f8d07 1093c8ff4cb78fcf5f79dbbeedcb6e824bd4e253
+ce601c82543fb1fd705d7c45deceabca8dfcd7b1f156aa4cce6a8ad1efe7d61a efaa56ae9705f9dbc24ff0b27daff60c382efb9a
+ce82899d44732510ed59ffdf65793e8b87aba085bbe791592648c2e54149e31c 66a0d3e080b950bd021b41e88344b320ff6cd788
+cea0392913fe99400ea093a60cc9bfdf9bbf5595c3b431c19e55e2fc6817edf2 59b80d2729ddb3883b6033165586e4a8ba206e1b
+cea8d32b6932211a24dda86e4f78a7ae9ab96f7473e401a644fd050f3cf98722 238e54bcfff45d477a17cc5a0f51f8ee4bc68bad
+cf03eedf2689e76a91a1a230b386e6c9d74167205fe089f44062a96bf7470e89 770de6abbf0bb31fb200f0ea0f86ba2cdafda441
+cf096f21a02aa07d39587714d828e04cd237457a026545866f3fe520ec55646b 3e9e69098af2014a0c3fe9e46cddcb5365dd538b
+cf1d995805102eaa9b331c1f6175a3bc900d02712c0136d5eb4994acd628955d 0856dd76baf3d609acb5ffe3b13753cd5a046482
+cf21a1ff89546dc52c6a7d5fcb6d95bdde4210fca4b6fe3e7e61945c09c37ab8 840fb8b7cb13069c2c5f691beb30c8039b384526
+cf329ab6c0737e02eeb28014efc5968aeb023de5ac3bc00f18b254deb46deb0f d6694db21c2f0a7e111ea1b0d9686cadfbd2c7b8
+cf8449d51d5dd28842df865aa457d144e93f12aa1491e553137780ee78f12cc6 1fec05920387b516347793c23c32667b08208fd9
+cf84e5be57f8d5d51f136d3d137b654c602721c469c1b0a58e7e95647a9cf1c0 d07b0f9a8c89f1d9e74dc4fce6421dec5ef8a659
+cf8e9045fd1d957f8010c75d60039bcab5510d34cd0d74ee63d3e5d35c135b6d 28f9832928c52e08c7db5a0d31fde054f51fc475
+cf9d92824b6450da8a2dc21ffe27b92d49b9f4fe7625aef81eb2ffc9023d2d25 60b2b64f87b2e7956a2a1b5cbc5b08ace8140703
+cfaeef6c51a5ff131946932d81b5d0adf3ea351c12c69d11a6ea24c579063914 93bf51fc98691be66471275974cf020974864199
+cfd1c700cc165ffae0f209da9e257bf5a81073b72f99c65b9229ffb7863ce861 54bdf67864a5d9dc16fc548f2748462b3fb63697
+cfdd565f4cbc315760c287d57714852e1a4894eef9c715332fd556f2e114a9f1 bf2fe2acca17d13356ce802ba9dc8343f710dfb7
+d045e845cde8405d26b094b960aea32e0ac01d5822b9e9bed9a62e036e453a1c 6e19d89f34fc5516f5c01542ab0050bf127fabd1
+d04809ed41a6c0d0b713efd6d7e586a7a05287929a296a4b963938c7c01cc317 c545d2d17706399afcf4482163359b03b485fa7c
+d048ba2ef4fafa502a44cbc1a50cd58359b9bc243b84a08f541a08ca5f621137 a93f42a5b5e9de40fa645a9ff1e276a021c9542b
+d06600e96b3e787b0487b24a3a1ebc255fce0bac6f59d24fcd84814628032faf 56d0888fe6c6144ff623eecb768013569e9458dc
+d0665f4f91544ffe89e66d84e7c24b6d87186fbbe3866bdefc5027d8068f1fa3 61950787a1b26ddd5e6f28ccfb381b91c7cf5236
+d088ed0704b46349ee0f8758cb05f1ca5fae4ef74383034d29ecd87b010f6c10 dd95fb53d92f45a9901b5b5e983760a850d98850
+d09b74a21594a6ea4388732a10b7d1d73eae0f94fe3d5f4855fc80444d885372 0c01d80a09b0908856d5494d3c7ac7e6d22f1126
+d0c992aae9cde855b17ac826234a73255ecb09534cdcfa633d90640f6a4324d9 affd84ed8ec7ce67612fe3c12a80f8164b101f6a
+d0fc7f52dc42358506e7f3f3be72f5271994abb104b9397ab3e19bb42361504d 53fc32d17276939fc79ed05badaef2db09990016
+d19c2efd2154cd79d3b430619d99438464b038da8540cf407f76119204ab0782 5a646197ed0c131e5326b5fcd95ad88a1fa3f2de
+d1a49a45a5f109805fbf478a95715b528644d0e0f10b03dd2dacb4261dbe0094 28cdde6f9faf5a78c048dbc17259f89dd4b26e29
+d1d60af9799c7be57ab4d80713420c9038e360c0164a540247614916996a4af5 3bf9a46136794395a845084011283d07ebc3e958
+d1ddefb4e0093d5a1626d9a1b6757ba2b63a062fbdf2df846f8ed602f2af6166 89b6f61f7b4d3ac809de9427927a8cd515b4bc1e
+d1e8c4b8fbda2e1696c9b9ff4e0aa9ed3b7caee2017c01c06525d08e982e2c3b bc23042895607cd8127e5de36f3d330cf20edb57
+d1f527040a42190f2005017fd900e895a77f9f8849deb117f24450a437c27527 749a91d742b7535e1a746ae6708350705e270748
+d1fae456ffe8eac24049a507d590380f8b9e44593bc33e465fcf94be9cc88cee 89cadd27f3c2f56f5c943e55416dab3ee2d4fb40
+d217cd3b30193bf232ef480c7338f40d2abe46d5c104b485edb6e5997e4606cf 383d52d47751e52c11b097d54e14b436bd41ddd8
+d21854ac4b6ae500514b5e6d7874258bb86400934d411ed47345853edc50bdf4 ab3f234e5f33426172ecead8d964b927bb281850
+d252ef75129500a3f78f16cabc6e0a824d4c1bc3e86b9e0a18bad7d389353cc6 7d685c7221b01af31c9808145ccd5a356dc67f27
+d279a299cec8dc4fcfcf8f6bd4c3ec5769628693a3d459f1dde581754c3b2745 d65577e1580cc68402df5827fd9ab4154edc0fe6
+d297d0f4a84ed8d5cbeac8e262906504d1238d59e9bb0adc45699eaf1da67372 199447c2a54e662c9db370c9a6c89219a32f9fc3
+d29c10f22acb667743faf888201a16d5a52dfdd3168c434bc7b6418d24f0bc87 2d38f94e73d3a6df5d650ddc6835d75498437d22
+d2ab425d6092770366bc3dff5276e3a869221bc7b6d22e99c089d556e7eb8331 d01f7573ac34c2f502bd1cf18cde73480c741151
+d36979c8da3118ed133cc999f0d4bb1aac029f59b2a6975893f41ed2d5c97342 a73891d7c5aab19750b0f1999120759e6ab0eb32
+d37ab9a95d602c7979d3dfae35fca327b313836f11e8511e1f29dd3eebe0e5aa 3d1f0e5811ec9f56650e70f8b27acaba9f34e602
+d3834b1c2da88ed1e98a742f7e8f326cd53ab464cbc726887d9cb019eed6ebc2 1a895dd787a5699c21d7925e9cdffa66f23605c4
+d3c2cc39665ee7d8e3f16069e0e27f35813e27c802d5a98be106dda765effd1d 3f541ffa6803066aa2db492a8229e0b35b5862c3
+d3cc02106ea9b78cc5d1ebf609a4931036ae3ff283ced382252ee713ddd5417b 5690f02e87e4fd31dfa9fd7c9c01aba03603cde8
+d3e3ade60c7ad970e4ee6eeab5fded32ee932e29d6dcb3656d7ed3bc9cfbe3ff bc403249eeeb37ce4cf73dc66711c13c5d19639e
+d3fa679ce39641a538cc30576fd8980999a6edbebfb8a4ad187dd406e2dc4156 bc874e116fb4e785081344c2ae39aed3bd072288
+d3faee8d75868598e59a88279f0509327844800b54e51fa96283d3c8e3e7578f 6533aadc21270052d8d05835b1e30d8b13a2f164
+d451619d5bee5af825ded81f99b3862ae60fe8b182ff10b72db8d005c173dd6d a7335c5170f4a963c8d67782fa35222d03d8a16b
+d455043371b8730cc74f280b64e25183233fdd330acf54ff76526861d513bda5 f92446126451b27205551041c92f5f7f84bf6d99
+d4698b848903dbdef9f5ffcc0496b1c82bcff777107819638591bc5c93fa2942 dba81bc591c332550be284f9414350861b6b066a
+d46a8a40c5bba0b053951a958ab021f19eedf8fa4e5a75fe1927d33ca498c973 a920633902d32a6fcba87c729b14e08341bfa097
+d47674eaf38c4547b4a490e5fcfa7d68ca91e8aeed2386942daf07bd1f96ca97 f29249340c11b069e46b70fc145c1d7fbe213b94
+d4923d7b828b897cc6628e6e026fc956a347002f62e1f6f52c022c2c9c664954 418382dff1ffb8bdfba833f4d8bbcde58b1e7f47
+d4fab9558c0aae0a9010ac44434c891492e63358a30960b40e48b0d0e5f70694 9a9e5abd7e7d2ce46fd6dff590360da875b81247
+d4fb1e12bb875235a16a5037ebaa06cca35204c1fa89c9abff02282beb74820b 9655ff12d31716c9049912eb6378a305346652c4
+d4ff08d0ea45b6d8eb47fafd430e2496b132b2a0617b6cd77809eab2612f9823 eab36c05f0ca151dc5732210223d0abc9e9ab321
+d509bbc6e4420c5d0b833045f466b02c02922bc4bee55f91d4b6751eb1a87074 061605020c8f212d696a2a3d28e20c7091c09443
+d509fa76ff5944e25f48c2476736b6239a53f0463cba6ebc488464d087951951 100746511cc45c9f1ad6721c4ef5be49222fee4d
+d5473cb18ca962ea72ddc29df047c3fc1aba13e5cef68e600f5563135730b357 7e02841efbb3d464e61bd4dee8d6031afccc6a70
+d58aa1f4d8c35426d90279e0a0b81669fbe25bd200f969fe75440f8022f98ec7 b81dd80e8cb77046b6196a1dec3f8f356307fcfb
+d5a9b3e16e2756a30bc62fa92552f73d9d3e02a344f047e3b24ae1392ae90c69 59c513fca0ea668f5c815cfff903279a4e859731
+d5abb2bf61fa4675ce068d8842ac6bcbe7c097d035ed5e79ab83694b92e3b8ae d5ef6a1381ec4cbb9b78979d2ea7c6459a48efa4
+d5c255a2cc319613a97ec8b66dd44e5a8c4d8328a3559840627511c05625b4bb 9514445e534ffb33b50c8752a7c9267e3db3a4bb
+d5d0a313ddd0d6d451ce2178da7d7ba19e1f968f3603b80193699ad5a8b51744 068817d917a1c86a5fc33e7925fbee9e2128d648
+d5dee571df1d0b72a7e820d9a08d770561776d044894b626c3ea556cb804b64b ed473e2431c5c013f214e0ee975e3535b6196679
+d6569dea7a2dbf053eb60492f35432622090918137696fd26f01fc69b4dcd67d b32af570d6088f5ec58b08d0f7ad3a74265667f4
+d6a3a68c9c9ac80171333351683d26ca70792679a830155047ca4f85207be32a d4b9769056bc3f7d22860c87fffbe9d4a9065c03
+d6d2e87e6de8690efd26b8c5b58de28dcb3c9bd2b7659eccf34468d71a7a4478 bf55f407d6d9418e51f42ea7a3a6aadf17388349
+d70b0c834e8a1efde1158c15681472b3c7d12da4d1167ed62581e0ca64d184e7 a9e9df3b695e91894be66c30366f0e2bcc73ff96
+d714f59c54cb4bc5a57b9c68b44bf21e2ce63a45f1030baf115ab3c6e7af9709 ef810961d54761c4954df5566da929cba3459561
+d73158b62753ea4eed99124b3dcdc4c873a4ac449204a932b46f46a4da4c4778 8e5a43b2781f75268ca9cbb71993b377cd1d6106
+d79e913b4137117b7f8fc2a8d184373f657d6f71bbeaca0fe83b7757ce486108 def425bf8568b9c1e20879bf5be6f9c52b7361c4
+d7a0fa6d2cc7b83596b51ba9029ee05c553c79eaf3f22298a407c7cbfde61d07 f8588696bcb81e3cf38fc47f2536cf8e25331c7a
+d81b2839dc735c3ea774b024636a3f0cb13fe75373e9d1e81365fb1013090e81 89ec4c021467168e5507cf91b712b6873ebe8ade
+d88b60d2641df3656381dc8e201abb820a414de03eb63c065b06a2ab37d3f5ca 521d87c1ec3aef9824daf6d96cc0ae3710766d91
+d8bbcaceb334b4a84eae3db74b9201390a13f9cdc2705f5fd68d1c124baf745b 126a72cbe290b3a6a8caf8732e886d3d21c6bed1
+d91051fa024310949c3ea677750d8dded9dd9091ff410826644521c852b15ef6 259ad1a27fc30dc0167d8dd506cb800bd128abc5
+d91df71dc184de6b93ac0d3fced0cdccbdb3f8bedfa433f57aeec533ec657861 65ee31bd49393a45dac5fd1593aba0d332c829f6
+d963a010dcf03c6b21fca8bb99725da1d2443a9dc0a610c5ecbd25f46858a7a2 2bf7e29956df690eb8462a49aa1f8ad9a85047bc
+d970d1a6296d149bfb8283b8b4a9a6f7e9ee320c5d46a5ef216e10400df2d281 90d4d2f0fc362beabbbf76b4ffda0828229c198d
+d9750ce4daa558910affe057a0a21ff130abafffa5cd3b9bd8857ccff7875543 b370dc5521c2dea03a3d2d1d1209b2691de80323
+d990f65cc071cb0668259dd2f7c1acff8710fe2196fc56e4f43496208ec0edc2 eb7100b307f2c35e7a2d1b05125cb58702da2897
+d9c20b21c4037980a27b4cf716771f1877ccebce89f08b9d07f5b35f4bfff8e4 42281e007e15713713b2ff4324d60360332e194e
+da38f65b32fb03ce332e0c4238edae0a733e4cd793d849522bb4e0bdd0af608c 8ef9060a954118a698fc10e20acdc430566a100f
+db5ffb15114676bd1246296817d68013ead717c9efd093ffcbbccc805e2b50dd ccb8c44ae6da1b71f65c26324aa39ca35206271b
+dbc10ea8c211fef2c138839705ebcf10b6d1261f9af7fb1da206fb8b19050222 bbbf64b0d5c1b962db9d58cadeff78c11bd5c515
+dbd89b614245ebb6f859f64e47f5caccdc93ca05609e83ca5ca2ba478f2d6f31 436cda88b3b747c66549eb0fc0c89d1102f967c1
+dbf3df54acf12a89a09b6f1e7fa9aa29685f419e9a595ec6389181ecd9880bf0 c470e0e0a392d57a681df5d337fd64fbbd9928f2
+dc1d3d6e12bd685f89221ca5051ed749c4ccd59083e2c26d815e6326b8bf8cd7 98822557cf753bf7219fb362c32c9330d35e5f60
+dc8a2c27640a60ce6b6c5424325abfd5d6ca1ee7fcdbf49b7772c107fc0a6cc5 0cf02ff92d5c08516ff2253f59daad1c4c582d8f
+dd2e1251481bdf69c7e256ee65ce366ecd4ea43c6aaa61b30bc2d4be17b3fe57 c9280f9f1b0482a337c3250f951431030f9fc91b
+dd60b4f51b88aef523ee1cbd6e71b8166b9427c3656cd2d1524cacd9e768e4fb c15648cbd059b92c177586ab1701a167222c7681
+dd6281df774f9e6af8b68a79fbd7c3bb5eab20c85c3385980b8c98141d080c72 36fd65cf283151b18e93dcb5e625fefec79762d9
+dd81a2885ff56d3d275ea52e79809d2c2665fc64949bf3add600d0b19d169f59 2733c6ad2584625f9849e9824927829190fadad1
+dd9b1d5ca653752cef167e034324198971ab6f2f38f3db9db571cb2985759f00 8ed341c55ed4d6f4cdc8bf4f0ca18a08c93f6962
+ddc8a477387d01547a809399b37acb2456faf0b527b5795b3caa5c2d1cd3ecfe 9b3577eda0e6bb13d18a304763b91665575adfd3
+ddcf2e7ae93da5f152a605d82c821b530f88d8f09e5600a09e44e7c89463b3cb 2061cfee59ecd5074bfcc0eac7dc5b3637d290f5
+de11650c5186daa434fa253c05372fc92c34c69af7afdc4137aa62adffe216d5 f9395075e3c7bef6cee2ca5140610896f4855c72
+de82cc04db42cf7ec85c7d6847517ab322ffd81674669fff30b2092c4d10d319 71628d165d4273c15f1ad2320ec382c8f29f566a
+deae56ba25b1e1fd5c971fc027ba413e4efebc393c1edab6aa887881d111ce46 21648b45356a49c76d58acf3590bd98ad12b3d58
+deb5d5c69e8ec5f11412724decfcb6913ae501fcecd381350521e3dd30a84cb3 098ac57a13165290bad223e4949fc6f13960b604
+decaff3051968d1f3a2defd3d4a80ced03101555e1fd8913b3544026c0717d4f a65fedf39aefe402d3bb6e24df4d4f5fe4547750
+def8ae3f46a6251e846b25383d6989ff7931be0906da0e6049d25669df260c7e 53495ca95b5d1fb2db527d35e6a8825bea12b51f
+df21e6bbf78ab81e603c9a0eb8a3f2c2edc2659101553405ca57f48d13d49773 5189d8ea8bb07be6dbcc0aaae2294f2b1840d335
+df70ff5ce6431e87f4ecb612cf69aee57b2d8c514e51da1728af6e140ad2ef9d 4870103f0d85d833fafcac9f3eea8b17f9151125
+df7592900e9c0c8191e659cdb9b7a02f0eafc08333ca122bb65f90c466993bbf bbb0d9beb03f3f2d2d81c2199525e7b459f1216a
+df773ded7bc7739ffa988358979e1ecf8cba729f6eb8234fe48bd3804d909194 5673434fff718d93ac738a03403442f16abeecba
+df7c2829b803b4d008d50676565314253dc23a2f8b80a9d2abec2f8fc027e1f1 6a133ac4d1120d3bbf563d61338bbcdfad4b6ebe
+df7ca8caf338f34197d9bc1e346c66690321f27dedcef793f2eb8f99976cfd57 9eb7976448bf684dfb41993ef6c76098978ff933
+e01ed58736f8d22949babb858e5b7c9e9e8c6da45f125c92ff74e4ebc30f678f 6c48d15ce6a8b8cc415eacb9192c5a7b93c3dc94
+e0243b96d2d6668ddccbf4e1744c365b8bb828f0edccc3adeed9cee2fcc0718b 11bb049bdddf1d203dfe8fd6031c4dba328a7525
+e08ee0ca30e32a912f051a443280fd3bbcf593f5e23b5c5a60cd40dfb8b31c38 e3805dff27023ffc98b1e8bb5f8e71e613f134f8
+e08ff41efc23feee5e8dadf3d3901ddbd0e80d4f39c1a893a9b1a4ca6e457c2b 24f3b8d8e8c8f3a1b495bac67d0c493d425ab6e3
+e0920162225ac182b02b72a4999007ce63491fcc0d5fb5b130c8ab6ace46d5e9 36b7cdb6a1a2e685c7141406808366d4c4b9f98e
+e0c95bbc34c21872d8a284055d1861b542037744cfcec048c261b5dcaf0d8c4b 15f71b9429442ed616b66b986814e94f983d4050
+e0d289871eae81a3c89d3760d65ec61601a007c010a129ee02f3762961389ac5 e96aa1e25e4ad7dab5d397227ba8f14d302bb393
+e0e636769168575a7c6a7f262ab2e3f24d15aef148224a75949b19bec3204555 09b79f8c2ea7aac83efa086f2ee2377b11c4986e
+e13a3a7900774366f6927fbd5006c86b97e0c500873120a4ee73fea158b0a0a7 1ae36609fa336f5d3373eedc18f00c4f05194931
+e153a6b70868bf54a33528407abb749a5ec4a278e36ad587585a807439e75792 001d938dbe69b6251f4a03cf374235c72fd0a0d2
+e15e12b19203d0869a45ad94af16bbad57b91dcfd8d70a23291da3eb39d1db70 87a63e99a903a009e04760bc4fdc195ea25922ee
+e1853ed6756da2e3c8c3902b9d373d06158e0e42daf8cd1b364059bcf705825c b42f3f731f6709055f7baf5bce3f39881d4c62ac
+e1e91e53ba1b4c377a3a86f493517ed6af162dfcd79191cf0c6ed6cd1846eb64 9c3d59f42c90513a69cb72d3680656ecd6fcc309
+e1f458e5f0d9f51709fecc937aa77830d32d5a06c35fb5a71f37beeaeb5e14e5 9e300586fb4dbcd7a7e7592e8bd36bae946bcf61
+e2040ad7e0b914aab16f77a98f629a8df48c3d5c6346c591a5bf0b6bb19cc6b1 d4627ae2e5d2510b641c806f023335206bb4b575
+e207a266e228414023223530eb77c64b10f2f5124f3354deb45aff04c1db98b9 c059510ad1b45ab58390e042d7dee1ac46703854
+e207de850c812ada0f0196143822e6f60237a7de1f189bad75ad55337706ba73 eb1228f46b3c2adf90a4a4f4093dc12434c71bcf
+e2199e776f22c6c9a6f60a74711cf168914dddabef1082bb18027baa9d224c0d c6dbfe02ff6359247b49b0bfbd55dbe659a90def
+e2b8d0a4730f8678f5c0bf72165f12a58aea0b5bba85405da8e17aa3e4c672ab d7ae061cab626313265730ce7c33203ea371b497
+e305332f5c4735afd3f441fb9fe7c270df8e8cd77ee73e6f9c00c5cb2cd74c5f 66ae897b9fa0efb9ca0097531be2be366c82d125
+e32cf5f9c0e63f632a2e85c2f57b4d74e352d382fd9e449c5660d5f42696b5b9 88db4b005a4f3883f127d8ff0fa39ea7344d5b35
+e3c7bbc5d5fc396e20897c2124898b3601c494e6051e1a5162938d664e872477 5e95e5342bb02f75240eb1b5978246e2f10c2810
+e43f7ff09259618dd58412fa34610db1c46f6b1f11d7e61c74d8ee91f15afee1 c62b80f26a9b4253aab953c3d860d18ee042bd5c
+e486f397c337cb2ab4ed93f7e4bdfe0e96eb2f19b4666b4189d60cc961db4d56 40aa5f7bd409d7467369818208e9eeacae39523f
+e488ea88853da32feb570d822cd2458bb7b525f7c946d5956967ea6c2ebde4d5 6a10662131e014c3753a6490644428760fbf1c9a
+e4891afff0042d2e3ec44f05b0c973d9bac7bff295b053b614f62377aebb4014 ab9c9b9ee553fd11f9f6d5534e09337c769904d8
+e4cb9e225a817b0f5695fc52c0ce05860a23b345e8338987c7038fd68b46747f 8dfd652805e877abaca7383ad28d8eaa5b9a7e04
+e50daa85ddf947a33ee311516011a786e12a1e5cd1b9b60fe34fcff79af97c6e 0703e6ccf92d6f62c552c7be1af34bfc45fafe34
+e51625cf3375b401cb07f27c258fbe0deed231836136c72670c9beb02f022b52 a45b803b8bc607c1d8fe2ad0f559359574231548
+e51d1f186aaa3e81f6545e45e30138f520f9cddac17f121e3a6dfff5f4286185 d9bb4c3ba46cf7de51761352c7b04a2d49633bcd
+e5714ecc9e216d2d23e0c9265aeb7f94917f5445a06e988f40677020a557c1b4 ff7c7576aad8b6d87100eb1a62c0bfcdd6e24e01
+e5a8af67e6a6ef9eab9989c16c19bfeb1503a4d9b3c2100e6a98d07155b0c16f 789527fb457255cc90b2b79dab55b67023c7b8d2
+e5dd60bc585584073807044262f8c611f3c23cbba01562c81ceeb7a046226b28 2e3e1ba4b6f21a028ff2d8f17febfe22fe93afe3
+e5ea38108d603a6ed8dbb0b8455abe6d971f2d60920207e67ba646d267ece305 6f4e2c42d9138bfbf3e0f908f1308828cc6f2178
+e60d23fb634bb7ba008578d69619ecb715555c539e5e1a09995c9fc1a2fc8f89 4324de04e80f5cee8a6d8d72ae7eff4a7d7e632e
+e625f75b91fa95253eeb059ff3a4329509939b2af57d406ca6eadbd385441136 6d8e93b8384392ca44be9693c850dfa04b9469af
+e64b4ef0c042862ed0071ccc2b2dc8766392d69a1c69ddf9f6e04f61b79bf424 f8ed08a88d6f982e040feeeb2240fec0b5e4b151
+e64ee640eb592c7f2d9592b700c416b96e395d114c13752555ac220d850bc739 2b1ad31b77c1c1e9de3af7863e3916f2fcbdd1ee
+e6ffc310d72a72943da3796f9716d5bf6ec72c477eba5d55cd44b542ed50bb8c 2cdc4544233b503a5aff7dd1baa4ba8743fef7ab
+e702c3dc4fc84a70aa440a441e905982e17e8c5bf0bdfb58ccf6862ddfe02d2f 963dd0fe0fdb9581df0159efeff615de0771709f
+e71ffd37f2119fcce2a02248cfc164238040138822152ce6c8959b35486036ef 06d2a40e85256ae9426dcf3847b0384c547c2252
+e7481fdba48ca2efe4928cbd4a631e313450ec901be85092bfc2428544ea7dfb 1fd98a61779c499739cbc3f34f351eb40d3cb4ee
+e7675558e5b9b4a8f0eb006d18979a6019cc8493836ad5b7f06ca75acce29892 02f498e4bb85187f9fbc0b0e2eee06d5c9c27a0d
+e77505da06f70c52541f5c07441cf6205da770f7a4fee730757d12962172b93b ed10f7124a75cec05081b751801b6a0a0e42e56c
+e77be3b1ba3bd6211b30953bbcb31b52e8c0ac0c68f89ed62bc708caa489cd2d f89099c671ed8df50e040b7a62989b451366d084
+e84639624a2e2f2f89bd215bf640e61374cc0f3385b646d0d59a85bd7baafd62 c770eeb29c9c95d27b9df2d30b6f47d62e78d07b
+e85c03d559c7b05c4b6ed5b796dd42a5d018e9f3cfcfdd4645a110e3695f32d6 5071d53225a4dad9e07bd0c9f04a45d0948bad06
+e86d64b9d11cfd3d2a06196fcb3785d0b716500d06b1daba9f582a0368c78b27 0617d6a892682a5d4b4081a759f84ad57b28c577
+e8965fae4238a25fba359135d62087dd0e7fccbae626d5004601b6e9c50461f8 0e7fa1fe6837a46fad03e7fa9a3df0815364982d
+e8a865ff7fc36bb0f8cc2460fd7b2977189b5b6144c69e14500d5478cbc9ad6d a79612435aa5b1996ff8ab70e789c8864e55ad00
+e8bbf40ee280bc43b33c04df2250903b75e92f2497e91759cf1cad753c23be6c fc58168adf502d0c0ef614c3111a7038fc8c09c8
+e8dcc2ca3e4e882fb1a824c72543408d014ceaaa04f0657432baab8ee69e1195 8d762aafd2108c0f4fee8133dd2213e3658c66af
+e8ef4c26d3c9ea277e490ff6e7d270093e14dbd1c01a3f9d78dc972bac88d87c 46fccbd742b48fecb83be48e16885b86bb299027
+e8fd9ef5c4543a16e74c80cd9bbee3e2b387072a14c7bc653e8f96864b7a4bfe d1adf1be64991ef9c94d836d8075f232b73b640f
+e91c29c398d4ba343251bf45e859ee4820c2e5cabef1148565809bfeaf000f5f 2e997a35970424b1d6a6de26f5182898c6bcb1f2
+e92d166df3d560dde2087eb6bb14e2951618a37fced2fba2cce748ea2e159382 a651bba3601c34d3ea21c2cd5b898fad29854433
+e9570c71d360e851fd1945be15a2c4875ebeeba9d9dca7848b72c0e35a562bb0 6457fa0a84176ab4efb565b64170dff4175d68b9
+e986254345a65c0b48ecb229c1f47d9c7b8c03b1dd8cf6cf5bb6a877efac7086 97ba57f428e6d74fdbbe4144b8c9bb46b9ba5315
+e9b7c2531cbe327ebf55552276f330835034014be5e5d603b9f1e1ee5dc28465 9285c652cadce66ec115e1b079648e64a9bf0c67
+e9b83772d89c5948ee301059939d6c37f803e5f6055894a2d169715421d3f0ab 5fc06ac83625f97d0b03000c4c224aa86c3a350f
+e9ba6f1e38d419a6e3e66a8859ab291f70cc042192866fe0f0c76229f7acf18d 498bc0906810bd43c6fbc73385fecb7f2d04be3a
+ea2ec997ce482c0d1d2b83f7e5bb6c3ec634c2018b8dd4e4a67cb3a108bf1f57 3a2aabdce127a367aa27a4c27025199230e26c15
+ea462d69e697a2d9c70e2445739290c6a4a2d649561c0544f5bb027f9a90248b 58b0cbea74c160c61ec70768568e150c4d31f633
+ea926306b1bab6d3f25f45609907eb6dff91a1460b25e63bf4a0494c70e7a269 9fcf811e00fa469688943a9152c16d4ee90fb9a9
+eacf702e5d2a14313d65279dfe65a9d1be0188107a3cbe5573b268cebe483876 1eea99f3a439dfa65fc9d86f7fb4bc2338fd7dc0
+eb128916f9450004d9468de8c8458ded8db58ba01fbf36201aa16f7255269e30 bc4153d7a1038ee96648f97f75aff45c22501412
+eb38ab81898b34d0060be1e38fffc4e04545dc24ab8aa517550d801e1d98865b 798d19706dbf082766df35d66087d40b1a685a7d
+eb61f971c9c8dceec3dfe54fbedbaa9a07e2ebbb0cd44fc38617431fa213ea44 aeef9c0679084b1a3048b81831d4ef3d9d7eb10f
+ebb24827556f1cfccf502c909626674796e7e1e1cfd08ca430f3490e9f1622f2 e6fe30dc427d63dde4107715ec219c92a017c864
+ebd4e93650254bfaeae56dbe5ba868427274f867d5d859e406f5981f3ce454f9 4df1521318774135d66161a37fd1a06423d0dc7d
+ebead5965196dfaeab52b1a5d92b78e54493fdaa78f72268d4cc69b61d5feee1 1f67fc4386b2d171e0d21be1c447e12660561f9b
+ec05ea37ad15fbda3b72d3de3cddfd82b411da97a4dd5dea9bd4c5be71f2fdbf 89528ef257ac5bd32f4980146df41872732ba2ac
+ec0afa8e0f8d3f924ae29e9ce6e314f06a3327a596763e7c0afea13c6deff8d3 2066aa3e804f6344b131387e17e64dd20df24cf8
+ec0e609764571fd852ef82c0f2272fd4940fc593dfa28a1a2aa4118f764babd0 f5121b1e6ac7f7e40c08e5c072c05a936d6237c6
+ec12fa9a4f7c288ea3ca253b0cde3250f01f2420de8da0e882e15f7c1e875d3d 2c09181f38234634e478130191323c7f74958c33
+ec1866b39026366e69ab8e167c15312c27f5eda4c0afdf9367ac3d76f56bf8e7 4e7e9f60b7e2049b7f5697daf133161a18ef688f
+ec21b1d718a46155b66932c5ea66255e651ff00131904f5c15b13e278ed394ab ee3f1ebf8ca0d0bb7040a888fcefc14873cc1484
+ec9d0c0503395aba37c14bad6f94e30773413e51f4c4192f637be5079922e9b8 37334566347064df74299d0479ba44ee7cd844e4
+ecbf01d97e2c2d6c04e428632edbfe9b67dbbc2f22967c35610d634f8534ece2 838bceb4b87e6a65042f955c90fdc809b34ba3ba
+ecc250a19bce5bb071ba73708879b69c8d93cc655ba47964873087260da82532 872ad88d663eb6eac5365bd64f0d2ed2820b2017
+ed1002021629a4a96d2d53168633fd4bec45fc52a4dc3514d09becfb1f4846d1 52121c9b19c8a7625126766102b2a8145c1c0632
+ed10f9520d5f0d6bbd9c467ed83a239df0cba94ae9031602e02f6ad6256c459e 4fc3874b118752e40de556b1c3e7b4a9f1737d00
+ed41f28b6dec2c88eb9b4825a1ec79f770ddd524ff8e8c8dc117697cd8f3f039 1f3ae5e22cbbd99f678fddf3eb1a86726cbca831
+ed994d1acd346cb201da40004ad4f59cd42270537a086298c89f81873ed078d5 0fa9bc03e0832bd0e4f9b9a4735a3301bb37a8d7
+edf6e0dbfaf8a7ad89b05b5768981eeedd7a2bda4b1d0fae07aa2a9d49bb39df 32679a9544d83e5403202c4d5efb61ad02492847
+ee16964dd77360202417cb8e958673a3be107fcb1551a7b71f6985d2102c472e 7c297e8eb9ca1fedca286fb5877353c7356c380d
+ee4981c3f6d4d973a1f7d99998848fe4b778ed2762a31cae46f9090bf47aa0e1 a7c182c59414cece10c819989bce3f1247f4eacc
+eed74bc11a8f6e68a63c093bcb7b793c3a77b18239d9340a75dd690b4e790dc1 ddc1e625381d4fcb00107f5640030d0dbedcfd0e
+eee9bb8a199012d24a2f94bb633930f5bbdd4b59d7aeddd430d7d5b0c0abde4a 960ca1d7799e02b72ca828373c3fff04e2cf0334
+ef08c989d6195b9dbc09f3053b94f642d84925d5d5f3a2dfd28be482d77f1d97 3aa9ebb63e642246946ca397c8498df46fe6db0a
+ef461668dec669ddde121af3bfcc11f173be86c4fee529001cc95e22ead79a2b 8e9e1e4f95e44ecfc1230a91036257ccbefe605b
+ef5dd9207c9041337f20818723f4baa003a8e0e55646ca726a62b4e7f831583c e3c672819ce10dd2207fd8df6a52eade74f00996
+ef9f17d60e921db4ae02169736de6f4da6b6ea76cf3419ca30494fbe2a40f0ac 77bad856f6306f1c1243ce0f4e363477205d3cbb
+efc4b8fd4b0b2586fce256b107ee2a052d11d26f99d85ce0478c3d49d1b2186b 8edc2805f1f11b63e44bf81f4557f8b473612b69
+f00a3d864ac7cc74bfc0d238ba10b171fe7b6f5f2dbe7aa08ea07f99865bafd2 5bcc94ea49a378e97626436c5b28be17b54eeac6
+f02b8fcaa64271d82d9021dfea900a09fd74997a61c21642da82fee6e6b20f21 f3687dc858ea475e3691834bf4ec00a2fe8c3b27
+f039acbef00c0dffe624ad124760b27a085358a81f9ddfc071a2eb2e44035097 5841342a0a9453dca640dc53d2ea18ed70409c86
+f043d8f788777ec076d2e6072c36ecebc8772847e7effbd7fb04256181ea1e65 f09aecf46ef68bfb4da47e593082805ebc644d5a
+f08cad6328b43e133362254e1468ead13b1a5f39a22d45fd956a90a0a860b401 32db4c9153f750f183f5f6a11e4a1e5f093a739a
+f09899f54bb2a1feee2a205c24b5c2e9ffad5ead4fe15b2f21285ae0c973ec60 18f4b6b56c084ab586170cc47e5f8d55ffe1add5
+f0a7a226654089b999b5c92b34d304a9a7c7c874a6484b2437909a6dd225e382 a4f863af4d0055126435eb01278940aaf727d2b3
+f0b7aba704d8816667f0465022228bbd93ec18502f1ba75d0e4105c49ddf1a99 0b30644f7cc496eaceba0130713c7be51021bd72
+f1982fbf726534f88311eb2eac67ebb828c10bbedbe596ddb956413b5e9e1f17 4033d6b8cb15107abc2288b64f405d595f4d68f1
+f1b2af9976ce14a31b39e96b27b97a72606393c5f87c500b933795959fbc5122 9bdb75947178f72df30314d66bc9bcc90df643d7
+f1d8da2c2039b56e385ff2f76f1f2585b5d708ef1b8b5527f253a335ada68d83 88ccfe32b8a8455a7d6e709666494c33c7387050
+f28ac33bebcfce2579b1e8e91bd6749c7b06a7e5825bd6fc2375e3e724f20612 5235041760e8186f96bd757bfa378ce5adc90b4b
+f2a108f86a3b4fd9ad75ed55e9cb3cb46e348fca3b9dba3db64f7c9f64b8a736 944c0f6e4dfa41595e6eb3ceecdb14f50fe18162
+f2b78ab9d3df69f23d3e9a9e03b63a466a06c760c4eead34f90e10187f86acc2 487addc854add2a93bfb25f29cd7a5c2ce3bc40f
+f2c8da1a7c2eb49ff25c47441f0b3f387faeddde1b37d0ad2f3f6a63f5327978 bd758010071961f28336333bc41e9c64c9a64866
+f2ccc71ac9c89dd36f44b911594484abb969c62f640f9cbf60c853896b6d1d13 93a527ab2bf2555e28fbdfdf31960326c4055d2f
+f2d5807c5279cfdfcf302fe93d1ac90025a03a57132ea1d852f80f0ba0a1158e 898dabc73fa99e31f117c366498046cb33c8a24b
+f2f432405c8298ed098d704a9590d7f41451b16c834520580fc1270fae0f8b17 bce499af70d434e89c9a110374f1b7c6dd3621df
+f31459efb9367c5a19c9dd24c75107423d5773066922ea5e55eaeb6490979562 75057dd4114e74cca1d750d0aee1647c903cb60a
+f32ab793f10b04cea82cb3bda32a0b9595b5f69ca89608f88d3572914de6f720 feb1bd8ab25180e447be9862c852a45143e98375
+f34224f82528a95407c2202f0340d08ce68435c02c440932d4a098ace60907cb 022d8b4e47f1ee40270ad3beafaeb5c025ea1b76
+f355aa3c4819d7e2e235e2638c11eefff5ea1872c2304889bee6e843da7a382b 3d40a87326d25342300fb50d78744671440c5408
+f362826c827aa3bcbeb3ff8b71bba08d7440b89ab53fe95d61b8922d01f46e28 e0743ad4031231e71700abdc6fdbe94f189d20e5
+f3c7b2b4491f7edb2150c74d063ef6f49c81ed818d8b447215f3b6c3f6091cbd ea59a210dbab63d18bbb616fc27087d68dc59777
+f4076ec94766226a8ee1d52c84ffe070d8d58cfa111e845bfc7e3e99e314f19f 43288a0733c1dc0a506a1e45087bb7f9bd87d047
+f430e24c70cbfe819b5f201e3ebc34a3dad712ceb08ee4f13fd8bd07a6fa6d44 ea28d017cc7a2b9a329dec6bd91236f5424d72b6
+f47bbbbe82207974769ce35769b74de8abc56d4770efca4a2cb755d55c150390 6a840ebc2b332a23243a5590965eefaeeb460bcb
+f47e3b2db30186f550ec8c5c0182409514e10cdd3e66a936e0ce57349df8eddf bf05bcbabc31dc7627bccd33535c5bcc6be2498e
+f47ffce6447e860dd48eefbbd7aacc7aca083eefbf2df94f9b96113c58c08206 ed8ab62f1be3062011dbb3c6033952e4657abd94
+f54e47e3fb25c0fdedf1a58eae2aafa499f95c821b702623778455cbe8cba53b 2e85427e16f2823de8324bb47d07f6f78a38746c
+f5656eab7d016da5fbe176ba06fd46f809e8f3163fc143887055f4dadfd829a2 86726c5a8c1200f732412fd3ec7601f3d2100801
+f5a821e9f70620ad45e86113ee0ee42211caedeb0db3ff3088500dda553c046f 00a27258320f37a893d4c8e52a991997706c730c
+f5be968ddbfc5aba6d676304dd513eaf8b5fb877235c1d5b8c76e8a93f24bd0c 5fcb851f4bbff2968e56b9792ce8310a2eb50002
+f5bf0317f8e2f3280613bd0f1574b5d9f2f0760b0335091ed3fabcab327af221 1fd9c75f95b22df3f52a0891dd36d3c18e9fc0d2
+f5c6feab3b2b51d205f6bc4b3d8fa2a8307ea5f61031b711204778104bfdcb4a 61bfa90a8f4300c31966e3309cd2461507b02264
+f5ef3ebcfc8f054e80fd190746057638615b9479d3917b594e00838ae2b69890 7b7d17f9b6bcb21de339efa2e1ffdef5f15cc5d3
+f5f86c720ab7d820ae97ab3ee2efb1009109a3a54dafb4e986b4f810b7016d21 8c7833b361ef6a4c68d72865bbf312fc3d806ce1
+f63c392c2e03143c9c3b37fdeea26691076a424f336b45bbafe3dcb4537ad29f 129156d84004e59c894c7e273ba9b5824bb9ea0f
+f63c4d6eb84809e54f87f531118170c28758305df7888104365e74742cdac390 2ee716e9a389bfbb76261371c1e65348ed1b9a38
+f64b9eec0c8df9ad7a5a2a50b9bbdb9f8da4b55c9f3176cde323aff07de313c8 e2b5e2857b75278155944594c2beee36079b6b1d
+f64f370eb4726c47b6c90efe54938119ebc024e49fe07e7eec0207b42827b98b e7ed799defef0499d47c8d8330955ab387ad8852
+f65ec16ed7554295cfdd98a0a5b67c1995c0b7b2a6778c8b36ea2e5b94cc5902 75f541f109d783d298a774cb9f6e1e7891965949
+f6633a3ba290c6e9f4b37ee0d3532e47cdf16cb2a43a7049ff3a3210044e3121 29c52c3a0cda152f11dd39d6217b46f6f246bb40
+f66691f32eb9b23a029b43251bfa994d16481fe97903057e121b76e4e78f6ff4 c01c3fae7251098d7af1b459bcd0786e81d4616d
+f66c29d989b01cf3feb6fb2bb7329f8acab284376c3b860f3d7e0fff904c4298 532a2f46e4a8ffc15bb5a13d9a02364197115d63
+f69bc64f14b90aa437c84a4b4d0e4ace3bb8c911a16ea8d77a6ed781c1956a02 9396ec28d49129250ff79463cf588e1a8512984f
+f69f3d4f7b8713dbb3e3adf1f64d6b8f88eadb77bf4f358fc28c32c756b5df9f d42c7e287c39463759ee11e4fe7bc9d722e487f6
+f705853cd543d8f69b6e57c3bd580ae4cd8b6ebcac63460fb322e0133cd0dfa9 406ee23fcb2900af9eaaff243f20ec9e07494920
+f718026e4badd0b9b38989a5538a627858e3319cd8b155925f00daff5768c138 7f73f247cd1be8def4d07063ddb72bbb2e6ade45
+f76f10b126720bb7d7577603fb3b54f0cf0ca722fdbc29c924379f4ccff97c14 09197a342b635784bfbaddcf6b8afc01d142f8f1
+f7c7c0e0d32eefee600c90a65bfca1564c643d30451276d3a4085930586db81d 8a086f872a3bb2cf8e437f0e374ea18e5cbaa899
+f7cbb8c92f729f08203f027870bcf2a1a71c94199408c3bc6bb7f06859212989 187613a431e241f9aff9884bfee28c3ca82ae1eb
+f7e772589bf8ab335ea3a7bb2c2d8158755e0b2bc08b34d80eaf50d070fe6607 083f644dce33ceb8318ab7f1fcae008d6bae2b7d
+f7ee8274a6a3963b96ba1b041f25ff1136cbb2ff07ffe04566f321f02f4099dc 2b8988ea7a90b45116bc4d4101fbdc678c48b410
+f7f06b26124f95366b331eea19be3182ff9dc0ea208ea1de2235e22249683a1e fafedcb78f9bf54e54f0a819ad1461c2ae3b4463
+f82729f2cc042ac51302f20404d9e218148448a3ed6d6c7936b063aa4532eb80 4d5b2a922151ea86d986e012971896622f5d3f77
+f88e32bdeb55ef0690249212cf64c42a4255101a95b74e3dbf78e6ba34f67def ac7c4c450b9a90d66957511688dcddcd011281fd
+f8b2eda314c8c39ac692033eade0bc766ca39c8e8c0a40fc0a25c67fcda825da 3a33c7b37f55d5bd30ff944625499e64919b9a9d
+f8b45f792840019909fd35f9dcb98082b3bc39373268d467e1b00f1da5ac71e5 cff54d138945ef4de384e9d2759291d0c13ea90a
+f8e91f003a1b5b5c5c842f5a27be8f5054c71bbd97ec516d0d8293f4eff40372 160148d67a3f12f0f393e23bc4b7e4e58c0eb921
+f92a00b48199229aedc6c30dc4157eb40b364efc1d843f91b67fe7113681ecb3 5130f2343aa863e7f17ddc0c65f71a993b061a07
+f979948512aa2fcdcad17b3fb76c3cbb196f28f88af5aecb1c29b2f2bbfa51a1 ca9840588d1718b996d4e0987b2caee0931e92f2
+f99100a033a521b0bb725db49ff10e6f27bf21ee6a18c3bfdfce294a3c70eb93 d4043ee9d97031e94f205110996d2381dd26c540
+f9bc81246e5d5f703bc5cfcf7dc637f1ac952dfbb4ece2f84d68d84e1bef99ff 713417dfe4608035e6615918b57a6edd78a3955f
+f9e46cd8f3f9eba5b9530820893f31ec9b135df075cde7e1331ec1834616a405 29a61a7f86f3703914b82d1d06b1c6e2775c684d
+fa2a467607e74eeb7d2865994f8a105837ad47c7f34d930a219544a187899dae 4428dfb78da0d5cb229763c8ff3278f6f4ee5bfc
+fa2ded3190944dfaf1a56eee66b9e298edc098aa834ed57952f04771f7ad5f45 de141d4bb983dad861835e181e7ecd5692a58aba
+fa50bed23c21de9e38ae6492dda179c028b9b618cfffec62311cd8e52bd90a12 d0f0c327029d770d1b10efc7a6c93080ed7d6844
+fa6a2b7e588e57115d2772c0d5250d886757404fc510a5956be8de4926e94c01 4f1355c91100d12f9e7202f91b245df0c110867c
+fa9b280330449aaf7fbd9709144d458cd54593a29045c6562a840a8580a80554 8cc293419bf3b5eaf51c8a90f3a1a86c2b415121
+faa7ca59426e17f6b34fa407d06cd634faaabeb4abe26df12296e05a17c98eef bfe05675d4e8f6b59d50932add8790f1a06b10ee
+fafc05a1d0b7614ba32f428eb52f3439ffbfed9a817e5ae069364cfc3fa3e4d4 fe1ca6bd22b5d8353ce6c2f3aba80805c438a7a5
+fb21dc7e0744c92621f4d94df822be5c275d509431d647c5e1cdd0cee85a57ad 2e7e8953cd4d7bd21729b29e1f7eae3ccf941b20
+fb56a4825bdf67a9ccfaf2d3962c16c49294fb565743f8ef3b3adf6ff721e729 47c31f584e09d79f3674987582a60c7bb6b673c0
+fb74b8e06683d2154d9ca50317e5e3581e1d0dea24229d4aad83ff0296e384bb 44bc212b00ca8cbdcc2751bd48534ee274318445
+fb93630decf348bd577c39423a6905f7f119e371eb098d0199e888fbee4154fe 0be51ee21b376c8848207ef5608aa7b3798d5020
+fbb6481c1ce45e504fe1233d0aaf228384b9739908d69d753da9fa7baffdb64a bc5aba43f785c144c9b5c6406ffbce6a7fec5304
+fbc60a067b3286e1547e78c5d195099580125b2b80e8e44716a313a4ebb66e6f 7a3b12fc4fb66960d4660e3e24af873bc07ac932
+fbc712543e696976405b7a070164abf6ac7f379b66f74dc2538563d4380a2004 7a6cf8153799563464d6f1761e55352c327b4122
+fc2157d0df676f018ad7a001a8150b8c5cae4313e50a69021f90cc82d8c0366d f9e43c1b9b200572edf0dbf333184151db14b711
+fc36ce993654a9c2f2ba5944b90d9fbb8b52bf3e45da4efcff1b137812573e63 8ba79944d51268d80b65372d508cf4d0ba239a4d
+fc7d032290d1d7af6b021e29f190d7a534aa3a31ecd9fd72e4a246ba7dc13e96 edc21d065b345f6af9ab4c3f07acc3f137436b27
+fc899c4e3fd5e61b944f9a9d4bc143888a80f4a11836024d441d0fef00cd355d 75636f4771c5ccf864814b83431ab7cebb091506
+fcc409c956764fbd4904916ec1a1dfb00ad9492ad11aa85fc272b94ff2412517 427c5e85811a8c7062c2c4621342e4e9c445817d
+fcfa61e2c38f220b1cf11a62ae7f6120b699c6f4fcdc0b0e02d31cfc2f1550f4 661900993cf98d9854e4d9c8584ae215e1eba148
+fd21b90bdf88489115886ad6a66f842e4b3b99f2c47c74f107a3012206a0975d dd583895e15b6ddbcca3ee7e8a1f7d8b39c25d1e
+fd6ab50ef7201a166b711edd386b9649ea052562bbab8a09ae5714f5f9c5a24d c215be4120385fc5f358e8a0609c94f6998184e7
+fd77de19e02087045739e074b6368724fd41d66a3e196b96c4092efc76b9a325 f83b69a6538188e9dad0b6dc09e5476bf36c9a1e
+fdf50c9b7119e7018b4a2f5c3235802104674e7d467f86608c7fee73c22321df b2bc567f25e3e07d0d6d55fab16f33423d863107
+fdf78aeb5b52940bbb069a7e2ae5495b1e77fcf4f9bb699bbe2b8372526bd3b3 b31b32f52231610f4e8c2c98e1ba5834b323555d
+fe191677f9b0be2d6232dffe0d8cf68edec0106e1c57efb1f084205ab56389b4 88bb8fe275f64c587e9d2f960cffa059d2b76fb7
+fe20b68ee605e6b7aeed310d188b6b597f7c184dc10166f645a683d77bdcfd7a 03770969aa16f40d4192c733408f152fc17b1f19
+fe9a766dd36f1a877fcec8eedede85556ff031d42678699c5350ee9117498a28 339a0ed36a822ace408b5084f8e3bc3e63b868aa
+fea0d6a630e0c517db1c57ab26a4229f48ac0cb61563777509633198bb60eadf a5274d8192aca15b24b1c7ddcba42726f5418ea4
+feae789c354caab8c9f38b38e18c04c41d7381d402eab1ca87befdeb5fa62539 65654b679591001c402b3925a31ea80f9e083969
+fec50a36447cf7f413ee48757b0f3d80322f3939d984556bda46600139cb5a89 0234c186bacb5144ca13f69f0dc9bfcc8ec7a075
+ff04d2f2105e9fc8f103e4b5840b46b3914a317e9c53cf523be81ca59cb5f023 6d34f01ce0ab2a3a198bd43ec250a5062d8e1217
+ff14a5e654a9963042a8183b2c7c356bb52440bc05f62ec193ba77a94c1f5290 bed3229b555ecd18bc7824c3ead7d2372b5f4f5a
+ff1854a73752a8779bf1d78e840d85b7e406fcc16a4cb7d1bb6a35bc60da49bb a52aa75b56d579790985af4ade1e73437d50b414
+ff3f1e98e17179dc0503307f2a01732096ea309288c2ceddcf71dbcce290691a fe9d965dc040c687edc1acefeb5a7919b14c6340
+ff503ebb130051b71bc883c83861389f4f4a66ebcfd5c05d5b2a7b805e45e773 143b052f17fbb3ac1310ecdb2bce4a10b9d2821e
+ff77a7e762c77408890442669da2a3a6ae2d0f130e8b953ce85edd0b81cb6f5e f7cce7c2d30260da7e0cc04e14ec618b832ce327
+ff77d10d1335090c32371bfb5179f915266de4425afaf4387dfca0bf2f6f98a2 86ff216d8fe665daecde956b38de7ec33b074477
+ffbbfce866283c7571b728f367b998d05b3767cb26600953db1b237b442fc0bd 16a67770b7d8d72317c4b775213c23a8bd74f5e0
+fff5cbc10ffea865d69aba64082ae17479c522e8e0305e678469749282bf0a18 afadc73a392f8cc8e2cc77dd62a7433dd3bafa8c
diff --git a/tests/resources/testrepo_256.git/objects/00/404e6179d86039bbc01a925bdc34ccdab778bd1d824f5562aaa319c6c8f045 b/tests/resources/testrepo_256.git/objects/00/404e6179d86039bbc01a925bdc34ccdab778bd1d824f5562aaa319c6c8f045
new file mode 100644
index 000000000..8d8d1d8e8
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/00/404e6179d86039bbc01a925bdc34ccdab778bd1d824f5562aaa319c6c8f045
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/01/18010feb81fe41b9df646d13866742a9070b56fd0ba9ab8dff828fc36c1f78 b/tests/resources/testrepo_256.git/objects/01/18010feb81fe41b9df646d13866742a9070b56fd0ba9ab8dff828fc36c1f78
new file mode 100644
index 000000000..c7fbd7e9e
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/01/18010feb81fe41b9df646d13866742a9070b56fd0ba9ab8dff828fc36c1f78
@@ -0,0 +1 @@
+x[NÅ0 ùî*üt•8§B°”Øq ¢iPš»º~GgŽ42zo œ±/kªÂ^rfK‚¡FO%BI"NªÉdwVe¡b8º”vb‘·ß<õ\°LçB6Ýk< ÅUtœÅ–¢%¦ÄÈÅYÿ#SµÔCè·ü\ßcÂù<Ž5~ô„7í:›<ªÎž¯¯žÛñÑßÁ:›n3&‚WƒÆl7½£–þSß>Kkt…Ú½ kÀõäҦʳéµý÷_‘ \ No newline at end of file
diff --git a/tests/resources/testrepo_256.git/objects/02/df938cfb169b0b6ba0dd16acdd727ea9364f7d48c55afed2f7dd889804065b b/tests/resources/testrepo_256.git/objects/02/df938cfb169b0b6ba0dd16acdd727ea9364f7d48c55afed2f7dd889804065b
new file mode 100644
index 000000000..cdfafaca7
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/02/df938cfb169b0b6ba0dd16acdd727ea9364f7d48c55afed2f7dd889804065b
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/05/f7b70a01b0ade8afa5a5fcd19f12cc38faf337d10ec03ef4363d1a86f63750 b/tests/resources/testrepo_256.git/objects/05/f7b70a01b0ade8afa5a5fcd19f12cc38faf337d10ec03ef4363d1a86f63750
new file mode 100644
index 000000000..b135eccda
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/05/f7b70a01b0ade8afa5a5fcd19f12cc38faf337d10ec03ef4363d1a86f63750
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/14/bd335f9d7188c778d44eba8801fe9bda46b66593291f5b9f7cd5f8888af12f b/tests/resources/testrepo_256.git/objects/14/bd335f9d7188c778d44eba8801fe9bda46b66593291f5b9f7cd5f8888af12f
new file mode 100644
index 000000000..58b2d0932
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/14/bd335f9d7188c778d44eba8801fe9bda46b66593291f5b9f7cd5f8888af12f
@@ -0,0 +1 @@
+x ̱ƒ0 ÐÔžÂ#ÈB k„¾¹ä‘ j²}(^ûrÝ«Ùãô¶¬²„i3ÏÃg¾’õ _ÜœÝ8H§Ö¡N] “Š”ü}P·ó8žYò®o;¾o\Wùw×  \ No newline at end of file
diff --git a/tests/resources/testrepo_256.git/objects/17/9496410f66032c03bd2b7e8ddfc9c8c47820fab5615cc04d904989ce800498 b/tests/resources/testrepo_256.git/objects/17/9496410f66032c03bd2b7e8ddfc9c8c47820fab5615cc04d904989ce800498
new file mode 100644
index 000000000..97157644b
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/17/9496410f66032c03bd2b7e8ddfc9c8c47820fab5615cc04d904989ce800498
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/19/0a1349522cc11f8682e34acca4ce4e1ea8508dfd77c24cefd461b65cead09e b/tests/resources/testrepo_256.git/objects/19/0a1349522cc11f8682e34acca4ce4e1ea8508dfd77c24cefd461b65cead09e
new file mode 100644
index 000000000..554d191b3
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/19/0a1349522cc11f8682e34acca4ce4e1ea8508dfd77c24cefd461b65cead09e
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/1b/4b74772bd83ff28bf44cda9be93f4afc2279623bb5b36c9194a660b7623c24 b/tests/resources/testrepo_256.git/objects/1b/4b74772bd83ff28bf44cda9be93f4afc2279623bb5b36c9194a660b7623c24
new file mode 100644
index 000000000..d5c518ecc
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/1b/4b74772bd83ff28bf44cda9be93f4afc2279623bb5b36c9194a660b7623c24
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/21/e1e1ebe45b2c1ef79ab050334e36a8015a546f0740bea4505e10d81a946f61 b/tests/resources/testrepo_256.git/objects/21/e1e1ebe45b2c1ef79ab050334e36a8015a546f0740bea4505e10d81a946f61
new file mode 100644
index 000000000..31aa9e5f5
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/21/e1e1ebe45b2c1ef79ab050334e36a8015a546f0740bea4505e10d81a946f61
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/23/8a501cf11a036f2f248008d88e14af624bb07fced6390997a0fa6abdad950a b/tests/resources/testrepo_256.git/objects/23/8a501cf11a036f2f248008d88e14af624bb07fced6390997a0fa6abdad950a
new file mode 100644
index 000000000..66dc15db4
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/23/8a501cf11a036f2f248008d88e14af624bb07fced6390997a0fa6abdad950a
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/26/149bf1ac4612f24b532ae50a12b15f26aace3718749624f008bde68670352a b/tests/resources/testrepo_256.git/objects/26/149bf1ac4612f24b532ae50a12b15f26aace3718749624f008bde68670352a
new file mode 100644
index 000000000..bee6a42d7
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/26/149bf1ac4612f24b532ae50a12b15f26aace3718749624f008bde68670352a
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/2d/b6069c27ca4c08b784048644c307e17d0afe29b55f6488398cb59f13feb2f2 b/tests/resources/testrepo_256.git/objects/2d/b6069c27ca4c08b784048644c307e17d0afe29b55f6488398cb59f13feb2f2
new file mode 100644
index 000000000..3dfd5463b
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/2d/b6069c27ca4c08b784048644c307e17d0afe29b55f6488398cb59f13feb2f2
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/33/e415b835a670bb5c3c760efa0433ac0cbd2d44679f68f2df3a9ae7014cf2a8 b/tests/resources/testrepo_256.git/objects/33/e415b835a670bb5c3c760efa0433ac0cbd2d44679f68f2df3a9ae7014cf2a8
new file mode 100644
index 000000000..cedb2a22e
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/33/e415b835a670bb5c3c760efa0433ac0cbd2d44679f68f2df3a9ae7014cf2a8
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/34/f79ad1c813b93d2ee11c830c2134815a31d9629e6aa9773338fedaab90976b b/tests/resources/testrepo_256.git/objects/34/f79ad1c813b93d2ee11c830c2134815a31d9629e6aa9773338fedaab90976b
new file mode 100644
index 000000000..3abc52f41
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/34/f79ad1c813b93d2ee11c830c2134815a31d9629e6aa9773338fedaab90976b
@@ -0,0 +1 @@
+xÌM‚0†a×=Å\@3ÃôcŒWнi;-`, ooq÷~‹ï)¾²æ°„WŠ$EŸ3£¡Î¶B™}#) ‹ö-Æ$È„dŒI”¥íˆ­±±9ÑY•ï;A\¦i,ªT{ð«<kì£O+ÜÒ ÷²ú-À9|þqíÇ2láT_ fëlƒ®…#:D¥UYfØÁm4 \ No newline at end of file
diff --git a/tests/resources/testrepo_256.git/objects/36/eac24505d4c4405864ccf2f30d79af178374166daeceefbf11e2f058d30d60 b/tests/resources/testrepo_256.git/objects/36/eac24505d4c4405864ccf2f30d79af178374166daeceefbf11e2f058d30d60
new file mode 100644
index 000000000..df40d99af
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/36/eac24505d4c4405864ccf2f30d79af178374166daeceefbf11e2f058d30d60
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/39/bf1ac28cc3f8432ba7cfeeca6bfffd9a0fe641784db85de2eb0f57b7553869 b/tests/resources/testrepo_256.git/objects/39/bf1ac28cc3f8432ba7cfeeca6bfffd9a0fe641784db85de2eb0f57b7553869
new file mode 100644
index 000000000..c05cacfed
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/39/bf1ac28cc3f8432ba7cfeeca6bfffd9a0fe641784db85de2eb0f57b7553869
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/3b/58565ee067f13349cd4f89aa396d10f71c69e168d5c48ea23de59734ec3ab1 b/tests/resources/testrepo_256.git/objects/3b/58565ee067f13349cd4f89aa396d10f71c69e168d5c48ea23de59734ec3ab1
new file mode 100644
index 000000000..1b299dc25
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/3b/58565ee067f13349cd4f89aa396d10f71c69e168d5c48ea23de59734ec3ab1
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/43/e084a4599ca42c476919917e3db8fde0045ee66305fd5e634b0c793c536a1b b/tests/resources/testrepo_256.git/objects/43/e084a4599ca42c476919917e3db8fde0045ee66305fd5e634b0c793c536a1b
new file mode 100644
index 000000000..2acf1b607
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/43/e084a4599ca42c476919917e3db8fde0045ee66305fd5e634b0c793c536a1b
@@ -0,0 +1 @@
+xQj!Dóí)ú ÚÚ¶Â{„œ m53Y—‰¹ÿÊæù((ªx¥ã8ö Èô2ÏÖ€} Ýë’KØ¢¦ZQs’VP99GɧƑ} Å#yËÊ.&ê¥S‰æ.g»MЂ‹guÔë“ÆHZ#ºN‚˜´x_5—1'«0jÏRPÂêr·F~ç6NøÔ1'\7ÑqƒË>ÍÇ×!û÷›Žãr`t¼Z¶Ö¬t=ší?¬˜Û~Vø1ÅfT \ No newline at end of file
diff --git a/tests/resources/testrepo_256.git/objects/47/3a0f4c3be8a93681a267e3b1e9a7dcda1185436fe141f7749120a303721813 b/tests/resources/testrepo_256.git/objects/47/3a0f4c3be8a93681a267e3b1e9a7dcda1185436fe141f7749120a303721813
new file mode 100644
index 000000000..711223894
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/47/3a0f4c3be8a93681a267e3b1e9a7dcda1185436fe141f7749120a303721813
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/4b/c142808884e472ee6cc331b132e66ef18f564d41efb055804ec1dd28efb3f5 b/tests/resources/testrepo_256.git/objects/4b/c142808884e472ee6cc331b132e66ef18f564d41efb055804ec1dd28efb3f5
new file mode 100644
index 000000000..d0d7e736e
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/4b/c142808884e472ee6cc331b132e66ef18f564d41efb055804ec1dd28efb3f5
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/4d/f8ed86acaac5dc82b5652170996ce459d39e3a441e9759b635b0bc4ecc43fd b/tests/resources/testrepo_256.git/objects/4d/f8ed86acaac5dc82b5652170996ce459d39e3a441e9759b635b0bc4ecc43fd
new file mode 100644
index 000000000..8dc193282
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/4d/f8ed86acaac5dc82b5652170996ce459d39e3a441e9759b635b0bc4ecc43fd
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/5a/2d5699fea33657b42ba98c22b7898baaa0eda205a21cafdcb7e0f94b07bb9b b/tests/resources/testrepo_256.git/objects/5a/2d5699fea33657b42ba98c22b7898baaa0eda205a21cafdcb7e0f94b07bb9b
new file mode 100644
index 000000000..dd9931316
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/5a/2d5699fea33657b42ba98c22b7898baaa0eda205a21cafdcb7e0f94b07bb9b
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/5c/a8959deb2b8327458e0344523eb1ddeeef4bce03e35864640b452f84d26848 b/tests/resources/testrepo_256.git/objects/5c/a8959deb2b8327458e0344523eb1ddeeef4bce03e35864640b452f84d26848
new file mode 100644
index 000000000..39e27c06a
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/5c/a8959deb2b8327458e0344523eb1ddeeef4bce03e35864640b452f84d26848
@@ -0,0 +1 @@
+x1N1E©÷îRÆöØKÑPÒqÏxœ”]£#®Spº¯'ý÷¥/}Û.ÃøäŸÆ¡j\å1‹KRP€8RDImªPšºÌ!´ˆD>“pÈÍú¦ìš[¾Ë¡û0µºàµ•¬›D ‚¸Œ‚hëSf !ƒ‹šÙÆ@©éµ-üyÀZ S>©¢å\çn¬ÖSŒ ]É€Cl¸äÂT[#GM|Û-å>Ö~˜úSŽj¾Ö¾Ýún^uÒGz?_ÆzçéÛ›±.y—,b0ÏS ˤó¡ÿí/ŸzœÕðQvYÍévçÇÉ·“¹ì£›~­Ë/(jrS \ No newline at end of file
diff --git a/tests/resources/testrepo_256.git/objects/5d/bb1fff5c0094b31b25b4635ab9fbee66d65fe5dda47dd0ac5f01dd69a84c6f b/tests/resources/testrepo_256.git/objects/5d/bb1fff5c0094b31b25b4635ab9fbee66d65fe5dda47dd0ac5f01dd69a84c6f
new file mode 100644
index 000000000..17fae64f4
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/5d/bb1fff5c0094b31b25b4635ab9fbee66d65fe5dda47dd0ac5f01dd69a84c6f
@@ -0,0 +1,3 @@
+xuKj1D³žSô¤–Üê† !'H. OgÀ3
+²Œ¯9É6»¢¨÷ rݶµ2>õ¦
+d=‹Š²³³-bŒ5ì‹“dòÅ•Ä„¦Pî(DÁeŽÉ{Òé+6Ý;Ì>±‹4KÆĆ­¦rLfˆ &#9Á,ö¿Ýo}© >ríÞ–˜ë/×üNç-®—ç\·W°<[Çâá`‚1ÓhÇ£® ÞË=¶ŸKÝ®Z‡ñ‘Nçµ/·ôÇ{"‚ï?¥÷¼À¯ê®Ó7bÆW \ No newline at end of file
diff --git a/tests/resources/testrepo_256.git/objects/61/489e9e831f1d9001084d39b79f964c293db8620d679ea3596673c8a326446e b/tests/resources/testrepo_256.git/objects/61/489e9e831f1d9001084d39b79f964c293db8620d679ea3596673c8a326446e
new file mode 100644
index 000000000..0bece845b
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/61/489e9e831f1d9001084d39b79f964c293db8620d679ea3596673c8a326446e
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/6d/5fd291bb0f67444e99ab492f1bf1fcdf5dca09dab24cf331e05111b4cfc1a3 b/tests/resources/testrepo_256.git/objects/6d/5fd291bb0f67444e99ab492f1bf1fcdf5dca09dab24cf331e05111b4cfc1a3
new file mode 100644
index 000000000..112998d42
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/6d/5fd291bb0f67444e99ab492f1bf1fcdf5dca09dab24cf331e05111b4cfc1a3
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/70/30f925768d9beb65654ab8f436e3ca0a82b25eddefd237bf5a26a0441c2aa7 b/tests/resources/testrepo_256.git/objects/70/30f925768d9beb65654ab8f436e3ca0a82b25eddefd237bf5a26a0441c2aa7
new file mode 100644
index 000000000..860cad13c
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/70/30f925768d9beb65654ab8f436e3ca0a82b25eddefd237bf5a26a0441c2aa7
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/73/8ff86401dbc5af692c83e660a4d510603c3f36e782a1a32ebd0388db6411ed b/tests/resources/testrepo_256.git/objects/73/8ff86401dbc5af692c83e660a4d510603c3f36e782a1a32ebd0388db6411ed
new file mode 100644
index 000000000..4c973ea83
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/73/8ff86401dbc5af692c83e660a4d510603c3f36e782a1a32ebd0388db6411ed
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/73/b4f3c4f3182e6c8dd2c98aeb2c7811556538e7673e4b325307c71685fbf5b6 b/tests/resources/testrepo_256.git/objects/73/b4f3c4f3182e6c8dd2c98aeb2c7811556538e7673e4b325307c71685fbf5b6
new file mode 100644
index 000000000..67b84c462
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/73/b4f3c4f3182e6c8dd2c98aeb2c7811556538e7673e4b325307c71685fbf5b6
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/7e/4633ae1b0e83503dbea4417f9d5ccaf22b877c5a4522b6d1d2b16090ee2f6f b/tests/resources/testrepo_256.git/objects/7e/4633ae1b0e83503dbea4417f9d5ccaf22b877c5a4522b6d1d2b16090ee2f6f
new file mode 100644
index 000000000..993a62b16
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/7e/4633ae1b0e83503dbea4417f9d5ccaf22b877c5a4522b6d1d2b16090ee2f6f
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/7e/9424c06052ca33bfc599bccadee60065d8664a9af7648a1455100c4f772e1c b/tests/resources/testrepo_256.git/objects/7e/9424c06052ca33bfc599bccadee60065d8664a9af7648a1455100c4f772e1c
new file mode 100644
index 000000000..70bf64e16
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/7e/9424c06052ca33bfc599bccadee60065d8664a9af7648a1455100c4f772e1c
@@ -0,0 +1,2 @@
+xÏAj1 …á®çÚ‚-i,B(]µ(tiÙ2’™ ƒ=~]zƒnÿÅ÷xe_×¥Æù©f]òb¨µ…$Öa­9)yI Ù'ñ‚2i«èæYÉÇTU[f™îù°­ƒWVaÔ©5sùu,QãÜ
+¢¤€¤:„P’OœCp*£ä)?ú×~Àùó'x]6x˹\­^àÜöýžóz¿Ù©ìë<!űÆÏÎ;7:nuû70½oK_ò þ¤égƒV \ No newline at end of file
diff --git a/tests/resources/testrepo_256.git/objects/80/91b686de8bf697ef632dda9b3179f2419717275e3bfd2055b303489dbbfa47 b/tests/resources/testrepo_256.git/objects/80/91b686de8bf697ef632dda9b3179f2419717275e3bfd2055b303489dbbfa47
new file mode 100644
index 000000000..dec3810fa
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/80/91b686de8bf697ef632dda9b3179f2419717275e3bfd2055b303489dbbfa47
@@ -0,0 +1 @@
+x+)JMU01c040031QrutñueX·hîaÖ+|fºŸbìï½ eú¶±i=ãö^Í*×ÉÆGêOæ \ No newline at end of file
diff --git a/tests/resources/testrepo_256.git/objects/81/55958bbda08eed88c8ac908dc44452ed38911cffa54ccc06076f30a1ffb1bf b/tests/resources/testrepo_256.git/objects/81/55958bbda08eed88c8ac908dc44452ed38911cffa54ccc06076f30a1ffb1bf
new file mode 100644
index 000000000..e610e3be8
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/81/55958bbda08eed88c8ac908dc44452ed38911cffa54ccc06076f30a1ffb1bf
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/90/1505c3355518bee35475c5d3f23bac1dded688b2bd314cc32b7f157e100724 b/tests/resources/testrepo_256.git/objects/90/1505c3355518bee35475c5d3f23bac1dded688b2bd314cc32b7f157e100724
new file mode 100644
index 000000000..09d0abfa7
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/90/1505c3355518bee35475c5d3f23bac1dded688b2bd314cc32b7f157e100724
@@ -0,0 +1 @@
+xQJ1 „}î)z¥M›¦<‚'HÓÔýÁÝÊZïï¢7ðm˜ùf`tîû}y ú°N3?RÌÈ6§BŠY¹wÈJeH‰R(…LÐM¬•Ì‰±€û”ÓŽåµA#8z½€‚Ú ÄPµ¥ÔµæÈÀ5¨d(:XH¾2ÁÉ÷Úæéßt®å_7ÑyøÛ—þŠ—÷]îO:÷gr©röBp—{=ZöŸ®k§ºù¿ ?s?T¬U… \ No newline at end of file
diff --git a/tests/resources/testrepo_256.git/objects/93/1093620e5f050e2127fb0b96786ebaa9ee6535fb698ec01b5f7a800fa27cbe b/tests/resources/testrepo_256.git/objects/93/1093620e5f050e2127fb0b96786ebaa9ee6535fb698ec01b5f7a800fa27cbe
new file mode 100644
index 000000000..70431af81
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/93/1093620e5f050e2127fb0b96786ebaa9ee6535fb698ec01b5f7a800fa27cbe
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/94/ed253efa9e86fc636805c294c441d08b89b455903c0c14e9b16587fec081f5 b/tests/resources/testrepo_256.git/objects/94/ed253efa9e86fc636805c294c441d08b89b455903c0c14e9b16587fec081f5
new file mode 100644
index 000000000..41bcd18af
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/94/ed253efa9e86fc636805c294c441d08b89b455903c0c14e9b16587fec081f5
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/96/c18f0297e38d01f4b2dacddea4259aea6b2961eb0822bd2c0c3f6029030045 b/tests/resources/testrepo_256.git/objects/96/c18f0297e38d01f4b2dacddea4259aea6b2961eb0822bd2c0c3f6029030045
new file mode 100644
index 000000000..7ca4ceed5
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/96/c18f0297e38d01f4b2dacddea4259aea6b2961eb0822bd2c0c3f6029030045
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/9c/cfa556cd7f73b426a7bedb7fc3a850e94f8c5ac1d71b9afa365a89005aff54 b/tests/resources/testrepo_256.git/objects/9c/cfa556cd7f73b426a7bedb7fc3a850e94f8c5ac1d71b9afa365a89005aff54
new file mode 100644
index 000000000..6e585cdb2
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/9c/cfa556cd7f73b426a7bedb7fc3a850e94f8c5ac1d71b9afa365a89005aff54
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/9d/aab17c25f647d652c72c8cc3cf4602c270a369beebc7d0b67238897bbc426b b/tests/resources/testrepo_256.git/objects/9d/aab17c25f647d652c72c8cc3cf4602c270a369beebc7d0b67238897bbc426b
new file mode 100644
index 000000000..74b8385ed
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/9d/aab17c25f647d652c72c8cc3cf4602c270a369beebc7d0b67238897bbc426b
@@ -0,0 +1 @@
+x+)JMU0´°d040031Qrutñue0~"ºÃtYÁî›2¾_,Ækxö꺤ÏÏøtßjÖsFŸO+L €@!1‰A¹+@æ£s¾¾JÇ>‘õIÞêÏ]³äœ¾àWÖÞµS¹ Æ&%æ%għeæ¤ê•T”0L;ØÏ4ýq/ã—M·ÎÞ[¢:ëU¶fâk¥½:<ö šÌ ®Pmy©å`å¹ñ—&îæOwñ›¹ÚS_úãŸû±§8omòùlø PpËùƒ‹¨TO \ No newline at end of file
diff --git a/tests/resources/testrepo_256.git/objects/a4/813ef6708e6011e8187224297e83e4a285f58bf5eabb1db270351388603c95 b/tests/resources/testrepo_256.git/objects/a4/813ef6708e6011e8187224297e83e4a285f58bf5eabb1db270351388603c95
new file mode 100644
index 000000000..2419974cb
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/a4/813ef6708e6011e8187224297e83e4a285f58bf5eabb1db270351388603c95
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/ab/ee32b3339d1566d75613ea61f40c14bdfc5b101b60fde4f44b58dd06667640 b/tests/resources/testrepo_256.git/objects/ab/ee32b3339d1566d75613ea61f40c14bdfc5b101b60fde4f44b58dd06667640
new file mode 100644
index 000000000..b390250e3
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/ab/ee32b3339d1566d75613ea61f40c14bdfc5b101b60fde4f44b58dd06667640
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/ae/a29dc305d40e362df25c3fdeed5502fd56b182af01b7740d297a24459333c5 b/tests/resources/testrepo_256.git/objects/ae/a29dc305d40e362df25c3fdeed5502fd56b182af01b7740d297a24459333c5
new file mode 100644
index 000000000..18a7f61c2
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/ae/a29dc305d40e362df25c3fdeed5502fd56b182af01b7740d297a24459333c5
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/b1/95873b48c824d995c974a3497ade7f62d2cd818bf388775cfa721de4068ebd b/tests/resources/testrepo_256.git/objects/b1/95873b48c824d995c974a3497ade7f62d2cd818bf388775cfa721de4068ebd
new file mode 100644
index 000000000..d1c032fce
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/b1/95873b48c824d995c974a3497ade7f62d2cd818bf388775cfa721de4068ebd
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/b2/1c8c27a05a3f0bf9f0f44ebf05e11d9c591b04cfdaff7cc860310356d71827 b/tests/resources/testrepo_256.git/objects/b2/1c8c27a05a3f0bf9f0f44ebf05e11d9c591b04cfdaff7cc860310356d71827
new file mode 100644
index 000000000..c6da2ff7a
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/b2/1c8c27a05a3f0bf9f0f44ebf05e11d9c591b04cfdaff7cc860310356d71827
@@ -0,0 +1 @@
+xuQj1 DûíSè)²WëÕB)д°e%^¨×Åqèõë´ýÍß0Ì{0RKÙ:8vO½©‚å³µleåà–e1ršEO³LŽ0aò8?Ú™¯ÐtBŠäBÒàÉG'Q**MYÉŸ'áhY…íL¸õ\¼KíN9HÝáå*¿áx)aû|–Z^Áº…ØN¼pA4£º6xKß¡%øȵ\ï´ã=/[Ï·øÏ“÷¼zD7x¼‰-ì’áÏuWó¯W \ No newline at end of file
diff --git a/tests/resources/testrepo_256.git/objects/b6/1b940a8cd979a32e005682c5c09c22053675e2db24ea6b4b28cc75e9c10890 b/tests/resources/testrepo_256.git/objects/b6/1b940a8cd979a32e005682c5c09c22053675e2db24ea6b4b28cc75e9c10890
new file mode 100644
index 000000000..b1df3bdd5
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/b6/1b940a8cd979a32e005682c5c09c22053675e2db24ea6b4b28cc75e9c10890
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/b8/3624f6ac0995273c0034a7ab8c68929bdc91b69ad54ef94979b93eba3f6022 b/tests/resources/testrepo_256.git/objects/b8/3624f6ac0995273c0034a7ab8c68929bdc91b69ad54ef94979b93eba3f6022
new file mode 100644
index 000000000..3e36331ea
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/b8/3624f6ac0995273c0034a7ab8c68929bdc91b69ad54ef94979b93eba3f6022
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/bd/f2066a28e11603a1af04157ee4aad97814279fe500340eb3465797cbd3be23 b/tests/resources/testrepo_256.git/objects/bd/f2066a28e11603a1af04157ee4aad97814279fe500340eb3465797cbd3be23
new file mode 100644
index 000000000..9bb5b623b
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/bd/f2066a28e11603a1af04157ee4aad97814279fe500340eb3465797cbd3be23
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/bf/a3b3b9a161d354e2254a444b12c412210e9689c17e51bfc318ce4bb4360f19 b/tests/resources/testrepo_256.git/objects/bf/a3b3b9a161d354e2254a444b12c412210e9689c17e51bfc318ce4bb4360f19
new file mode 100644
index 000000000..3cbf7e6b7
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/bf/a3b3b9a161d354e2254a444b12c412210e9689c17e51bfc318ce4bb4360f19
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/bf/cc4074ac517ed24d61b0aaa96359f304c3dc97e95f336269ed474ea846ada5 b/tests/resources/testrepo_256.git/objects/bf/cc4074ac517ed24d61b0aaa96359f304c3dc97e95f336269ed474ea846ada5
new file mode 100644
index 000000000..be8b99bba
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/bf/cc4074ac517ed24d61b0aaa96359f304c3dc97e95f336269ed474ea846ada5
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/c2/58f010a08328a29cde33411d955520e0375fcbbcc14b7636a70f7536c32ef6 b/tests/resources/testrepo_256.git/objects/c2/58f010a08328a29cde33411d955520e0375fcbbcc14b7636a70f7536c32ef6
new file mode 100644
index 000000000..9d2ceb1ff
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/c2/58f010a08328a29cde33411d955520e0375fcbbcc14b7636a70f7536c32ef6
@@ -0,0 +1,2 @@
+xŒÁ‚0D=÷+önbvK[JbŒ?àÍxßÖ¥¢Öƒ/™I^æð” P»1=%+X’5IœO6“´uà =V•“*pDòì]h±v˜„G/„÷HÜ,o £¿€r1Ë@eÖŠLpë²
+ž´ƒ£ò0¾¾çÒs÷>ä±?ÙH¾ŽÎ!ìÑ"s}t3,åͳIÿmø3‘ \ No newline at end of file
diff --git a/tests/resources/testrepo_256.git/objects/ca/31f7336e882a233a2943787c5e94ba024ac9a4f763cb1d9bfd8e63aa7f7269 b/tests/resources/testrepo_256.git/objects/ca/31f7336e882a233a2943787c5e94ba024ac9a4f763cb1d9bfd8e63aa7f7269
new file mode 100644
index 000000000..cfcdac306
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/ca/31f7336e882a233a2943787c5e94ba024ac9a4f763cb1d9bfd8e63aa7f7269
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/cb/282e7c15fd8aeb2265cd621f5a228cb33dc84192980ca426cf9ab2a48cb9f0 b/tests/resources/testrepo_256.git/objects/cb/282e7c15fd8aeb2265cd621f5a228cb33dc84192980ca426cf9ab2a48cb9f0
new file mode 100644
index 000000000..77d9ec27d
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/cb/282e7c15fd8aeb2265cd621f5a228cb33dc84192980ca426cf9ab2a48cb9f0
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/cc/b5a03da85607c230d111abfa899655d1b00e6529101a40d42f6acb059dff9f b/tests/resources/testrepo_256.git/objects/cc/b5a03da85607c230d111abfa899655d1b00e6529101a40d42f6acb059dff9f
new file mode 100644
index 000000000..a67d6e647
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/cc/b5a03da85607c230d111abfa899655d1b00e6529101a40d42f6acb059dff9f
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/cf/84e5be57f8d5d51f136d3d137b654c602721c469c1b0a58e7e95647a9cf1c0 b/tests/resources/testrepo_256.git/objects/cf/84e5be57f8d5d51f136d3d137b654c602721c469c1b0a58e7e95647a9cf1c0
new file mode 100644
index 000000000..ec37060e3
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/cf/84e5be57f8d5d51f136d3d137b654c602721c469c1b0a58e7e95647a9cf1c0
@@ -0,0 +1,3 @@
+x•ŽA
+Â0E]ç³ëBÌ$© ˆx¯ ™dª…ÆHŒ ·7xWÞãÃ%祑޴*<Æ}À“qVˆœ ÖZFŠ‰P‹'q/yŽ§(–ÙšQÏèUxµ[©Ö%
+~8É;äÇ*»XòИ‰¼vä`«QkÕm¿Ð䯑:—&O)IþÀp]ÚåÞÝ%V M˜kÉ°.Ü©/××Eÿ \ No newline at end of file
diff --git a/tests/resources/testrepo_256.git/objects/d8/8b60d2641df3656381dc8e201abb820a414de03eb63c065b06a2ab37d3f5ca b/tests/resources/testrepo_256.git/objects/d8/8b60d2641df3656381dc8e201abb820a414de03eb63c065b06a2ab37d3f5ca
new file mode 100644
index 000000000..6845087e5
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/d8/8b60d2641df3656381dc8e201abb820a414de03eb63c065b06a2ab37d3f5ca
@@ -0,0 +1 @@
+x5ÌÁjÃ0 €áýêyP”ÈŽ(£ÐëÖW²#‡´q4Rõ°·_/=þ|ðÏÐôǦ›d"ñMH=î"¦2åØ¡FOÄsšÚÉû.¥ëK;â%bãsi¹wö÷+VMÎ^gÞ656™ÆW¦ã[fÙa{®«é]68I•}ÉÇ"{åÇy®¼¬Ç¬õ "Š}ð‰-¢sߪwøá\.Zëb÷Ø=B \ No newline at end of file
diff --git a/tests/resources/testrepo_256.git/objects/de/caff3051968d1f3a2defd3d4a80ced03101555e1fd8913b3544026c0717d4f b/tests/resources/testrepo_256.git/objects/de/caff3051968d1f3a2defd3d4a80ced03101555e1fd8913b3544026c0717d4f
new file mode 100644
index 000000000..a53ab84cf
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/de/caff3051968d1f3a2defd3d4a80ced03101555e1fd8913b3544026c0717d4f
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/eb/ead5965196dfaeab52b1a5d92b78e54493fdaa78f72268d4cc69b61d5feee1 b/tests/resources/testrepo_256.git/objects/eb/ead5965196dfaeab52b1a5d92b78e54493fdaa78f72268d4cc69b61d5feee1
new file mode 100644
index 000000000..225c45734
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/eb/ead5965196dfaeab52b1a5d92b78e54493fdaa78f72268d4cc69b61d5feee1
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/f2/a108f86a3b4fd9ad75ed55e9cb3cb46e348fca3b9dba3db64f7c9f64b8a736 b/tests/resources/testrepo_256.git/objects/f2/a108f86a3b4fd9ad75ed55e9cb3cb46e348fca3b9dba3db64f7c9f64b8a736
new file mode 100644
index 000000000..58d51e502
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/f2/a108f86a3b4fd9ad75ed55e9cb3cb46e348fca3b9dba3db64f7c9f64b8a736
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/f2/c8da1a7c2eb49ff25c47441f0b3f387faeddde1b37d0ad2f3f6a63f5327978 b/tests/resources/testrepo_256.git/objects/f2/c8da1a7c2eb49ff25c47441f0b3f387faeddde1b37d0ad2f3f6a63f5327978
new file mode 100644
index 000000000..04bf5eb06
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/f2/c8da1a7c2eb49ff25c47441f0b3f387faeddde1b37d0ad2f3f6a63f5327978
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/f3/1459efb9367c5a19c9dd24c75107423d5773066922ea5e55eaeb6490979562 b/tests/resources/testrepo_256.git/objects/f3/1459efb9367c5a19c9dd24c75107423d5773066922ea5e55eaeb6490979562
new file mode 100644
index 000000000..37a289ecc
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/f3/1459efb9367c5a19c9dd24c75107423d5773066922ea5e55eaeb6490979562
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/pack/pack-b87f1f214098b19ce092afb9ef6e7643653c03e7f91faa27b767e3eb8225f0f6.idx b/tests/resources/testrepo_256.git/objects/pack/pack-b87f1f214098b19ce092afb9ef6e7643653c03e7f91faa27b767e3eb8225f0f6.idx
new file mode 100644
index 000000000..897e8a478
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/pack/pack-b87f1f214098b19ce092afb9ef6e7643653c03e7f91faa27b767e3eb8225f0f6.idx
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/pack/pack-b87f1f214098b19ce092afb9ef6e7643653c03e7f91faa27b767e3eb8225f0f6.pack b/tests/resources/testrepo_256.git/objects/pack/pack-b87f1f214098b19ce092afb9ef6e7643653c03e7f91faa27b767e3eb8225f0f6.pack
new file mode 100644
index 000000000..9c8557886
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/pack/pack-b87f1f214098b19ce092afb9ef6e7643653c03e7f91faa27b767e3eb8225f0f6.pack
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/pack/pack-e2f07f30db7e480ea84a0e64ee791b9b270067124b2609019b74f33f256f33fa.idx b/tests/resources/testrepo_256.git/objects/pack/pack-e2f07f30db7e480ea84a0e64ee791b9b270067124b2609019b74f33f256f33fa.idx
new file mode 100644
index 000000000..9e2ec99c5
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/pack/pack-e2f07f30db7e480ea84a0e64ee791b9b270067124b2609019b74f33f256f33fa.idx
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/pack/pack-e2f07f30db7e480ea84a0e64ee791b9b270067124b2609019b74f33f256f33fa.pack b/tests/resources/testrepo_256.git/objects/pack/pack-e2f07f30db7e480ea84a0e64ee791b9b270067124b2609019b74f33f256f33fa.pack
new file mode 100644
index 000000000..66cd292a2
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/pack/pack-e2f07f30db7e480ea84a0e64ee791b9b270067124b2609019b74f33f256f33fa.pack
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/pack/pack-f72bbfa35af982c2a60735152c80b24ee981cf102db76764c383f9b87935d0d3.idx b/tests/resources/testrepo_256.git/objects/pack/pack-f72bbfa35af982c2a60735152c80b24ee981cf102db76764c383f9b87935d0d3.idx
new file mode 100644
index 000000000..1d197e870
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/pack/pack-f72bbfa35af982c2a60735152c80b24ee981cf102db76764c383f9b87935d0d3.idx
Binary files differ
diff --git a/tests/resources/testrepo_256.git/objects/pack/pack-f72bbfa35af982c2a60735152c80b24ee981cf102db76764c383f9b87935d0d3.pack b/tests/resources/testrepo_256.git/objects/pack/pack-f72bbfa35af982c2a60735152c80b24ee981cf102db76764c383f9b87935d0d3.pack
new file mode 100644
index 000000000..5b615e15c
--- /dev/null
+++ b/tests/resources/testrepo_256.git/objects/pack/pack-f72bbfa35af982c2a60735152c80b24ee981cf102db76764c383f9b87935d0d3.pack
Binary files differ
diff --git a/tests/resources/testrepo_256.git/packed-refs b/tests/resources/testrepo_256.git/packed-refs
new file mode 100644
index 000000000..995685f08
--- /dev/null
+++ b/tests/resources/testrepo_256.git/packed-refs
@@ -0,0 +1,3 @@
+# pack-refs with: peeled sorted
+66fe8385c6378bfa5ca5573bd0fdd773e4eadb0e86416b483f2c50c839859ecb refs/heads/packed
+cb282e7c15fd8aeb2265cd621f5a228cb33dc84192980ca426cf9ab2a48cb9f0 refs/heads/packed-test
diff --git a/tests/resources/testrepo_256.git/refs/blobs/annotated_tag_to_blob b/tests/resources/testrepo_256.git/refs/blobs/annotated_tag_to_blob
new file mode 100644
index 000000000..2723f8909
--- /dev/null
+++ b/tests/resources/testrepo_256.git/refs/blobs/annotated_tag_to_blob
@@ -0,0 +1 @@
+d88b60d2641df3656381dc8e201abb820a414de03eb63c065b06a2ab37d3f5ca
diff --git a/tests/resources/testrepo_256.git/refs/heads/br2 b/tests/resources/testrepo_256.git/refs/heads/br2
new file mode 100644
index 000000000..2abd96e09
--- /dev/null
+++ b/tests/resources/testrepo_256.git/refs/heads/br2
@@ -0,0 +1 @@
+a4813ef6708e6011e8187224297e83e4a285f58bf5eabb1db270351388603c95
diff --git a/tests/resources/testrepo_256.git/refs/heads/cannot-fetch b/tests/resources/testrepo_256.git/refs/heads/cannot-fetch
new file mode 100644
index 000000000..2abd96e09
--- /dev/null
+++ b/tests/resources/testrepo_256.git/refs/heads/cannot-fetch
@@ -0,0 +1 @@
+a4813ef6708e6011e8187224297e83e4a285f58bf5eabb1db270351388603c95
diff --git a/tests/resources/testrepo_256.git/refs/heads/chomped b/tests/resources/testrepo_256.git/refs/heads/chomped
new file mode 100644
index 000000000..de0d95305
--- /dev/null
+++ b/tests/resources/testrepo_256.git/refs/heads/chomped
@@ -0,0 +1 @@
+4d46d9719e425ef2dfb5bfba098d0b62e21b2b92d0731892eef70db0870e3744
diff --git a/tests/resources/testrepo_256.git/refs/heads/haacked b/tests/resources/testrepo_256.git/refs/heads/haacked
new file mode 100644
index 000000000..5feda4d41
--- /dev/null
+++ b/tests/resources/testrepo_256.git/refs/heads/haacked
@@ -0,0 +1 @@
+7e9424c06052ca33bfc599bccadee60065d8664a9af7648a1455100c4f772e1c
diff --git a/tests/resources/testrepo_256.git/refs/heads/master b/tests/resources/testrepo_256.git/refs/heads/master
new file mode 100644
index 000000000..106231c4c
--- /dev/null
+++ b/tests/resources/testrepo_256.git/refs/heads/master
@@ -0,0 +1 @@
+decaff3051968d1f3a2defd3d4a80ced03101555e1fd8913b3544026c0717d4f
diff --git a/tests/resources/testrepo_256.git/refs/heads/not-good b/tests/resources/testrepo_256.git/refs/heads/not-good
new file mode 100644
index 000000000..106231c4c
--- /dev/null
+++ b/tests/resources/testrepo_256.git/refs/heads/not-good
@@ -0,0 +1 @@
+decaff3051968d1f3a2defd3d4a80ced03101555e1fd8913b3544026c0717d4f
diff --git a/tests/resources/testrepo_256.git/refs/heads/packed-test b/tests/resources/testrepo_256.git/refs/heads/packed-test
new file mode 100644
index 000000000..7c2c5e438
--- /dev/null
+++ b/tests/resources/testrepo_256.git/refs/heads/packed-test
@@ -0,0 +1 @@
+43e084a4599ca42c476919917e3db8fde0045ee66305fd5e634b0c793c536a1b
diff --git a/tests/resources/testrepo_256.git/refs/heads/subtrees b/tests/resources/testrepo_256.git/refs/heads/subtrees
new file mode 100644
index 000000000..3b352e1ad
--- /dev/null
+++ b/tests/resources/testrepo_256.git/refs/heads/subtrees
@@ -0,0 +1 @@
+0118010feb81fe41b9df646d13866742a9070b56fd0ba9ab8dff828fc36c1f78
diff --git a/tests/resources/testrepo_256.git/refs/heads/test b/tests/resources/testrepo_256.git/refs/heads/test
new file mode 100644
index 000000000..de0d95305
--- /dev/null
+++ b/tests/resources/testrepo_256.git/refs/heads/test
@@ -0,0 +1 @@
+4d46d9719e425ef2dfb5bfba098d0b62e21b2b92d0731892eef70db0870e3744
diff --git a/tests/resources/testrepo_256.git/refs/heads/track-local b/tests/resources/testrepo_256.git/refs/heads/track-local
new file mode 100644
index 000000000..8f6ecbe2b
--- /dev/null
+++ b/tests/resources/testrepo_256.git/refs/heads/track-local
@@ -0,0 +1 @@
+b83624f6ac0995273c0034a7ab8c68929bdc91b69ad54ef94979b93eba3f6022
diff --git a/tests/resources/testrepo_256.git/refs/heads/trailing b/tests/resources/testrepo_256.git/refs/heads/trailing
new file mode 100644
index 000000000..de0d95305
--- /dev/null
+++ b/tests/resources/testrepo_256.git/refs/heads/trailing
@@ -0,0 +1 @@
+4d46d9719e425ef2dfb5bfba098d0b62e21b2b92d0731892eef70db0870e3744
diff --git a/tests/resources/testrepo_256.git/refs/heads/with-empty-log b/tests/resources/testrepo_256.git/refs/heads/with-empty-log
new file mode 100644
index 000000000..bd392a7d2
--- /dev/null
+++ b/tests/resources/testrepo_256.git/refs/heads/with-empty-log
@@ -0,0 +1 @@
+7e4633ae1b0e83503dbea4417f9d5ccaf22b877c5a4522b6d1d2b16090ee2f6f
diff --git a/tests/resources/testrepo_256.git/refs/notes/fanout b/tests/resources/testrepo_256.git/refs/notes/fanout
new file mode 100644
index 000000000..307abb49c
--- /dev/null
+++ b/tests/resources/testrepo_256.git/refs/notes/fanout
@@ -0,0 +1 @@
+cf84e5be57f8d5d51f136d3d137b654c602721c469c1b0a58e7e95647a9cf1c0
diff --git a/tests/resources/testrepo_256.git/refs/remotes/test/master b/tests/resources/testrepo_256.git/refs/remotes/test/master
new file mode 100644
index 000000000..ee4aa140b
--- /dev/null
+++ b/tests/resources/testrepo_256.git/refs/remotes/test/master
@@ -0,0 +1 @@
+1b4b74772bd83ff28bf44cda9be93f4afc2279623bb5b36c9194a660b7623c24
diff --git a/tests/resources/testrepo_256.git/refs/tags/annotated_tag_to_blob b/tests/resources/testrepo_256.git/refs/tags/annotated_tag_to_blob
new file mode 100644
index 000000000..2723f8909
--- /dev/null
+++ b/tests/resources/testrepo_256.git/refs/tags/annotated_tag_to_blob
@@ -0,0 +1 @@
+d88b60d2641df3656381dc8e201abb820a414de03eb63c065b06a2ab37d3f5ca
diff --git a/tests/resources/testrepo_256.git/refs/tags/e90810b b/tests/resources/testrepo_256.git/refs/tags/e90810b
new file mode 100644
index 000000000..eb8846a05
--- /dev/null
+++ b/tests/resources/testrepo_256.git/refs/tags/e90810b
@@ -0,0 +1 @@
+21e1e1ebe45b2c1ef79ab050334e36a8015a546f0740bea4505e10d81a946f61
diff --git a/tests/resources/testrepo_256.git/refs/tags/hard_tag b/tests/resources/testrepo_256.git/refs/tags/hard_tag
new file mode 100644
index 000000000..05dfe0615
--- /dev/null
+++ b/tests/resources/testrepo_256.git/refs/tags/hard_tag
@@ -0,0 +1 @@
+34f79ad1c813b93d2ee11c830c2134815a31d9629e6aa9773338fedaab90976b
diff --git a/tests/resources/testrepo_256.git/refs/tags/point_to_blob b/tests/resources/testrepo_256.git/refs/tags/point_to_blob
new file mode 100644
index 000000000..5efdc777d
--- /dev/null
+++ b/tests/resources/testrepo_256.git/refs/tags/point_to_blob
@@ -0,0 +1 @@
+33e415b835a670bb5c3c760efa0433ac0cbd2d44679f68f2df3a9ae7014cf2a8
diff --git a/tests/resources/testrepo_256.git/refs/tags/taggerless b/tests/resources/testrepo_256.git/refs/tags/taggerless
new file mode 100644
index 000000000..45547b7fa
--- /dev/null
+++ b/tests/resources/testrepo_256.git/refs/tags/taggerless
@@ -0,0 +1 @@
+14bd335f9d7188c778d44eba8801fe9bda46b66593291f5b9f7cd5f8888af12f
diff --git a/tests/resources/testrepo_256.git/refs/tags/test b/tests/resources/testrepo_256.git/refs/tags/test
new file mode 100644
index 000000000..a7d2fef64
--- /dev/null
+++ b/tests/resources/testrepo_256.git/refs/tags/test
@@ -0,0 +1 @@
+c258f010a08328a29cde33411d955520e0375fcbbcc14b7636a70f7536c32ef6
diff --git a/tests/resources/testrepo_256.git/refs/tags/wrapped_tag b/tests/resources/testrepo_256.git/refs/tags/wrapped_tag
new file mode 100644
index 000000000..05dfe0615
--- /dev/null
+++ b/tests/resources/testrepo_256.git/refs/tags/wrapped_tag
@@ -0,0 +1 @@
+34f79ad1c813b93d2ee11c830c2134815a31d9629e6aa9773338fedaab90976b
diff --git a/tests/util/path.c b/tests/util/path.c
index 2c39e0887..02ec42fce 100644
--- a/tests/util/path.c
+++ b/tests/util/path.c
@@ -2,6 +2,10 @@
#include "futils.h"
#include "fs_path.h"
+#ifndef GIT_WIN32
+# include <unistd.h>
+#endif
+
static char *path_save;
void test_path__initialize(void)
@@ -757,7 +761,7 @@ void test_path__validate_current_user_ownership(void)
cl_git_fail(git_fs_path_owner_is_current_user(&is_cur, "c:\\path\\does\\not\\exist"));
#else
cl_git_pass(git_fs_path_owner_is_current_user(&is_cur, "/"));
- cl_assert_equal_i(is_cur, 0);
+ cl_assert_equal_i(is_cur, (geteuid() == 0));
cl_git_fail(git_fs_path_owner_is_current_user(&is_cur, "/path/does/not/exist"));
#endif
diff --git a/tests/libgit2/network/url/joinpath.c b/tests/util/url/joinpath.c
index bf4557138..9fc02cde4 100644
--- a/tests/libgit2/network/url/joinpath.c
+++ b/tests/util/url/joinpath.c
@@ -4,19 +4,19 @@
static git_net_url source, target;
-void test_network_url_joinpath__initialize(void)
+void test_url_joinpath__initialize(void)
{
memset(&source, 0, sizeof(source));
memset(&target, 0, sizeof(target));
}
-void test_network_url_joinpath__cleanup(void)
+void test_url_joinpath__cleanup(void)
{
git_net_url_dispose(&source);
git_net_url_dispose(&target);
}
-void test_network_url_joinpath__target_paths_and_queries(void)
+void test_url_joinpath__target_paths_and_queries(void)
{
cl_git_pass(git_net_url_parse(&source, "http://example.com/a/b"));
@@ -31,7 +31,7 @@ void test_network_url_joinpath__target_paths_and_queries(void)
git_net_url_dispose(&target);
}
-void test_network_url_joinpath__source_query_removed(void)
+void test_url_joinpath__source_query_removed(void)
{
cl_git_pass(git_net_url_parse(&source, "http://example.com/a/b?query&one&two"));
@@ -46,7 +46,7 @@ void test_network_url_joinpath__source_query_removed(void)
git_net_url_dispose(&target);
}
-void test_network_url_joinpath__source_lacks_path(void)
+void test_url_joinpath__source_lacks_path(void)
{
cl_git_pass(git_net_url_parse(&source, "http://example.com"));
@@ -91,7 +91,7 @@ void test_network_url_joinpath__source_lacks_path(void)
git_net_url_dispose(&target);
}
-void test_network_url_joinpath__source_is_slash(void)
+void test_url_joinpath__source_is_slash(void)
{
cl_git_pass(git_net_url_parse(&source, "http://example.com/"));
@@ -137,7 +137,7 @@ void test_network_url_joinpath__source_is_slash(void)
}
-void test_network_url_joinpath__source_has_query(void)
+void test_url_joinpath__source_has_query(void)
{
cl_git_pass(git_net_url_parse(&source, "http://example.com?query"));
@@ -183,7 +183,7 @@ void test_network_url_joinpath__source_has_query(void)
}
-void test_network_url_joinpath__empty_query_ignored(void)
+void test_url_joinpath__empty_query_ignored(void)
{
cl_git_pass(git_net_url_parse(&source, "http://example.com/foo"));
diff --git a/tests/libgit2/network/url/parse.c b/tests/util/url/parse.c
index 8149ba52c..631d9b456 100644
--- a/tests/libgit2/network/url/parse.c
+++ b/tests/util/url/parse.c
@@ -3,19 +3,19 @@
static git_net_url conndata;
-void test_network_url_parse__initialize(void)
+void test_url_parse__initialize(void)
{
memset(&conndata, 0, sizeof(conndata));
}
-void test_network_url_parse__cleanup(void)
+void test_url_parse__cleanup(void)
{
git_net_url_dispose(&conndata);
}
/* Hostname */
-void test_network_url_parse__hostname_trivial(void)
+void test_url_parse__hostname_trivial(void)
{
cl_git_pass(git_net_url_parse(&conndata, "http://example.com/resource"));
cl_assert_equal_s(conndata.scheme, "http");
@@ -24,10 +24,12 @@ void test_network_url_parse__hostname_trivial(void)
cl_assert_equal_s(conndata.path, "/resource");
cl_assert_equal_p(conndata.username, NULL);
cl_assert_equal_p(conndata.password, NULL);
+ cl_assert_equal_p(conndata.query, NULL);
+ cl_assert_equal_p(conndata.fragment, NULL);
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_parse__hostname_root(void)
+void test_url_parse__hostname_root(void)
{
cl_git_pass(git_net_url_parse(&conndata, "http://example.com/"));
cl_assert_equal_s(conndata.scheme, "http");
@@ -36,10 +38,12 @@ void test_network_url_parse__hostname_root(void)
cl_assert_equal_s(conndata.path, "/");
cl_assert_equal_p(conndata.username, NULL);
cl_assert_equal_p(conndata.password, NULL);
+ cl_assert_equal_p(conndata.query, NULL);
+ cl_assert_equal_p(conndata.fragment, NULL);
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_parse__hostname_implied_root(void)
+void test_url_parse__hostname_implied_root(void)
{
cl_git_pass(git_net_url_parse(&conndata, "http://example.com"));
cl_assert_equal_s(conndata.scheme, "http");
@@ -48,10 +52,26 @@ void test_network_url_parse__hostname_implied_root(void)
cl_assert_equal_s(conndata.path, "/");
cl_assert_equal_p(conndata.username, NULL);
cl_assert_equal_p(conndata.password, NULL);
+ cl_assert_equal_p(conndata.query, NULL);
+ cl_assert_equal_p(conndata.fragment, NULL);
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_parse__hostname_implied_root_custom_port(void)
+void test_url_parse__hostname_numeric(void)
+{
+ cl_git_pass(git_net_url_parse(&conndata, "http://8888888/"));
+ cl_assert_equal_s(conndata.scheme, "http");
+ cl_assert_equal_s(conndata.host, "8888888");
+ cl_assert_equal_s(conndata.port, "80");
+ cl_assert_equal_s(conndata.path, "/");
+ cl_assert_equal_p(conndata.username, NULL);
+ cl_assert_equal_p(conndata.password, NULL);
+ cl_assert_equal_p(conndata.query, NULL);
+ cl_assert_equal_p(conndata.fragment, NULL);
+ cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
+}
+
+void test_url_parse__hostname_implied_root_custom_port(void)
{
cl_git_pass(git_net_url_parse(&conndata, "http://example.com:42"));
cl_assert_equal_s(conndata.scheme, "http");
@@ -60,10 +80,12 @@ void test_network_url_parse__hostname_implied_root_custom_port(void)
cl_assert_equal_s(conndata.path, "/");
cl_assert_equal_p(conndata.username, NULL);
cl_assert_equal_p(conndata.password, NULL);
+ cl_assert_equal_p(conndata.query, NULL);
+ cl_assert_equal_p(conndata.fragment, NULL);
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
}
-void test_network_url_parse__hostname_implied_root_empty_port(void)
+void test_url_parse__hostname_implied_root_empty_port(void)
{
cl_git_pass(git_net_url_parse(&conndata, "http://example.com:"));
cl_assert_equal_s(conndata.scheme, "http");
@@ -72,10 +94,12 @@ void test_network_url_parse__hostname_implied_root_empty_port(void)
cl_assert_equal_s(conndata.path, "/");
cl_assert_equal_p(conndata.username, NULL);
cl_assert_equal_p(conndata.password, NULL);
+ cl_assert_equal_p(conndata.query, NULL);
+ cl_assert_equal_p(conndata.fragment, NULL);
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_parse__hostname_encoded_password(void)
+void test_url_parse__hostname_encoded_password(void)
{
cl_git_pass(git_net_url_parse(&conndata,
"https://user:pass%2fis%40bad@hostname.com:1234/"));
@@ -85,10 +109,12 @@ void test_network_url_parse__hostname_encoded_password(void)
cl_assert_equal_s(conndata.path, "/");
cl_assert_equal_s(conndata.username, "user");
cl_assert_equal_s(conndata.password, "pass/is@bad");
+ cl_assert_equal_p(conndata.query, NULL);
+ cl_assert_equal_p(conndata.fragment, NULL);
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
}
-void test_network_url_parse__hostname_user(void)
+void test_url_parse__hostname_user(void)
{
cl_git_pass(git_net_url_parse(&conndata,
"https://user@example.com/resource"));
@@ -98,10 +124,12 @@ void test_network_url_parse__hostname_user(void)
cl_assert_equal_s(conndata.path, "/resource");
cl_assert_equal_s(conndata.username, "user");
cl_assert_equal_p(conndata.password, NULL);
+ cl_assert_equal_p(conndata.query, NULL);
+ cl_assert_equal_p(conndata.fragment, NULL);
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_parse__hostname_user_pass(void)
+void test_url_parse__hostname_user_pass(void)
{
/* user:pass@hostname.tld/resource */
cl_git_pass(git_net_url_parse(&conndata,
@@ -112,10 +140,12 @@ void test_network_url_parse__hostname_user_pass(void)
cl_assert_equal_s(conndata.path, "/resource");
cl_assert_equal_s(conndata.username, "user");
cl_assert_equal_s(conndata.password, "pass");
+ cl_assert_equal_p(conndata.query, NULL);
+ cl_assert_equal_p(conndata.fragment, NULL);
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_parse__hostname_port(void)
+void test_url_parse__hostname_port(void)
{
/* hostname.tld:port/resource */
cl_git_pass(git_net_url_parse(&conndata,
@@ -126,10 +156,12 @@ void test_network_url_parse__hostname_port(void)
cl_assert_equal_s(conndata.path, "/resource");
cl_assert_equal_p(conndata.username, NULL);
cl_assert_equal_p(conndata.password, NULL);
+ cl_assert_equal_p(conndata.query, NULL);
+ cl_assert_equal_p(conndata.fragment, NULL);
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
}
-void test_network_url_parse__hostname_empty_port(void)
+void test_url_parse__hostname_empty_port(void)
{
cl_git_pass(git_net_url_parse(&conndata, "http://example.com:/resource"));
cl_assert_equal_s(conndata.scheme, "http");
@@ -138,10 +170,12 @@ void test_network_url_parse__hostname_empty_port(void)
cl_assert_equal_s(conndata.path, "/resource");
cl_assert_equal_p(conndata.username, NULL);
cl_assert_equal_p(conndata.password, NULL);
+ cl_assert_equal_p(conndata.query, NULL);
+ cl_assert_equal_p(conndata.fragment, NULL);
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_parse__hostname_user_port(void)
+void test_url_parse__hostname_user_port(void)
{
/* user@hostname.tld:port/resource */
cl_git_pass(git_net_url_parse(&conndata,
@@ -152,10 +186,12 @@ void test_network_url_parse__hostname_user_port(void)
cl_assert_equal_s(conndata.path, "/resource");
cl_assert_equal_s(conndata.username, "user");
cl_assert_equal_p(conndata.password, NULL);
+ cl_assert_equal_p(conndata.query, NULL);
+ cl_assert_equal_p(conndata.fragment, NULL);
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
}
-void test_network_url_parse__hostname_user_pass_port(void)
+void test_url_parse__hostname_user_pass_port(void)
{
/* user:pass@hostname.tld:port/resource */
cl_git_pass(git_net_url_parse(&conndata,
@@ -166,12 +202,78 @@ void test_network_url_parse__hostname_user_pass_port(void)
cl_assert_equal_s(conndata.path, "/resource");
cl_assert_equal_s(conndata.username, "user");
cl_assert_equal_s(conndata.password, "pass");
+ cl_assert_equal_p(conndata.query, NULL);
+ cl_assert_equal_p(conndata.fragment, NULL);
+ cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
+}
+
+void test_url_parse__hostname_user_pass_port_query(void)
+{
+ /* user:pass@hostname.tld:port/resource */
+ cl_git_pass(git_net_url_parse(&conndata,
+ "https://user:pass@example.com:9191/resource?query=q&foo=bar&z=asdf"));
+ cl_assert_equal_s(conndata.scheme, "https");
+ cl_assert_equal_s(conndata.host, "example.com");
+ cl_assert_equal_s(conndata.port, "9191");
+ cl_assert_equal_s(conndata.path, "/resource");
+ cl_assert_equal_s(conndata.username, "user");
+ cl_assert_equal_s(conndata.password, "pass");
+ cl_assert_equal_s(conndata.query, "query=q&foo=bar&z=asdf");
+ cl_assert_equal_p(conndata.fragment, NULL);
+ cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
+}
+
+void test_url_parse__hostname_user_pass_port_fragment(void)
+{
+ /* user:pass@hostname.tld:port/resource */
+ cl_git_pass(git_net_url_parse(&conndata,
+ "https://user:pass@example.com:9191/resource#fragment"));
+ cl_assert_equal_s(conndata.scheme, "https");
+ cl_assert_equal_s(conndata.host, "example.com");
+ cl_assert_equal_s(conndata.port, "9191");
+ cl_assert_equal_s(conndata.path, "/resource");
+ cl_assert_equal_s(conndata.username, "user");
+ cl_assert_equal_s(conndata.password, "pass");
+ cl_assert_equal_p(conndata.query, NULL);
+ cl_assert_equal_s(conndata.fragment, "fragment");
+ cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
+}
+
+void test_url_parse__hostname_user_pass_port_query_fragment(void)
+{
+ /* user:pass@hostname.tld:port/resource */
+ cl_git_pass(git_net_url_parse(&conndata,
+ "https://user:pass@example.com:9191/resource?query=q&foo=bar&z=asdf#fragment"));
+ cl_assert_equal_s(conndata.scheme, "https");
+ cl_assert_equal_s(conndata.host, "example.com");
+ cl_assert_equal_s(conndata.port, "9191");
+ cl_assert_equal_s(conndata.path, "/resource");
+ cl_assert_equal_s(conndata.username, "user");
+ cl_assert_equal_s(conndata.password, "pass");
+ cl_assert_equal_s(conndata.query, "query=q&foo=bar&z=asdf");
+ cl_assert_equal_s(conndata.fragment, "fragment");
+ cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
+}
+
+void test_url_parse__fragment_with_question_mark(void)
+{
+ /* user:pass@hostname.tld:port/resource */
+ cl_git_pass(git_net_url_parse(&conndata,
+ "https://user:pass@example.com:9191/resource#fragment_with?question_mark"));
+ cl_assert_equal_s(conndata.scheme, "https");
+ cl_assert_equal_s(conndata.host, "example.com");
+ cl_assert_equal_s(conndata.port, "9191");
+ cl_assert_equal_s(conndata.path, "/resource");
+ cl_assert_equal_s(conndata.username, "user");
+ cl_assert_equal_s(conndata.password, "pass");
+ cl_assert_equal_p(conndata.query, NULL);
+ cl_assert_equal_s(conndata.fragment, "fragment_with?question_mark");
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
}
/* IPv4 addresses */
-void test_network_url_parse__ipv4_trivial(void)
+void test_url_parse__ipv4_trivial(void)
{
cl_git_pass(git_net_url_parse(&conndata, "http://192.168.1.1/resource"));
cl_assert_equal_s(conndata.scheme, "http");
@@ -183,7 +285,7 @@ void test_network_url_parse__ipv4_trivial(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_parse__ipv4_root(void)
+void test_url_parse__ipv4_root(void)
{
cl_git_pass(git_net_url_parse(&conndata, "http://192.168.1.1/"));
cl_assert_equal_s(conndata.scheme, "http");
@@ -195,7 +297,7 @@ void test_network_url_parse__ipv4_root(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_parse__ipv4_implied_root(void)
+void test_url_parse__ipv4_implied_root(void)
{
cl_git_pass(git_net_url_parse(&conndata, "http://192.168.1.1"));
cl_assert_equal_s(conndata.scheme, "http");
@@ -207,7 +309,7 @@ void test_network_url_parse__ipv4_implied_root(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_parse__ipv4_implied_root_custom_port(void)
+void test_url_parse__ipv4_implied_root_custom_port(void)
{
cl_git_pass(git_net_url_parse(&conndata, "http://192.168.1.1:42"));
cl_assert_equal_s(conndata.scheme, "http");
@@ -219,7 +321,7 @@ void test_network_url_parse__ipv4_implied_root_custom_port(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
}
-void test_network_url_parse__ipv4_implied_root_empty_port(void)
+void test_url_parse__ipv4_implied_root_empty_port(void)
{
cl_git_pass(git_net_url_parse(&conndata, "http://192.168.1.1:"));
cl_assert_equal_s(conndata.scheme, "http");
@@ -231,7 +333,7 @@ void test_network_url_parse__ipv4_implied_root_empty_port(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_parse__ipv4_encoded_password(void)
+void test_url_parse__ipv4_encoded_password(void)
{
cl_git_pass(git_net_url_parse(&conndata,
"https://user:pass%2fis%40bad@192.168.1.1:1234/"));
@@ -244,7 +346,7 @@ void test_network_url_parse__ipv4_encoded_password(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
}
-void test_network_url_parse__ipv4_user(void)
+void test_url_parse__ipv4_user(void)
{
cl_git_pass(git_net_url_parse(&conndata,
"https://user@192.168.1.1/resource"));
@@ -257,7 +359,7 @@ void test_network_url_parse__ipv4_user(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_parse__ipv4_user_pass(void)
+void test_url_parse__ipv4_user_pass(void)
{
cl_git_pass(git_net_url_parse(&conndata,
"https://user:pass@192.168.1.1/resource"));
@@ -270,7 +372,7 @@ void test_network_url_parse__ipv4_user_pass(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_parse__ipv4_port(void)
+void test_url_parse__ipv4_port(void)
{
cl_git_pass(git_net_url_parse(&conndata,
"https://192.168.1.1:9191/resource"));
@@ -283,7 +385,7 @@ void test_network_url_parse__ipv4_port(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
}
-void test_network_url_parse__ipv4_empty_port(void)
+void test_url_parse__ipv4_empty_port(void)
{
cl_git_pass(git_net_url_parse(&conndata, "http://192.168.1.1:/resource"));
cl_assert_equal_s(conndata.scheme, "http");
@@ -295,7 +397,7 @@ void test_network_url_parse__ipv4_empty_port(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_parse__ipv4_user_port(void)
+void test_url_parse__ipv4_user_port(void)
{
cl_git_pass(git_net_url_parse(&conndata,
"https://user@192.168.1.1:9191/resource"));
@@ -308,7 +410,7 @@ void test_network_url_parse__ipv4_user_port(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
}
-void test_network_url_parse__ipv4_user_pass_port(void)
+void test_url_parse__ipv4_user_pass_port(void)
{
cl_git_pass(git_net_url_parse(&conndata,
"https://user:pass@192.168.1.1:9191/resource"));
@@ -323,7 +425,7 @@ void test_network_url_parse__ipv4_user_pass_port(void)
/* IPv6 addresses */
-void test_network_url_parse__ipv6_trivial(void)
+void test_url_parse__ipv6_trivial(void)
{
cl_git_pass(git_net_url_parse(&conndata, "http://[fe80::dcad:beff:fe00:0001]/resource"));
cl_assert_equal_s(conndata.scheme, "http");
@@ -335,7 +437,7 @@ void test_network_url_parse__ipv6_trivial(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_parse__ipv6_root(void)
+void test_url_parse__ipv6_root(void)
{
cl_git_pass(git_net_url_parse(&conndata, "http://[fe80::dcad:beff:fe00:0001]/"));
cl_assert_equal_s(conndata.scheme, "http");
@@ -347,7 +449,7 @@ void test_network_url_parse__ipv6_root(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_parse__ipv6_implied_root(void)
+void test_url_parse__ipv6_implied_root(void)
{
cl_git_pass(git_net_url_parse(&conndata, "http://[fe80::dcad:beff:fe00:0001]"));
cl_assert_equal_s(conndata.scheme, "http");
@@ -359,7 +461,7 @@ void test_network_url_parse__ipv6_implied_root(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_parse__ipv6_implied_root_custom_port(void)
+void test_url_parse__ipv6_implied_root_custom_port(void)
{
cl_git_pass(git_net_url_parse(&conndata, "http://[fe80::dcad:beff:fe00:0001]:42"));
cl_assert_equal_s(conndata.scheme, "http");
@@ -371,7 +473,7 @@ void test_network_url_parse__ipv6_implied_root_custom_port(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
}
-void test_network_url_parse__ipv6_implied_root_empty_port(void)
+void test_url_parse__ipv6_implied_root_empty_port(void)
{
cl_git_pass(git_net_url_parse(&conndata, "http://[fe80::dcad:beff:fe00:0001]:"));
cl_assert_equal_s(conndata.scheme, "http");
@@ -383,7 +485,7 @@ void test_network_url_parse__ipv6_implied_root_empty_port(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_parse__ipv6_encoded_password(void)
+void test_url_parse__ipv6_encoded_password(void)
{
cl_git_pass(git_net_url_parse(&conndata,
"https://user:pass%2fis%40bad@[fe80::dcad:beff:fe00:0001]:1234/"));
@@ -396,7 +498,7 @@ void test_network_url_parse__ipv6_encoded_password(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
}
-void test_network_url_parse__ipv6_user(void)
+void test_url_parse__ipv6_user(void)
{
cl_git_pass(git_net_url_parse(&conndata,
"https://user@[fe80::dcad:beff:fe00:0001]/resource"));
@@ -409,7 +511,7 @@ void test_network_url_parse__ipv6_user(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_parse__ipv6_user_pass(void)
+void test_url_parse__ipv6_user_pass(void)
{
cl_git_pass(git_net_url_parse(&conndata,
"https://user:pass@[fe80::dcad:beff:fe00:0001]/resource"));
@@ -422,7 +524,7 @@ void test_network_url_parse__ipv6_user_pass(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_parse__ipv6_port(void)
+void test_url_parse__ipv6_port(void)
{
cl_git_pass(git_net_url_parse(&conndata,
"https://[fe80::dcad:beff:fe00:0001]:9191/resource"));
@@ -435,7 +537,7 @@ void test_network_url_parse__ipv6_port(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
}
-void test_network_url_parse__ipv6_empty_port(void)
+void test_url_parse__ipv6_empty_port(void)
{
cl_git_pass(git_net_url_parse(&conndata, "http://[fe80::dcad:beff:fe00:0001]:/resource"));
cl_assert_equal_s(conndata.scheme, "http");
@@ -447,7 +549,7 @@ void test_network_url_parse__ipv6_empty_port(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_parse__ipv6_user_port(void)
+void test_url_parse__ipv6_user_port(void)
{
cl_git_pass(git_net_url_parse(&conndata,
"https://user@[fe80::dcad:beff:fe00:0001]:9191/resource"));
@@ -460,7 +562,7 @@ void test_network_url_parse__ipv6_user_port(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
}
-void test_network_url_parse__ipv6_user_pass_port(void)
+void test_url_parse__ipv6_user_pass_port(void)
{
cl_git_pass(git_net_url_parse(&conndata,
"https://user:pass@[fe80::dcad:beff:fe00:0001]:9191/resource"));
@@ -473,7 +575,7 @@ void test_network_url_parse__ipv6_user_pass_port(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
}
-void test_network_url_parse__ipv6_invalid_addresses(void)
+void test_url_parse__ipv6_invalid_addresses(void)
{
/* Opening bracket missing */
cl_git_fail_with(GIT_EINVALIDSPEC, git_net_url_parse(&conndata,
@@ -526,6 +628,7 @@ void test_network_url_parse__ipv6_invalid_addresses(void)
"https://user@[fe80::dcad:beff:fe00:0001:9191/resource"));
cl_git_fail_with(GIT_EINVALIDSPEC, git_net_url_parse(&conndata,
"https://user:pass@[fe80::dcad:beff:fe00:0001:9191/resource"));
+
/* Both brackets missing */
cl_git_fail_with(GIT_EINVALIDSPEC, git_net_url_parse(&conndata,
"http://fe80::dcad:beff:fe00:0001/resource"));
@@ -554,4 +657,135 @@ void test_network_url_parse__ipv6_invalid_addresses(void)
/* Invalid character inside address */
cl_git_fail_with(GIT_EINVALIDSPEC, git_net_url_parse(&conndata, "http://[fe8o::dcad:beff:fe00:0001]/resource"));
+
+ /* Characters before/after braces */
+ cl_git_fail_with(GIT_EINVALIDSPEC, git_net_url_parse(&conndata,
+ "http://fe80::[dcad:beff:fe00:0001]/resource"));
+ cl_git_fail_with(GIT_EINVALIDSPEC, git_net_url_parse(&conndata,
+ "http://cafe[fe80::dcad:beff:fe00:0001]/resource"));
+ cl_git_fail_with(GIT_EINVALIDSPEC, git_net_url_parse(&conndata,
+ "http://[fe80::dcad:beff:fe00:0001]cafe/resource"));
+}
+
+/* Oddities */
+
+void test_url_parse__invalid_scheme_is_relative(void)
+{
+ cl_git_pass(git_net_url_parse(&conndata, "foo!bar://host:42/path/to/project?query_string=yes"));
+ cl_assert_equal_p(conndata.scheme, NULL);
+ cl_assert_equal_p(conndata.host, NULL);
+ cl_assert_equal_p(conndata.port, NULL);
+ cl_assert_equal_s(conndata.path, "foo!bar://host:42/path/to/project");
+ cl_assert_equal_p(conndata.username, NULL);
+ cl_assert_equal_p(conndata.password, NULL);
+ cl_assert_equal_s(conndata.query, "query_string=yes");
+ cl_assert_equal_p(conndata.fragment, NULL);
+ cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
+}
+
+void test_url_parse__scheme_case_is_normalized(void)
+{
+ cl_git_pass(git_net_url_parse(&conndata, "GIT+SSH://host:42/path/to/project"));
+ cl_assert_equal_s(conndata.scheme, "git+ssh");
+}
+
+void test_url_parse__nonhierarchical_scheme(void)
+{
+ cl_git_pass(git_net_url_parse(&conndata, "mailto:foobar@example.com"));
+ cl_assert_equal_s(conndata.scheme, "mailto");
+ cl_assert_equal_p(conndata.host, NULL);
+ cl_assert_equal_p(conndata.port, NULL);
+ cl_assert_equal_s(conndata.path, "foobar@example.com");
+ cl_assert_equal_p(conndata.username, NULL);
+ cl_assert_equal_p(conndata.password, NULL);
+ cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
+}
+
+void test_url_parse__no_scheme_relative_path(void)
+{
+ cl_git_pass(git_net_url_parse(&conndata, "path"));
+ cl_assert_equal_p(conndata.scheme, NULL);
+ cl_assert_equal_p(conndata.host, NULL);
+ cl_assert_equal_p(conndata.port, NULL);
+ cl_assert_equal_s(conndata.path, "path");
+ cl_assert_equal_p(conndata.username, NULL);
+ cl_assert_equal_p(conndata.password, NULL);
+ cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
+}
+
+void test_url_parse__no_scheme_absolute_path(void)
+{
+ cl_git_pass(git_net_url_parse(&conndata, "/path"));
+ cl_assert_equal_p(conndata.scheme, NULL);
+ cl_assert_equal_p(conndata.host, NULL);
+ cl_assert_equal_p(conndata.port, NULL);
+ cl_assert_equal_s(conndata.path, "/path");
+ cl_assert_equal_p(conndata.username, NULL);
+ cl_assert_equal_p(conndata.password, NULL);
+ cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
+}
+
+void test_url_parse__empty_path(void)
+{
+ cl_git_pass(git_net_url_parse(&conndata, "mailto:"));
+ cl_assert_equal_s(conndata.scheme, "mailto");
+ cl_assert_equal_p(conndata.host, NULL);
+ cl_assert_equal_p(conndata.port, NULL);
+ cl_assert_equal_s(conndata.path, NULL);
+ cl_assert_equal_p(conndata.username, NULL);
+ cl_assert_equal_p(conndata.password, NULL);
+ cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
+}
+
+void test_url_parse__empty_path_with_empty_authority(void)
+{
+ cl_git_pass(git_net_url_parse(&conndata, "http://"));
+ cl_assert_equal_s(conndata.scheme, "http");
+ cl_assert_equal_p(conndata.host, NULL);
+ cl_assert_equal_s(conndata.port, "80");
+ cl_assert_equal_s(conndata.path, "/");
+ cl_assert_equal_p(conndata.username, NULL);
+ cl_assert_equal_p(conndata.password, NULL);
+ cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
+}
+
+void test_url_parse__http_follows_the_rfc(void)
+{
+ cl_git_fail(git_net_url_parse(&conndata, "https://my.email.address@gmail.com@source.developers.google.com:4433/p/my-project/r/my-repository"));
+}
+
+void test_url_parse__ssh_from_terrible_google_rfc_violating_products(void)
+{
+ cl_git_pass(git_net_url_parse(&conndata, "ssh://my.email.address@gmail.com@source.developers.google.com:2022/p/my-project/r/my-repository"));
+ cl_assert_equal_s(conndata.scheme, "ssh");
+ cl_assert_equal_s(conndata.host, "source.developers.google.com");
+ cl_assert_equal_s(conndata.port, "2022");
+ cl_assert_equal_s(conndata.path, "/p/my-project/r/my-repository");
+ cl_assert_equal_s(conndata.username, "my.email.address@gmail.com");
+ cl_assert_equal_p(conndata.password, NULL);
+ cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
+}
+
+void test_url_parse__ssh_with_password_from_terrible_google_rfc_violating_products(void)
+{
+ cl_git_pass(git_net_url_parse(&conndata, "ssh://my.email.address@gmail.com:seekret@source.developers.google.com:2022/p/my-project/r/my-repository"));
+ cl_assert_equal_s(conndata.scheme, "ssh");
+ cl_assert_equal_s(conndata.host, "source.developers.google.com");
+ cl_assert_equal_s(conndata.port, "2022");
+ cl_assert_equal_s(conndata.path, "/p/my-project/r/my-repository");
+ cl_assert_equal_s(conndata.username, "my.email.address@gmail.com");
+ cl_assert_equal_s(conndata.password, "seekret");
+ cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
+}
+
+void test_url_parse__spaces_in_the_name(void)
+{
+ cl_git_pass(git_net_url_parse(&conndata, "https://libgit2@dev.azure.com/libgit2/test/_git/spaces%20in%20the%20name"));
+ cl_assert_equal_s(conndata.scheme, "https");
+ cl_assert_equal_s(conndata.host, "dev.azure.com");
+ cl_assert_equal_s(conndata.port, "443");
+ cl_assert_equal_s(conndata.path, "/libgit2/test/_git/spaces%20in%20the%20name");
+ cl_assert_equal_s(conndata.username, "libgit2");
+ cl_assert_equal_p(conndata.password, NULL);
+ cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
diff --git a/tests/libgit2/network/url/pattern.c b/tests/util/url/pattern.c
index 5e4495f70..f183d7f5f 100644
--- a/tests/libgit2/network/url/pattern.c
+++ b/tests/util/url/pattern.c
@@ -7,7 +7,7 @@ struct url_pattern {
bool matches;
};
-void test_network_url_pattern__single(void)
+void test_url_pattern__single(void)
{
git_net_url url;
size_t i;
@@ -53,7 +53,7 @@ void test_network_url_pattern__single(void)
}
}
-void test_network_url_pattern__list(void)
+void test_url_pattern__list(void)
{
git_net_url url;
size_t i;
diff --git a/tests/libgit2/network/url/redirect.c b/tests/util/url/redirect.c
index a94db7daf..540177861 100644
--- a/tests/libgit2/network/url/redirect.c
+++ b/tests/util/url/redirect.c
@@ -4,17 +4,17 @@
static git_net_url conndata;
-void test_network_url_redirect__initialize(void)
+void test_url_redirect__initialize(void)
{
memset(&conndata, 0, sizeof(conndata));
}
-void test_network_url_redirect__cleanup(void)
+void test_url_redirect__cleanup(void)
{
git_net_url_dispose(&conndata);
}
-void test_network_url_redirect__redirect_http(void)
+void test_url_redirect__redirect_http(void)
{
cl_git_pass(git_net_url_parse(&conndata,
"http://example.com/foo/bar/baz"));
@@ -28,7 +28,7 @@ void test_network_url_redirect__redirect_http(void)
cl_assert_equal_p(conndata.password, NULL);
}
-void test_network_url_redirect__redirect_ssl(void)
+void test_url_redirect__redirect_ssl(void)
{
cl_git_pass(git_net_url_parse(&conndata,
"https://example.com/foo/bar/baz"));
@@ -42,7 +42,7 @@ void test_network_url_redirect__redirect_ssl(void)
cl_assert_equal_p(conndata.password, NULL);
}
-void test_network_url_redirect__redirect_leaves_root_path(void)
+void test_url_redirect__redirect_leaves_root_path(void)
{
cl_git_pass(git_net_url_parse(&conndata,
"https://example.com/foo/bar/baz"));
@@ -56,7 +56,7 @@ void test_network_url_redirect__redirect_leaves_root_path(void)
cl_assert_equal_p(conndata.password, NULL);
}
-void test_network_url_redirect__redirect_encoded_username_password(void)
+void test_url_redirect__redirect_encoded_username_password(void)
{
cl_git_pass(git_net_url_parse(&conndata,
"https://user%2fname:pass%40word%zyx%v@example.com/foo/bar/baz"));
@@ -70,7 +70,7 @@ void test_network_url_redirect__redirect_encoded_username_password(void)
cl_assert_equal_s(conndata.password, "pass@word%zyx%v");
}
-void test_network_url_redirect__redirect_cross_host_allowed(void)
+void test_url_redirect__redirect_cross_host_allowed(void)
{
cl_git_pass(git_net_url_parse(&conndata,
"https://bar.com/bar/baz"));
@@ -84,7 +84,7 @@ void test_network_url_redirect__redirect_cross_host_allowed(void)
cl_assert_equal_p(conndata.password, NULL);
}
-void test_network_url_redirect__redirect_cross_host_denied(void)
+void test_url_redirect__redirect_cross_host_denied(void)
{
cl_git_pass(git_net_url_parse(&conndata,
"https://bar.com/bar/baz"));
@@ -92,7 +92,7 @@ void test_network_url_redirect__redirect_cross_host_denied(void)
"https://foo.com/bar/baz", false, NULL), -1);
}
-void test_network_url_redirect__redirect_http_downgrade_denied(void)
+void test_url_redirect__redirect_http_downgrade_denied(void)
{
cl_git_pass(git_net_url_parse(&conndata,
"https://foo.com/bar/baz"));
@@ -100,7 +100,7 @@ void test_network_url_redirect__redirect_http_downgrade_denied(void)
"http://foo.com/bar/baz", true, NULL), -1);
}
-void test_network_url_redirect__redirect_relative(void)
+void test_url_redirect__redirect_relative(void)
{
cl_git_pass(git_net_url_parse(&conndata,
"http://foo.com/bar/baz/biff"));
@@ -114,7 +114,7 @@ void test_network_url_redirect__redirect_relative(void)
cl_assert_equal_p(conndata.password, NULL);
}
-void test_network_url_redirect__redirect_relative_ssl(void)
+void test_url_redirect__redirect_relative_ssl(void)
{
cl_git_pass(git_net_url_parse(&conndata,
"https://foo.com/bar/baz/biff"));
@@ -128,7 +128,7 @@ void test_network_url_redirect__redirect_relative_ssl(void)
cl_assert_equal_p(conndata.password, NULL);
}
-void test_network_url_redirect__service_query_no_query_params_in_location(void)
+void test_url_redirect__service_query_no_query_params_in_location(void)
{
cl_git_pass(git_net_url_parse(&conndata,
"https://foo.com/bar/info/refs?service=git-upload-pack"));
@@ -137,7 +137,7 @@ void test_network_url_redirect__service_query_no_query_params_in_location(void)
cl_assert_equal_s(conndata.path, "/baz");
}
-void test_network_url_redirect__service_query_with_query_params_in_location(void)
+void test_url_redirect__service_query_with_query_params_in_location(void)
{
cl_git_pass(git_net_url_parse(&conndata,
"https://foo.com/bar/info/refs?service=git-upload-pack"));
diff --git a/tests/libgit2/network/url/scp.c b/tests/util/url/scp.c
index 8cdc832ae..0e0dce17e 100644
--- a/tests/libgit2/network/url/scp.c
+++ b/tests/util/url/scp.c
@@ -3,19 +3,19 @@
static git_net_url conndata;
-void test_network_url_scp__initialize(void)
+void test_url_scp__initialize(void)
{
memset(&conndata, 0, sizeof(conndata));
}
-void test_network_url_scp__cleanup(void)
+void test_url_scp__cleanup(void)
{
git_net_url_dispose(&conndata);
}
/* Hostname */
-void test_network_url_scp__hostname_trivial(void)
+void test_url_scp__hostname_trivial(void)
{
cl_git_pass(git_net_url_parse_scp(&conndata, "example.com:/resource"));
cl_assert_equal_s(conndata.scheme, "ssh");
@@ -27,7 +27,7 @@ void test_network_url_scp__hostname_trivial(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_scp__hostname_bracketed(void)
+void test_url_scp__hostname_bracketed(void)
{
cl_git_pass(git_net_url_parse_scp(&conndata, "[example.com]:/resource"));
cl_assert_equal_s(conndata.scheme, "ssh");
@@ -39,7 +39,7 @@ void test_network_url_scp__hostname_bracketed(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_scp__hostname_root(void)
+void test_url_scp__hostname_root(void)
{
cl_git_pass(git_net_url_parse_scp(&conndata, "example.com:/"));
cl_assert_equal_s(conndata.scheme, "ssh");
@@ -51,7 +51,7 @@ void test_network_url_scp__hostname_root(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_scp__hostname_user(void)
+void test_url_scp__hostname_user(void)
{
cl_git_pass(git_net_url_parse_scp(&conndata, "git@example.com:/resource"));
cl_assert_equal_s(conndata.scheme, "ssh");
@@ -63,7 +63,7 @@ void test_network_url_scp__hostname_user(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_scp__hostname_user_bracketed(void)
+void test_url_scp__hostname_user_bracketed(void)
{
cl_git_pass(git_net_url_parse_scp(&conndata, "[git@example.com]:/resource"));
cl_assert_equal_s(conndata.scheme, "ssh");
@@ -75,7 +75,7 @@ void test_network_url_scp__hostname_user_bracketed(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_scp__hostname_port(void)
+void test_url_scp__hostname_port(void)
{
cl_git_pass(git_net_url_parse_scp(&conndata, "[example.com:42]:/resource"));
cl_assert_equal_s(conndata.scheme, "ssh");
@@ -87,7 +87,7 @@ void test_network_url_scp__hostname_port(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
}
-void test_network_url_scp__hostname_user_port(void)
+void test_url_scp__hostname_user_port(void)
{
cl_git_pass(git_net_url_parse_scp(&conndata, "[git@example.com:42]:/resource"));
cl_assert_equal_s(conndata.scheme, "ssh");
@@ -99,7 +99,7 @@ void test_network_url_scp__hostname_user_port(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
}
-void test_network_url_scp__ipv4_trivial(void)
+void test_url_scp__ipv4_trivial(void)
{
cl_git_pass(git_net_url_parse_scp(&conndata, "192.168.99.88:/resource/a/b/c"));
cl_assert_equal_s(conndata.scheme, "ssh");
@@ -111,7 +111,7 @@ void test_network_url_scp__ipv4_trivial(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_scp__ipv4_bracketed(void)
+void test_url_scp__ipv4_bracketed(void)
{
cl_git_pass(git_net_url_parse_scp(&conndata, "[192.168.99.88]:/resource/a/b/c"));
cl_assert_equal_s(conndata.scheme, "ssh");
@@ -123,7 +123,7 @@ void test_network_url_scp__ipv4_bracketed(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_scp__ipv4_user(void)
+void test_url_scp__ipv4_user(void)
{
cl_git_pass(git_net_url_parse_scp(&conndata, "git@192.168.99.88:/resource/a/b/c"));
cl_assert_equal_s(conndata.scheme, "ssh");
@@ -135,7 +135,7 @@ void test_network_url_scp__ipv4_user(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_scp__ipv4_port(void)
+void test_url_scp__ipv4_port(void)
{
cl_git_pass(git_net_url_parse_scp(&conndata, "[192.168.99.88:1111]:/resource/a/b/c"));
cl_assert_equal_s(conndata.scheme, "ssh");
@@ -147,7 +147,7 @@ void test_network_url_scp__ipv4_port(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
}
-void test_network_url_scp__ipv4_user_port(void)
+void test_url_scp__ipv4_user_port(void)
{
cl_git_pass(git_net_url_parse_scp(&conndata, "[git@192.168.99.88:1111]:/resource/a/b/c"));
cl_assert_equal_s(conndata.scheme, "ssh");
@@ -159,7 +159,7 @@ void test_network_url_scp__ipv4_user_port(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
}
-void test_network_url_scp__ipv6_trivial(void)
+void test_url_scp__ipv6_trivial(void)
{
cl_git_pass(git_net_url_parse_scp(&conndata, "[fe80::dcad:beff:fe00:0001]:/resource/foo"));
cl_assert_equal_s(conndata.scheme, "ssh");
@@ -171,7 +171,7 @@ void test_network_url_scp__ipv6_trivial(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_scp__ipv6_user(void)
+void test_url_scp__ipv6_user(void)
{
cl_git_pass(git_net_url_parse_scp(&conndata, "git@[fe80::dcad:beff:fe00:0001]:/resource/foo"));
cl_assert_equal_s(conndata.scheme, "ssh");
@@ -183,7 +183,7 @@ void test_network_url_scp__ipv6_user(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_scp__ipv6_port(void)
+void test_url_scp__ipv6_port(void)
{
cl_git_pass(git_net_url_parse_scp(&conndata, "[[fe80::dcad:beff:fe00:0001]:99]:/resource/foo"));
cl_assert_equal_s(conndata.scheme, "ssh");
@@ -195,7 +195,7 @@ void test_network_url_scp__ipv6_port(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
}
-void test_network_url_scp__ipv6_user_port(void)
+void test_url_scp__ipv6_user_port(void)
{
cl_git_pass(git_net_url_parse_scp(&conndata, "[git@[fe80::dcad:beff:fe00:0001]:99]:/resource/foo"));
cl_assert_equal_s(conndata.scheme, "ssh");
@@ -207,7 +207,7 @@ void test_network_url_scp__ipv6_user_port(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
}
-void test_network_url_scp__hexhost_and_port(void)
+void test_url_scp__hexhost_and_port(void)
{
cl_git_pass(git_net_url_parse_scp(&conndata, "[fe:22]:/resource/foo"));
cl_assert_equal_s(conndata.scheme, "ssh");
@@ -219,7 +219,7 @@ void test_network_url_scp__hexhost_and_port(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_scp__malformed_ipv6_one(void)
+void test_url_scp__malformed_ipv6_one(void)
{
cl_git_pass(git_net_url_parse_scp(&conndata, "fe80::dcad:beff:fe00:0001]:/resource"));
cl_assert_equal_s(conndata.scheme, "ssh");
@@ -231,7 +231,7 @@ void test_network_url_scp__malformed_ipv6_one(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_scp__malformed_ipv6_two(void)
+void test_url_scp__malformed_ipv6_two(void)
{
cl_git_pass(git_net_url_parse_scp(&conndata, "[fe80::dcad:beff:fe00:0001]:42]:/resource"));
cl_assert_equal_s(conndata.scheme, "ssh");
@@ -243,7 +243,7 @@ void test_network_url_scp__malformed_ipv6_two(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_scp__malformed_ipv6_with_user(void)
+void test_url_scp__malformed_ipv6_with_user(void)
{
cl_git_pass(git_net_url_parse_scp(&conndata, "git@[fe80::dcad:beff:fe00:0001]:42]:/resource"));
cl_assert_equal_s(conndata.scheme, "ssh");
@@ -255,7 +255,7 @@ void test_network_url_scp__malformed_ipv6_with_user(void)
cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
}
-void test_network_url_scp__invalid_addresses(void)
+void test_url_scp__invalid_addresses(void)
{
/* Path is required */
cl_git_fail_with(GIT_EINVALIDSPEC, git_net_url_parse_scp(&conndata,
@@ -314,8 +314,4 @@ void test_network_url_scp__invalid_addresses(void)
"[git@[fe80::dcad:beff:fe00:0001]:42:/resource"));
cl_git_fail_with(GIT_EINVALIDSPEC, git_net_url_parse_scp(&conndata,
"[git@[fe80::dcad:beff:fe00:0001:42]:/resource"));
-
- /* Invalid character inside address */
- cl_git_fail_with(GIT_EINVALIDSPEC, git_net_url_parse(&conndata,
- "[fe8o::dcad:beff:fe00:0001]:/resource"));
}
diff --git a/tests/libgit2/network/url/valid.c b/tests/util/url/valid.c
index 2b2cb7ba4..797b697bd 100644
--- a/tests/libgit2/network/url/valid.c
+++ b/tests/util/url/valid.c
@@ -1,7 +1,7 @@
#include "clar_libgit2.h"
#include "net.h"
-void test_network_url_valid__test(void)
+void test_url_valid__test(void)
{
cl_assert(git_net_str_is_url("http://example.com/"));
cl_assert(git_net_str_is_url("file://localhost/tmp/foo/"));