From: Junio C Hamano Date: Thu, 9 Dec 2010 18:35:21 +0000 (-0800) Subject: Merge branch 'ab/require-perl-5.8' into maint X-Git-Tag: v1.7.3.4~30 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/fa8f1ca2a4c4ab37cc322341d543885057b7957c?hp=-c Merge branch 'ab/require-perl-5.8' into maint * ab/require-perl-5.8: perl: use "use warnings" instead of -w perl: bump the required Perl version to 5.8 from 5.6.[21] --- fa8f1ca2a4c4ab37cc322341d543885057b7957c diff --combined git-relink.perl index c2a0ef8d5a,af2e305fa3..e136732cea --- a/git-relink.perl +++ b/git-relink.perl @@@ -6,7 -6,7 +6,7 @@@ # # Scan two git object-trees, and hardlink any common objects between them. - use 5.006; + use 5.008; use strict; use warnings; use Getopt::Long; @@@ -163,7 -163,7 +163,7 @@@ sub link_two_files($$) sub usage() { - print("Usage: git relink [--safe] [ ...] \n"); + print("Usage: git relink [--safe] ... \n"); print("All directories should contain a .git/objects/ subdirectory.\n"); print("Options\n"); print("\t--safe\t" . diff --combined git-send-email.perl index 81b2ea5633,d10d869912..c1d8edbdd3 --- a/git-send-email.perl +++ b/git-send-email.perl @@@ -1,4 -1,4 +1,4 @@@ - #!/usr/bin/perl -w + #!/usr/bin/perl # # Copyright 2002,2005 Greg Kroah-Hartman # Copyright 2005 Ryan Anderson @@@ -16,6 -16,7 +16,7 @@@ # and second line is the subject of the message. # + use 5.008; use strict; use warnings; use Term::ReadLine; @@@ -85,7 -86,6 +86,7 @@@ git send-email [options] "validate!" => \$validate, "format-patch!" => \$format_patch, "8bit-encoding=s" => \$auto_8bit_encoding, + "force" => \$force, ); unless ($rc) { @@@ -705,16 -703,6 +706,16 @@@ if (!defined $auto_8bit_encoding && sca default => "UTF-8"); } +if (!$force) { + for my $f (@files) { + if (get_patch_subject($f) =~ /\*\*\* SUBJECT HERE \*\*\*/) { + die "Refusing to send because the patch\n\t$f\n" + . "has the template subject '*** SUBJECT HERE ***'. " + . "Pass --force if you really want to send.\n"; + } + } +} + my $prompting = 0; if (!defined $sender) { $sender = $repoauthor || $repocommitter || ''; @@@ -908,7 -896,7 +909,7 @@@ sub sanitize_address sub valid_fqdn { my $domain = shift; - return !($^O eq 'darwin' && $domain =~ /\.local$/) && $domain =~ /\./; + return defined $domain && !($^O eq 'darwin' && $domain =~ /\.local$/) && $domain =~ /\./; } sub maildomain_net { @@@ -953,7 -941,7 +954,7 @@@ sub maildomain sub send_message { my @recipients = unique_email_list(@to); @cc = (grep { my $cc = extract_valid_address($_); - not grep { $cc eq $_ } @recipients + not grep { $cc eq $_ || $_ =~ /<\Q${cc}\E>$/ } @recipients } map { sanitize_address($_) } @cc); diff --combined git-svn.perl index 18cfb2466d,d2922245aa..757de82161 --- a/git-svn.perl +++ b/git-svn.perl @@@ -1,6 -1,7 +1,7 @@@ #!/usr/bin/env perl # Copyright (C) 2006, Eric Wong # License: GPL v2 or later + use 5.008; use warnings; use strict; use vars qw/ $AUTHOR $VERSION @@@ -1513,8 -1514,7 +1514,8 @@@ sub cmt_sha2rev_batch sub working_head_info { my ($head, $refs) = @_; - my @args = ('log', '--no-color', '--first-parent', '--pretty=medium'); + my @args = qw/log --no-color --no-decorate --first-parent + --pretty=medium/; my ($fh, $ctx) = command_output_pipe(@args, $head); my $hash; my %max; @@@ -3119,10 -3119,9 +3120,10 @@@ sub _rev_list sub check_cherry_pick { my $base = shift; my $tip = shift; + my $parents = shift; my @ranges = @_; my %commits = map { $_ => 1 } - _rev_list("--no-merges", $tip, "--not", $base); + _rev_list("--no-merges", $tip, "--not", $base, @$parents); for my $range ( @ranges ) { delete @commits{_rev_list($range)}; } @@@ -3298,7 -3297,6 +3299,7 @@@ sub find_extra_svn_parents # double check that there are no missing non-merge commits my (@incomplete) = check_cherry_pick( $merge_base, $merge_tip, + $parents, @$ranges, );