Skip to content

Commit

Permalink
Merge branch 'bc/drop-ancient-libcurl-and-perl'
Browse files Browse the repository at this point in the history
Drop support for older libcURL and Perl.

* bc/drop-ancient-libcurl-and-perl:
  gitweb: make use of s///r
  Require Perl 5.26.0
  INSTALL: document requirement for libcurl 7.61.0
  git-curl-compat: remove check for curl 7.56.0
  git-curl-compat: remove check for curl 7.53.0
  git-curl-compat: remove check for curl 7.52.0
  git-curl-compat: remove check for curl 7.44.0
  git-curl-compat: remove check for curl 7.43.0
  git-curl-compat: remove check for curl 7.39.0
  git-curl-compat: remove check for curl 7.34.0
  git-curl-compat: remove check for curl 7.25.0
  git-curl-compat: remove check for curl 7.21.5
  • Loading branch information
gitster committed Dec 4, 2024
2 parents 1e18cf4 + 5f139a1 commit 4c1b7e3
Show file tree
Hide file tree
Showing 21 changed files with 23 additions and 188 deletions.
13 changes: 4 additions & 9 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Issues of note:
- A POSIX-compliant shell is required to run some scripts needed
for everyday use (e.g. "bisect", "request-pull").

- "Perl" version 5.8.1 or later is needed to use some of the
- "Perl" version 5.26.0 or later is needed to use some of the
features (e.g. sending patches using "git send-email",
interacting with svn repositories with "git svn"). If you can
live without these, use NO_PERL. Note that recent releases of
Expand All @@ -129,17 +129,12 @@ Issues of note:
itself, e.g. Digest::MD5, File::Spec, File::Temp, Net::Domain,
Net::SMTP, and Time::HiRes.

- git-imap-send needs the OpenSSL library to talk IMAP over SSL if
you are using libcurl older than 7.34.0. Otherwise you can use
NO_OPENSSL without losing git-imap-send.

- "libcurl" library is used for fetching and pushing
repositories over http:// or https://, as well as by
git-imap-send if the curl version is >= 7.34.0. If you do
not need that functionality, use NO_CURL to build without
it.
git-imap-send. If you do not need that functionality,
use NO_CURL to build without it.

Git requires version "7.21.3" or later of "libcurl" to build
Git requires version "7.61.0" or later of "libcurl" to build
without NO_CURL. This version requirement may be bumped in
the future.

Expand Down
2 changes: 1 addition & 1 deletion contrib/diff-highlight/DiffHighlight.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package DiffHighlight;

use 5.008001;
require v5.26;
use warnings FATAL => 'all';
use strict;

Expand Down
2 changes: 1 addition & 1 deletion contrib/mw-to-git/Git/Mediawiki.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package Git::Mediawiki;

use 5.008001;
require v5.26;
use strict;
use POSIX;
use Git;
Expand Down
2 changes: 1 addition & 1 deletion git-archimport.perl
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ =head1 Devel Notes
=cut

use 5.008001;
require v5.26;
use strict;
use warnings;
use Getopt::Std;
Expand Down
98 changes: 0 additions & 98 deletions git-curl-compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,104 +28,6 @@
* introduced, oldest first, in the official version of cURL library.
*/

/**
* CURL_SOCKOPT_OK was added in 7.21.5, released in April 2011.
*/
#if LIBCURL_VERSION_NUM < 0x071505
#define CURL_SOCKOPT_OK 0
#endif

/**
* CURLOPT_TCP_KEEPALIVE was added in 7.25.0, released in March 2012.
*/
#if LIBCURL_VERSION_NUM >= 0x071900
#define GITCURL_HAVE_CURLOPT_TCP_KEEPALIVE 1
#endif


/**
* CURLOPT_LOGIN_OPTIONS was added in 7.34.0, released in December
* 2013.
*
* If we start requiring 7.34.0 we might also be able to remove the
* code conditional on USE_CURL_FOR_IMAP_SEND in imap-send.c, see
* 1e16b255b95 (git-imap-send: use libcurl for implementation,
* 2014-11-09) and the check it added for "072200" in the Makefile.
*/
#if LIBCURL_VERSION_NUM >= 0x072200
#define GIT_CURL_HAVE_CURLOPT_LOGIN_OPTIONS 1
#endif

/**
* CURL_SSLVERSION_TLSv1_[012] was added in 7.34.0, released in
* December 2013.
*/
#if LIBCURL_VERSION_NUM >= 0x072200
#define GIT_CURL_HAVE_CURL_SSLVERSION_TLSv1_0
#endif

