summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 747bbff)
raw | patch | inline | side by side (parent: 747bbff)
author | Jeff King <peff@peff.net> | |
Fri, 18 Jan 2008 14:20:10 +0000 (09:20 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 18 Jan 2008 21:33:57 +0000 (13:33 -0800) |
Since we are now sanity-checking the contents of patches and
refusing to send ones with long lines, this knob provides a
way for the user to override the new behavior (if, e.g., he
knows his SMTP path will handle it).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refusing to send ones with long lines, this knob provides a
way for the user to override the new behavior (if, e.g., he
knows his SMTP path will handle it).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-send-email.perl | patch | blob | history | |
t/t9001-send-email.sh | patch | blob | history |
diff --git a/git-send-email.perl b/git-send-email.perl
index 4e62c3f0e77387c0c8b2b24a9e4abd79fd18f7f4..6c72952fcc09934a4e710be733b4926a9e5a2658 100755 (executable)
--- a/git-send-email.perl
+++ b/git-send-email.perl
--envelope-sender Specify the envelope sender used to send the emails.
+ --no-validate Don't perform any sanity checks on patches.
+
EOT
exit(1);
}
my ($thread, $chain_reply_to, $suppress_from, $signed_off_cc, $cc_cmd);
my ($smtp_server, $smtp_server_port, $smtp_authuser, $smtp_authpass, $smtp_ssl);
my ($identity, $aliasfiletype, @alias_files, @smtp_host_parts);
+my ($no_validate);
my %config_bool_settings = (
"thread" => [\$thread, 1],
"dry-run" => \$dry_run,
"envelope-sender=s" => \$envelope_sender,
"thread!" => \$thread,
+ "no-validate" => \$no_validate,
);
unless ($rc) {
}
}
-foreach my $f (@files) {
- my $error = validate_patch($f);
- $error and die "fatal: $f: $error\nwarning: no patches were sent\n";
+if (!$no_validate) {
+ foreach my $f (@files) {
+ my $error = validate_patch($f);
+ $error and die "fatal: $f: $error\nwarning: no patches were sent\n";
+ }
}
if (@files) {
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index 1c4181022fdf59b49b4aed4be81230897d09b685..4f6822f2c5d717edd20cb97e49fad3017d34897e 100755 (executable)
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
! test -e commandline
'
+test_expect_success 'allow long lines with --no-validate' '
+ git send-email \
+ --from="Example <nobody@example.com>" \
+ --to=nobody@example.com \
+ --smtp-server="$(pwd)/fake.sendmail" \
+ --no-validate \
+ $patches longline.patch \
+ 2>errors
+'
+
test_done