diff --git a/Documentation/RelNotes/2.50.0.adoc b/Documentation/RelNotes/2.50.0.adoc index 95349ea50c001e..99acf814875246 100644 --- a/Documentation/RelNotes/2.50.0.adoc +++ b/Documentation/RelNotes/2.50.0.adoc @@ -201,6 +201,17 @@ Performance, Internal Implementation, Development Support etc. we ended up checking for these non-existent files repeatedly, which has been optimized by memoizing the non-existence. + * Build settings have been improved for BSD based systems. + + * Newer version of libcURL detected curl_easy_setopt() calls we made + with platform-natural "int" when we should have used "long", which + all have been corrected. + + * Tests that compare $HOME and $(pwd), which should be the same + directory unless the tests chdir's around, would fail when the user + enters the test directory via symbolic links, which has been + corrected. + Fixes since v2.49 ----------------- diff --git a/Documentation/config/gitcvs.adoc b/Documentation/config/gitcvs.adoc index 02da427fd9743f..31d7be3992b572 100644 --- a/Documentation/config/gitcvs.adoc +++ b/Documentation/config/gitcvs.adoc @@ -47,7 +47,8 @@ gitcvs.dbDriver:: May not contain double colons (`:`). Default: 'SQLite'. See linkgit:git-cvsserver[1]. -gitcvs.dbUser, gitcvs.dbPass:: +gitcvs.dbUser:: +gitcvs.dbPass:: Database user and password. Only useful if setting `gitcvs.dbDriver`, since SQLite has no concept of database users and/or passwords. 'gitcvs.dbUser' supports variable substitution (see diff --git a/Documentation/config/http.adoc b/Documentation/config/http.adoc index dedfe63322019d..7fd001206ded22 100644 --- a/Documentation/config/http.adoc +++ b/Documentation/config/http.adoc @@ -296,7 +296,8 @@ for most push problems, but can increase memory consumption significantly since the entire buffer is allocated even for small pushes. -http.lowSpeedLimit, http.lowSpeedTime:: +http.lowSpeedLimit:: +http.lowSpeedTime:: If the HTTP transfer speed, in bytes per second, is less than 'http.lowSpeedLimit' for longer than 'http.lowSpeedTime' seconds, the transfer is aborted. diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 1047b8d11de767..208e91a17f0455 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,6 +1,6 @@ #!/bin/sh -DEF_VER=v2.50.0-rc1 +DEF_VER=v2.50.0-rc2 LF=' ' diff --git a/compat/posix.h b/compat/posix.h index 6c1af589e71dec..704529dc61d6d1 100644 --- a/compat/posix.h +++ b/compat/posix.h @@ -60,11 +60,11 @@ # else # define _XOPEN_SOURCE 500 # endif -#elif !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && \ - !defined(_M_UNIX) && !defined(__sgi) && !defined(__DragonFly__) && \ - !defined(__TANDEM) && !defined(__QNX__) && !defined(__MirBSD__) && \ - !defined(__CYGWIN__) -#define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */ +#elif !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && \ + !defined(__OpenBSD__) && !defined(__DragonFly__) && !defined(__MirBSD__) && \ + !defined(__USLC__) && !defined(_M_UNIX) && !defined(__sgi) && \ + !defined(__TANDEM) && !defined(__QNX__) && !defined(__CYGWIN__) +#define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500 */ #define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */ #endif #define _ALL_SOURCE 1 diff --git a/config.mak.uname b/config.mak.uname index bc9855d2391abd..ab5b5e2e763850 100644 --- a/config.mak.uname +++ b/config.mak.uname @@ -301,17 +301,14 @@ ifeq ($(uname_S),FreeBSD) FILENO_IS_A_MACRO = UnfortunatelyYes endif ifeq ($(uname_S),OpenBSD) - NO_STRCASESTR = YesPlease - NO_MEMMEM = YesPlease + DIR_HAS_BSD_GROUP_SEMANTICS = YesPlease USE_ST_TIMESPEC = YesPlease NEEDS_LIBICONV = YesPlease BASIC_CFLAGS += -I/usr/local/include BASIC_LDFLAGS += -L/usr/local/lib HAVE_PATHS_H = YesPlease HAVE_BSD_SYSCTL = YesPlease - HAVE_BSD_KERN_PROC_SYSCTL = YesPlease CSPRNG_METHOD = arc4random - PROCFS_EXECUTABLE_PATH = /proc/curproc/file FREAD_READS_DIRECTORIES = UnfortunatelyYes FILENO_IS_A_MACRO = UnfortunatelyYes endif diff --git a/generate-configlist.sh b/generate-configlist.sh index b06da53c891819..9d2ad6165d60cd 100755 --- a/generate-configlist.sh +++ b/generate-configlist.sh @@ -19,7 +19,6 @@ EOF s/::$//; s/`//g; s/^.*$/ "&",/; - s/, */",\n "/g; p;}; d' \ "$SOURCE_DIR"/Documentation/*config.adoc \ diff --git a/git-gui/generate-tclindex.sh b/git-gui/generate-tclindex.sh index 36e3a0bd90eefa..0b031d8339c443 100755 --- a/git-gui/generate-tclindex.sh +++ b/git-gui/generate-tclindex.sh @@ -23,7 +23,7 @@ then : ok else echo >&2 " * $TCL_PATH failed; using unoptimized loading" - rm -f $@ + rm -f lib/tclIndex echo '# Autogenerated by git-gui Makefile' >lib/tclIndex echo >>lib/tclIndex echo "class.tcl" >>lib/tclIndex diff --git a/http-push.c b/http-push.c index 56db9ce8edff77..f5a92529a8406b 100644 --- a/http-push.c +++ b/http-push.c @@ -195,7 +195,7 @@ static char *xml_entities(const char *s) static void curl_setup_http_get(CURL *curl, const char *url, const char *custom_req) { - curl_easy_setopt(curl, CURLOPT_HTTPGET, 1l); + curl_easy_setopt(curl, CURLOPT_HTTPGET, 1L); curl_easy_setopt(curl, CURLOPT_URL, url); curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, custom_req); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, fwrite_null); @@ -205,7 +205,7 @@ static void curl_setup_http(CURL *curl, const char *url, const char *custom_req, struct buffer *buffer, curl_write_callback write_fn) { - curl_easy_setopt(curl, CURLOPT_UPLOAD, 1l); + curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L); curl_easy_setopt(curl, CURLOPT_URL, url); curl_easy_setopt(curl, CURLOPT_INFILE, buffer); curl_easy_setopt(curl, CURLOPT_INFILESIZE, buffer->buf.len); @@ -213,9 +213,9 @@ static void curl_setup_http(CURL *curl, const char *url, curl_easy_setopt(curl, CURLOPT_SEEKFUNCTION, seek_buffer); curl_easy_setopt(curl, CURLOPT_SEEKDATA, buffer); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_fn); - curl_easy_setopt(curl, CURLOPT_NOBODY, 0l); + curl_easy_setopt(curl, CURLOPT_NOBODY, 0L); curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, custom_req); - curl_easy_setopt(curl, CURLOPT_UPLOAD, 1l); + curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L); } static struct curl_slist *get_dav_token_headers(struct remote_lock *lock, enum dav_header_flag options) diff --git a/http.c b/http.c index 37cf43e746c01b..6d06c6c463f9f8 100644 --- a/http.c +++ b/http.c @@ -147,7 +147,7 @@ static char *cached_accept_language; static char *http_ssl_backend; -static int http_schannel_check_revoke_mode = +static long http_schannel_check_revoke_mode = #ifdef CURLSSLOPT_REVOKE_BEST_EFFORT CURLSSLOPT_REVOKE_BEST_EFFORT; #else @@ -1044,13 +1044,13 @@ static CURL *get_curl_handle(void) die("curl_easy_init failed"); if (!curl_ssl_verify) { - curl_easy_setopt(result, CURLOPT_SSL_VERIFYPEER, 0l); - curl_easy_setopt(result, CURLOPT_SSL_VERIFYHOST, 0l); + curl_easy_setopt(result, CURLOPT_SSL_VERIFYPEER, 0L); + curl_easy_setopt(result, CURLOPT_SSL_VERIFYHOST, 0L); } else { /* Verify authenticity of the peer's certificate */ - curl_easy_setopt(result, CURLOPT_SSL_VERIFYPEER, 1l); + curl_easy_setopt(result, CURLOPT_SSL_VERIFYPEER, 1L); /* The name in the cert must match whom we tried to connect */ - curl_easy_setopt(result, CURLOPT_SSL_VERIFYHOST, 2l); + curl_easy_setopt(result, CURLOPT_SSL_VERIFYHOST, 2L); } if (curl_http_version) { @@ -1153,7 +1153,7 @@ static CURL *get_curl_handle(void) curl_low_speed_time); } - curl_easy_setopt(result, CURLOPT_MAXREDIRS, 20l); + curl_easy_setopt(result, CURLOPT_MAXREDIRS, 20L); curl_easy_setopt(result, CURLOPT_POSTREDIR, (long)CURL_REDIR_POST_ALL); #ifdef GIT_CURL_HAVE_CURLOPT_PROTOCOLS_STR @@ -1187,7 +1187,7 @@ static CURL *get_curl_handle(void) user_agent ? user_agent : git_user_agent()); if (curl_ftp_no_epsv) - curl_easy_setopt(result, CURLOPT_FTP_USE_EPSV, 0l); + curl_easy_setopt(result, CURLOPT_FTP_USE_EPSV, 0L); if (curl_ssl_try) curl_easy_setopt(result, CURLOPT_USE_SSL, CURLUSESSL_TRY); @@ -1290,7 +1290,7 @@ static CURL *get_curl_handle(void) } init_curl_proxy_auth(result); - curl_easy_setopt(result, CURLOPT_TCP_KEEPALIVE, 1l); + curl_easy_setopt(result, CURLOPT_TCP_KEEPALIVE, 1L); if (curl_tcp_keepidle > -1) curl_easy_setopt(result, CURLOPT_TCP_KEEPIDLE, @@ -1576,9 +1576,9 @@ struct active_request_slot *get_active_slot(void) curl_easy_setopt(slot->curl, CURLOPT_WRITEFUNCTION, NULL); curl_easy_setopt(slot->curl, CURLOPT_POSTFIELDS, NULL); curl_easy_setopt(slot->curl, CURLOPT_POSTFIELDSIZE, -1L); - curl_easy_setopt(slot->curl, CURLOPT_UPLOAD, 0l); - curl_easy_setopt(slot->curl, CURLOPT_HTTPGET, 1l); - curl_easy_setopt(slot->curl, CURLOPT_FAILONERROR, 1l); + curl_easy_setopt(slot->curl, CURLOPT_UPLOAD, 0L); + curl_easy_setopt(slot->curl, CURLOPT_HTTPGET, 1L); + curl_easy_setopt(slot->curl, CURLOPT_FAILONERROR, 1L); curl_easy_setopt(slot->curl, CURLOPT_RANGE, NULL); /* @@ -1587,9 +1587,9 @@ struct active_request_slot *get_active_slot(void) * HTTP_FOLLOW_* cases themselves. */ if (http_follow_config == HTTP_FOLLOW_ALWAYS) - curl_easy_setopt(slot->curl, CURLOPT_FOLLOWLOCATION, 1l); + curl_easy_setopt(slot->curl, CURLOPT_FOLLOWLOCATION, 1L); else - curl_easy_setopt(slot->curl, CURLOPT_FOLLOWLOCATION, 0l); + curl_easy_setopt(slot->curl, CURLOPT_FOLLOWLOCATION, 0L); curl_easy_setopt(slot->curl, CURLOPT_IPRESOLVE, git_curl_ipresolve); curl_easy_setopt(slot->curl, CURLOPT_HTTPAUTH, http_auth_methods); @@ -2156,12 +2156,12 @@ static int http_request(const char *url, int ret; slot = get_active_slot(); - curl_easy_setopt(slot->curl, CURLOPT_HTTPGET, 1l); + curl_easy_setopt(slot->curl, CURLOPT_HTTPGET, 1L); if (!result) { - curl_easy_setopt(slot->curl, CURLOPT_NOBODY, 1l); + curl_easy_setopt(slot->curl, CURLOPT_NOBODY, 1L); } else { - curl_easy_setopt(slot->curl, CURLOPT_NOBODY, 0l); + curl_easy_setopt(slot->curl, CURLOPT_NOBODY, 0L); curl_easy_setopt(slot->curl, CURLOPT_WRITEDATA, result); if (target == HTTP_REQUEST_FILE) { @@ -2187,7 +2187,7 @@ static int http_request(const char *url, strbuf_addstr(&buf, " no-cache"); if (options && options->initial_request && http_follow_config == HTTP_FOLLOW_INITIAL) - curl_easy_setopt(slot->curl, CURLOPT_FOLLOWLOCATION, 1l); + curl_easy_setopt(slot->curl, CURLOPT_FOLLOWLOCATION, 1L); headers = curl_slist_append(headers, buf.buf); @@ -2206,7 +2206,7 @@ static int http_request(const char *url, curl_easy_setopt(slot->curl, CURLOPT_URL, url); curl_easy_setopt(slot->curl, CURLOPT_HTTPHEADER, headers); curl_easy_setopt(slot->curl, CURLOPT_ENCODING, ""); - curl_easy_setopt(slot->curl, CURLOPT_FAILONERROR, 0l); + curl_easy_setopt(slot->curl, CURLOPT_FAILONERROR, 0L); ret = run_one_slot(slot, &results); @@ -2786,7 +2786,7 @@ struct http_object_request *new_http_object_request(const char *base_url, freq->headers = object_request_headers(); curl_easy_setopt(freq->slot->curl, CURLOPT_WRITEDATA, freq); - curl_easy_setopt(freq->slot->curl, CURLOPT_FAILONERROR, 0l); + curl_easy_setopt(freq->slot->curl, CURLOPT_FAILONERROR, 0L); curl_easy_setopt(freq->slot->curl, CURLOPT_WRITEFUNCTION, fwrite_sha1_file); curl_easy_setopt(freq->slot->curl, CURLOPT_ERRORBUFFER, freq->errorstr); curl_easy_setopt(freq->slot->curl, CURLOPT_URL, freq->url); diff --git a/remote-curl.c b/remote-curl.c index 0c229e39ae1935..b8bc3a80cf4142 100644 --- a/remote-curl.c +++ b/remote-curl.c @@ -877,12 +877,12 @@ static int probe_rpc(struct rpc_state *rpc, struct slot_results *results) headers = curl_slist_append(headers, rpc->hdr_content_type); headers = curl_slist_append(headers, rpc->hdr_accept); - curl_easy_setopt(slot->curl, CURLOPT_NOBODY, 0l); - curl_easy_setopt(slot->curl, CURLOPT_POST, 1l); + curl_easy_setopt(slot->curl, CURLOPT_NOBODY, 0L); + curl_easy_setopt(slot->curl, CURLOPT_POST, 1L); curl_easy_setopt(slot->curl, CURLOPT_URL, rpc->service_url); curl_easy_setopt(slot->curl, CURLOPT_ENCODING, NULL); curl_easy_setopt(slot->curl, CURLOPT_POSTFIELDS, "0000"); - curl_easy_setopt(slot->curl, CURLOPT_POSTFIELDSIZE, 4l); + curl_easy_setopt(slot->curl, CURLOPT_POSTFIELDSIZE, 4L); curl_easy_setopt(slot->curl, CURLOPT_HTTPHEADER, headers); curl_easy_setopt(slot->curl, CURLOPT_WRITEFUNCTION, fwrite_buffer); curl_easy_setopt(slot->curl, CURLOPT_WRITEDATA, &buf); @@ -970,8 +970,8 @@ static int post_rpc(struct rpc_state *rpc, int stateless_connect, int flush_rece slot = get_active_slot(); - curl_easy_setopt(slot->curl, CURLOPT_NOBODY, 0l); - curl_easy_setopt(slot->curl, CURLOPT_POST, 1l); + curl_easy_setopt(slot->curl, CURLOPT_NOBODY, 0L); + curl_easy_setopt(slot->curl, CURLOPT_POST, 1L); curl_easy_setopt(slot->curl, CURLOPT_URL, rpc->service_url); curl_easy_setopt(slot->curl, CURLOPT_ENCODING, ""); @@ -1058,7 +1058,7 @@ static int post_rpc(struct rpc_state *rpc, int stateless_connect, int flush_rece rpc_in_data.check_pktline = stateless_connect; memset(&rpc_in_data.pktline_state, 0, sizeof(rpc_in_data.pktline_state)); curl_easy_setopt(slot->curl, CURLOPT_WRITEDATA, &rpc_in_data); - curl_easy_setopt(slot->curl, CURLOPT_FAILONERROR, 0l); + curl_easy_setopt(slot->curl, CURLOPT_FAILONERROR, 0L); rpc->any_written = 0; diff --git a/t/t5410-receive-pack.sh b/t/t5410-receive-pack.sh index f76a22943ef0d1..09d6bfd2a10f5a 100755 --- a/t/t5410-receive-pack.sh +++ b/t/t5410-receive-pack.sh @@ -41,7 +41,19 @@ test_expect_success 'with core.alternateRefsPrefixes' ' test_cmp expect actual.haves ' -test_expect_success 'receive-pack missing objects fails connectivity check' ' +# The `tee.exe` shipped in Git for Windows v2.49.0 is known to hang frequently +# when spawned from `git.exe` and piping its output to `git.exe`. This seems +# related to MSYS2 runtime bug fixes regarding the signal handling; Let's just +# skip the tests that need to exercise this when the faulty MSYS2 runtime is +# detected; The test cases are exercised enough in other matrix jobs of the CI +# runs. +test_lazy_prereq TEE_DOES_NOT_HANG ' + test_have_prereq !MINGW && + case "$(uname -a)" in *3.5.7-463ebcdc.x86_64*) false;; esac +' + +test_expect_success TEE_DOES_NOT_HANG \ + 'receive-pack missing objects fails connectivity check' ' test_when_finished rm -rf repo remote.git setup.git && git init repo && @@ -62,7 +74,8 @@ test_expect_success 'receive-pack missing objects fails connectivity check' ' test_must_fail git -C remote.git cat-file -e $(git -C repo rev-parse HEAD) ' -test_expect_success 'receive-pack missing objects bypasses connectivity check' ' +test_expect_success TEE_DOES_NOT_HANG \ + 'receive-pack missing objects bypasses connectivity check' ' test_when_finished rm -rf repo remote.git setup.git && git init repo && diff --git a/t/test-lib.sh b/t/test-lib.sh index 488ce5422165db..d0f7101efdf1a7 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -1586,6 +1586,8 @@ fi # Use -P to resolve symlinks in our working directory so that the cwd # in subprocesses like git equals our $PWD (for pathname comparisons). cd -P "$TRASH_DIRECTORY" || BAIL_OUT "cannot cd -P to \"$TRASH_DIRECTORY\"" +TRASH_DIRECTORY=$(pwd) +HOME="$TRASH_DIRECTORY" start_test_output "$0"