diff options
47 files changed, 177 insertions, 418 deletions
diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 285c273b1..df80d7513 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 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ce14dd0fb..ec1c828d6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 @@ -230,7 +230,7 @@ jobs: 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 diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 856da28a3..fe223db76 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 diff --git a/ci/test.sh b/ci/test.sh index 0815522a9..0e1d39e8d 100755 --- a/ci/test.sh +++ b/ci/test.sh @@ -22,13 +22,33 @@ 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 "$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 @@ -80,40 +100,46 @@ 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=$! 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..." + echo "Starting SSH server..." HOME=`mktemp -d ${TMPDIR}/home.XXXXXXXX` SSHD_DIR=`mktemp -d ${TMPDIR}/sshd.XXXXXXXX` git init --bare "${SSHD_DIR}/test.git" >/dev/null @@ -214,12 +240,22 @@ 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 fi if [ -z "$SKIP_PROXY_TESTS" ]; then 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/clone.c b/src/libgit2/clone.c index 1843875f8..0d393eb85 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))) 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/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/tests/libgit2/CMakeLists.txt b/tests/libgit2/CMakeLists.txt index 7f6fafe77..17f2253f0 100644 --- a/tests/libgit2/CMakeLists.txt +++ b/tests/libgit2/CMakeLists.txt @@ -69,6 +69,7 @@ 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 gitdaemon_namespace -v -sonline::clone::namespace) 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 proxy -v -sonline::clone::proxy) add_clar_test(libgit2_tests auth_clone -v -sonline::clone::cred) 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/online/clone.c b/tests/libgit2/online/clone.c index 6a087b1af..96ff66ae0 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; @@ -69,6 +70,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"); @@ -102,6 +104,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); @@ -309,6 +312,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, @@ -1006,3 +1019,42 @@ 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); +} 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 Binary files differnew file mode 100644 index 000000000..5ed27feb0 --- /dev/null +++ b/tests/resources/namespace.git/index 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 Binary files differnew file mode 100644 index 000000000..be49bee0e --- /dev/null +++ b/tests/resources/namespace.git/objects/04/433ff5b52d6ad534fd6288de4a57b81cc12188 diff --git a/tests/resources/namespace.git/objects/0a/890bd10328d68f6d85efd2535e3a4c588ee8e6 b/tests/resources/namespace.git/objects/0a/890bd10328d68f6d85efd2535e3a4c588ee8e6 Binary files differnew file mode 100644 index 000000000..41f340b2a --- /dev/null +++ b/tests/resources/namespace.git/objects/0a/890bd10328d68f6d85efd2535e3a4c588ee8e6 diff --git a/tests/resources/namespace.git/objects/10/fcb1c85bd6b3bc6f43e0a3932ff5859121a84e b/tests/resources/namespace.git/objects/10/fcb1c85bd6b3bc6f43e0a3932ff5859121a84e Binary files differnew file mode 100644 index 000000000..3005ed15a --- /dev/null +++ b/tests/resources/namespace.git/objects/10/fcb1c85bd6b3bc6f43e0a3932ff5859121a84e diff --git a/tests/resources/namespace.git/objects/24/bbdca8b223aaa3384d78312f730c58492aa30a b/tests/resources/namespace.git/objects/24/bbdca8b223aaa3384d78312f730c58492aa30a Binary files differnew file mode 100644 index 000000000..c1e97d5e3 --- /dev/null +++ b/tests/resources/namespace.git/objects/24/bbdca8b223aaa3384d78312f730c58492aa30a diff --git a/tests/resources/namespace.git/objects/27/0c611ee72c567bc1b2abec4cbc345bab9f15ba b/tests/resources/namespace.git/objects/27/0c611ee72c567bc1b2abec4cbc345bab9f15ba Binary files differnew file mode 100644 index 000000000..300fb6715 --- /dev/null +++ b/tests/resources/namespace.git/objects/27/0c611ee72c567bc1b2abec4cbc345bab9f15ba diff --git a/tests/resources/namespace.git/objects/2b/df67abb163a4ffb2d7f3f0880c9fe5068ce782 b/tests/resources/namespace.git/objects/2b/df67abb163a4ffb2d7f3f0880c9fe5068ce782 Binary files differnew file mode 100644 index 000000000..d0398e6e3 --- /dev/null +++ b/tests/resources/namespace.git/objects/2b/df67abb163a4ffb2d7f3f0880c9fe5068ce782 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 @@ +xQ +0D)re&D^`ЂiJ*`TK*%E1#!zˀ!aH,*s(Bh$]4a`9=XW}'c-:lvH{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 Binary files differnew file mode 100644 index 000000000..fb91b1b12 --- /dev/null +++ b/tests/resources/namespace.git/objects/42/0d51ce75a87909e29659da2072ffd3d5daf5b7 diff --git a/tests/resources/namespace.git/objects/56/26abf0f72e58d7a153368ba57db4c673c0e171 b/tests/resources/namespace.git/objects/56/26abf0f72e58d7a153368ba57db4c673c0e171 Binary files differnew file mode 100644 index 000000000..4d5447467 --- /dev/null +++ b/tests/resources/namespace.git/objects/56/26abf0f72e58d7a153368ba57db4c673c0e171 diff --git a/tests/resources/namespace.git/objects/56/300b5eae653453102ac1213e921973c066425b b/tests/resources/namespace.git/objects/56/300b5eae653453102ac1213e921973c066425b Binary files differnew file mode 100644 index 000000000..59f5649d2 --- /dev/null +++ b/tests/resources/namespace.git/objects/56/300b5eae653453102ac1213e921973c066425b 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] }{Ͳ +1x/4P^_4o2 %i<}l=bfG$M Sd.M,:du2LFiO \*<5s.y++\SuO.HcDi?ҟ3XooYwR
\ No newline at end of file diff --git a/tests/resources/namespace.git/objects/85/10665149157c2bc901848c3e0b746954e9cbd9 b/tests/resources/namespace.git/objects/85/10665149157c2bc901848c3e0b746954e9cbd9 Binary files differnew file mode 100644 index 000000000..2f2fef743 --- /dev/null +++ b/tests/resources/namespace.git/objects/85/10665149157c2bc901848c3e0b746954e9cbd9 diff --git a/tests/resources/namespace.git/objects/9e/bfa6bdc9d38075d29d26aa5df89b1cf635b269 b/tests/resources/namespace.git/objects/9e/bfa6bdc9d38075d29d26aa5df89b1cf635b269 Binary files differnew file mode 100644 index 000000000..33ec05881 --- /dev/null +++ b/tests/resources/namespace.git/objects/9e/bfa6bdc9d38075d29d26aa5df89b1cf635b269 diff --git a/tests/resources/namespace.git/objects/9e/f15e3c5c0c8c6913936f843ad967cbe5541f0d b/tests/resources/namespace.git/objects/9e/f15e3c5c0c8c6913936f843ad967cbe5541f0d Binary files differnew file mode 100644 index 000000000..0759911e0 --- /dev/null +++ b/tests/resources/namespace.git/objects/9e/f15e3c5c0c8c6913936f843ad967cbe5541f0d diff --git a/tests/resources/namespace.git/objects/af/5626b4a114abcb82d63db7c8082c3c4756e51b b/tests/resources/namespace.git/objects/af/5626b4a114abcb82d63db7c8082c3c4756e51b Binary files differnew file mode 100644 index 000000000..822bc1518 --- /dev/null +++ b/tests/resources/namespace.git/objects/af/5626b4a114abcb82d63db7c8082c3c4756e51b diff --git a/tests/resources/namespace.git/objects/af/81e4bd99cbfe6f05a501f1e4c82db2bf803e02 b/tests/resources/namespace.git/objects/af/81e4bd99cbfe6f05a501f1e4c82db2bf803e02 Binary files differnew file mode 100644 index 000000000..a5e8ecb33 --- /dev/null +++ b/tests/resources/namespace.git/objects/af/81e4bd99cbfe6f05a501f1e4c82db2bf803e02 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})
@҂5x}xfeYƛ]""@c`2M.{"ʣ"Zɔ]Ȅ2͑)ʠڧRʯTnSYZyI6Ive9Ak!n]Qwi
6imsj}
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 Binary files differnew file mode 100644 index 000000000..a6e1d1d8e --- /dev/null +++ b/tests/resources/namespace.git/objects/ec/947e3dd7a7752d078f1ed0cfde7457b21fef58 diff --git a/tests/resources/namespace.git/objects/f7/19efd430d52bcfc8566a43b2eb655688d38871 b/tests/resources/namespace.git/objects/f7/19efd430d52bcfc8566a43b2eb655688d38871 Binary files differnew file mode 100644 index 000000000..b2d51d93b --- /dev/null +++ b/tests/resources/namespace.git/objects/f7/19efd430d52bcfc8566a43b2eb655688d38871 diff --git a/tests/resources/namespace.git/objects/f7/5ba05f340c51065cbea2e1fdbfe5fe13144c97 b/tests/resources/namespace.git/objects/f7/5ba05f340c51065cbea2e1fdbfe5fe13144c97 Binary files differnew file mode 100644 index 000000000..044001e9f --- /dev/null +++ b/tests/resources/namespace.git/objects/f7/5ba05f340c51065cbea2e1fdbfe5fe13144c97 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 |