Merge branch 'maint'

* maint:
  git-send-email: avoid duplicate message-ids
  clone: correctly report http_fetch errors
This commit is contained in:
Junio C Hamano 2007-12-17 20:49:42 -08:00
commit bd8ff616c9
2 changed files with 11 additions and 6 deletions

View file

@ -56,11 +56,12 @@ fi
http_fetch () {
# $1 = Remote, $2 = Local
curl -nsfL $curl_extra_args "$1" >"$2" ||
case $? in
126|127) exit ;;
*) return $? ;;
esac
curl -nsfL $curl_extra_args "$1" >"$2"
curl_exit_status=$?
case $curl_exit_status in
126|127) exit ;;
*) return $curl_exit_status ;;
esac
}
clone_dumb_http () {

View file

@ -580,7 +580,7 @@ sub send_message
$ccline = "\nCc: $cc";
}
my $sanitized_sender = sanitize_address($sender);
make_message_id();
make_message_id() unless defined($message_id);
my $header = "From: $sanitized_sender
To: $to${ccline}
@ -718,6 +718,9 @@ sub send_message
}
push @xh, $_;
}
elsif (/^Message-Id: (.*)/i) {
$message_id = $1;
}
elsif (!/^Date:\s/ && /^[-A-Za-z]+:\s+\S/) {
push @xh, $_;
}
@ -805,6 +808,7 @@ sub send_message
$references = "$message_id";
}
}
$message_id = undef;
}
if ($compose) {