/**
* CURLOPT_PINNEDPUBLICKEY was added in 7.39.0, released in November
* 2014. CURLE_SSL_PINNEDPUBKEYNOTMATCH was added in that same version.
*/
#if LIBCURL_VERSION_NUM >= 0x072c00
#define GIT_CURL_HAVE_CURLOPT_PINNEDPUBLICKEY 1
#define GIT_CURL_HAVE_CURLE_SSL_PINNEDPUBKEYNOTMATCH 1
#endif

/**
* CURL_HTTP_VERSION_2 was added in 7.43.0, released in June 2015.
*
* The CURL_HTTP_VERSION_2 alias (but not CURL_HTTP_VERSION_2_0) has
* always been a macro, not an enum field (checked on curl version
* 7.78.0)
*/
#if LIBCURL_VERSION_NUM >= 0x072b00
#define GIT_CURL_HAVE_CURL_HTTP_VERSION_2 1
#endif

/**
* CURLSSLOPT_NO_REVOKE was added in 7.44.0, released in August 2015.
*
* The CURLSSLOPT_NO_REVOKE is, has always been a macro, not an enum
* field (checked on curl version 7.78.0)
*/
#if LIBCURL_VERSION_NUM >= 0x072c00
#define GIT_CURL_HAVE_CURLSSLOPT_NO_REVOKE 1
#endif

/**
* CURLOPT_PROXY_CAINFO was added in 7.52.0, released in August 2017.
*/
#if LIBCURL_VERSION_NUM >= 0x073400
#define GIT_CURL_HAVE_CURLOPT_PROXY_CAINFO 1
#endif

/**
* CURLOPT_PROXY_{KEYPASSWD,SSLCERT,SSLKEY} was added in 7.52.0,
* released in August 2017.
*/
#if LIBCURL_VERSION_NUM >= 0x073400
#define GIT_CURL_HAVE_CURLOPT_PROXY_KEYPASSWD 1
#endif

/**
* CURL_SSLVERSION_TLSv1_3 was added in 7.53.0, released in February
* 2017.
*/
#if LIBCURL_VERSION_NUM >= 0x073400
#define GIT_CURL_HAVE_CURL_SSLVERSION_TLSv1_3 1
#endif

/**
* CURLSSLSET_{NO_BACKENDS,OK,TOO_LATE,UNKNOWN_BACKEND} were added in
* 7.56.0, released in September 2017.
*/
#if LIBCURL_VERSION_NUM >= 0x073800
#define GIT_CURL_HAVE_CURLSSLSET_NO_BACKENDS
#endif

/**
* Versions before curl 7.66.0 (September 2019) required manually setting the
* transfer-encoding for a streaming POST; after that this is handled
Expand Down
2 changes: 1 addition & 1 deletion git-cvsexportcommit.perl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/perl

use 5.008001;
require v5.26;
use strict;
use warnings;
use Getopt::Std;
Expand Down
2 changes: 1 addition & 1 deletion git-cvsimport.perl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# The head revision is on branch "origin" by default.
# You can change that with the '-o' option.

use 5.008001;
require v5.26;
use strict;
use warnings;
use Getopt::Long;
Expand Down
2 changes: 1 addition & 1 deletion git-cvsserver.perl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
####
####

use 5.008001;
require v5.26;
use strict;
use warnings;
use bytes;
Expand Down
2 changes: 1 addition & 1 deletion git-send-email.perl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# and second line is the subject of the message.
#

use 5.008001;
require v5.26;
use strict;
use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : ();
use Getopt::Long;
Expand Down
2 changes: 1 addition & 1 deletion git-svn.perl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/perl
# Copyright (C) 2006, Eric Wong <[email protected]>
# License: GPL v2 or later
use 5.008001;
require v5.26;
use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : ();
use strict;
use vars qw/ $AUTHOR $VERSION
Expand Down
6 changes: 3 additions & 3 deletions gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#
# This program is licensed under the GPLv2

use 5.008001;
require v5.26;
use strict;
use warnings;
# handle ACL in file access tests
Expand Down Expand Up @@ -1188,7 +1188,7 @@ sub evaluate_and_validate_params {
if ($search_use_regexp) {
$search_regexp = $searchtext;
if (!eval { qr/$search_regexp/; 1; }) {
(my $error = $@) =~ s/ at \S+ line \d+.*\n?//;
my $error = $@ =~ s/ at \S+ line \d+.*\n?//r;
die_error(400, "Invalid search regexp '$search_regexp'",
esc_html($error));
}
Expand Down Expand Up @@ -2700,7 +2700,7 @@ sub git_cmd {
# Try to avoid using this function wherever possible.
sub quote_command {
return join(' ',
map { my $a = $_; $a =~ s/(['!])/'\\$1'/g; "'$a'" } @_ );
map { my $a = $_ =~ s/(['!])/'\\$1'/gr; "'$a'" } @_ );
}

# get HEAD ref of given project as hash
Expand Down
Loading

0 comments on commit 4c1b7e3

Please sign in to comment.