summaryrefslogtreecommitdiff
path: root/git-send-email.perl
AgeCommit message (Collapse)Author
2007-11-22Authenticate only once in git-send-emailWincent Colaiuta
When using git-send-email with SMTP authentication sending a patch series would redundantly authenticate multiple times, once for each patch. In the worst case, this would actually prevent the series from being sent because the server would reply with a "5.5.0 Already Authenticated" status code which would derail the process. This commit teaches git-send-email to authenticate once and only once at the beginning of the series. Signed-off-by: Wincent Colaiuta <win@wincent.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-21Merge branch 'maint'Junio C Hamano
* maint: send-email: add transfer encoding header with content-type Doc fix for git-reflog: mention @{...} syntax, and <ref> in synopsys. config: clarify compression defaults config: correct core.loosecompression documentation
2007-11-21send-email: add transfer encoding header with content-typeJeff King
We add the content-type header only when we have non-7bit characters from the 'From' header, so we really need to specify the encoding (in other cases, where the commit text needed a content-type, git-format-patch will already have added the encoding header). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-20send-email: Don't add To: recipients to the Cc: headerAsk Bjørn Hansen
Signed-off-by: Ask Bjørn Hansen <ask@develooper.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-19git-send-email: show all headers when sending mailDavid D. Kilzer
As a git newbie, it was confusing to set an In-Reply-To header but then not see it printed when the git-send-email command was run. This patch prints all headers that would be sent to sendmail or an SMTP server instead of only printing From, Subject, Cc, To. It also removes the now-extraneous Date header after the "Log says" line. Added test to t/t9001-send-email.sh. Signed-off-by: David D. Kilzer <ddkilzer@kilzer.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-17Merge branch 'maint'Junio C Hamano
* maint: Update draft release notes for 1.5.3.6 Fix per-directory exclude handing for "git add" core.excludesfile clean-up Fix t9101 test failure caused by Subversion "auto-props" git-send-email: add charset header if we add encoded 'From'
2007-11-17git-send-email: add charset header if we add encoded 'From'Jeff King
We sometimes pick out the original rfc822 'From' header and include it in the body of the message. If the original author's name needs encoding, then we should specify that in the content-type header. If we already had a content-type header in the mail, then we may need to re-encode. The logic is there to detect this case, but it doesn't actually do the re-encoding. Signed-off-by: Jeff King <peff@peff.net> Acked-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-09Merge branch 'maint'Junio C Hamano
* maint: Start preparing for 1.5.3.6 git-send-email: Change the prompt for the subject of the initial message. SubmittingPatches: improve the 'Patch:' section of the checklist instaweb: Minor cleanups and fixes for potential problems stop t1400 hiding errors in tests Makefile: add missing dependency on wt-status.h refresh_index_quietly(): express "optional" nature of index writing better Fix sed string regex escaping in module_name. Avoid a few unportable, needlessly nested "...`...". git-mailsplit: with maildirs not only process cur/, but also new/ Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-09git-send-email: Change the prompt for the subject of the initial message.Benoit Sigoure
I never understood what this prompt was asking for until I read the actual source code. I think this wording is much more understandable. Signed-off-by: Benoit Sigoure <tsuna@lrde.epita.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-08send-email: apply --suppress-from to S-o-b and cc-cmdUwe Kleine-König
Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com> Cc: Ryan Anderson <ryan@michonline.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-25git-send-email: add a new sendemail.to configuration variableMiklos Vajna
Some projects prefer to receive patches via a given email address. In these cases, it's handy to configure that address once. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-26send-email --smtp-server-port: allow overriding the default portJunio C Hamano
You can use --smtp-server-port option to specify a port different from the default (typically, SMTP servers listen to smtp port 25 and ssmtp port 465). Users should be aware that sending auth info over non-ssl connections may be unsafe or just may not work at all depending on SMTP server config. Signed-off-by: Glenn Rempe <glenn@rempe.us> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-18Merge branch 'maint'Junio C Hamano
* maint: Document ls-files --with-tree=<tree-ish> git-commit: partial commit of paths only removed from the index git-commit: Allow partial commit of file removal. send-email: make message-id generation a bit more robust git-gui: Disable native platform text selection in "lists" git-gui: Paper bag fix "Commit->Revert" format arguments git-gui: Provide 'uninstall' Makefile target to undo an installation git-gui: Font chooser to handle a large number of font families git-gui: Make backporting changes from i18n version easier git-gui: Don't delete send on Windows as it doesn't exist git-gui: Trim trailing slashes from untracked submodule names git-gui: Assume untracked directories are Git submodules git-gui: handle "deleted symlink" diff marker git-gui: show unstaged symlinks in diff viewer git-gui: Avoid use of libdir in Makefile git-gui: Disable Tk send in all git-gui sessions git-gui: lib/index.tcl: handle files with % in the filename properly git-gui: Properly set the state of "Stage/Unstage Hunk" action git-gui: Fix detaching current branch during checkout git-gui: Correct starting of git-remote to handle -w option
2007-09-18send-email: make message-id generation a bit more robustJunio C Hamano
Earlier code took Unix time and appended a few random digits. If you are firing off many messages within a second, you could issue the same id to different messages, which is a no-no. If you send out 31 messages within a single second, with random integer taken out of rand(4200), you have about 10% chance of producing the same message ID. This fixes the problem by uses a prefix string which is constant-per-invocation (time and pid), with a serial number for each message generated by the process appended at the end. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-12Merge branch 'maint'Junio C Hamano
* maint: stash: end index commit log with a newline git-commit: Disallow amend if it is going to produce an empty non-merge commit git-send-email.perl: Add angle brackets to In-Reply-To if necessary Fix a test failure (t9500-*.sh) on cygwin
2007-09-12git-send-email.perl: Add angle brackets to In-Reply-To if necessaryDavid Kastrup
Although message-id by defintion should have surrounding angle brackets, there is no point forcing people to type them in. Signed-off-by: David Kastrup <dak@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-03send-email: Add support for SSL and SMTP-AUTHDouglas Stockwell
Allows username and password to be given using --smtp-user and --smtp-pass. SSL use is flagged by --smtp-ssl. These are backed by corresponding defaults in the git configuration file. This implements Junio's 'mail identity' suggestion in a slightly more generalised manner. --identity=$identity, backed by sendemail.identity indicates that the configuration subsection [sendemail "$identity"] should take priority over the [sendemail] section for all configuration values. Signed-off-by: Douglas Stockwell <doug@11011.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-01Merge branch 'jp/send-email-cc'Junio C Hamano
* jp/send-email-cc: git-send-email --cc-cmd
2007-08-22Reset terminal attributes when terminating git send-emailSean Estabrooks
If you break out of the prompts presented to you by git send-email your terminal can be left in an inconsistent state. Here we trap the interrupt signal and reset the terminal before exiting. Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-18git-send-email --cc-cmdJoe Perches
This new option allows an arbitrary "cmd" to generate per patch file specific "Cc:"s. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-10send-email: get all the quoting of realnames rightUwe Kleine-König
- when sending several mails I got a slightly different behaviour for the first mail compared to the second to last one. The reason is that $from was assigned in line 608 and was not reset when beginning to handle the next mail. - Email::Valid can only handle properly quoted real names, so quote arguments to extract_valid_address. This patch cleans up variable naming to better differentiate between sender of the mail and it's author. Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-10send-email: rfc822 forbids using <address@domain> without a non-empty "phrase"Uwe Kleine-König
Email::Valid does respect this considering such a mailbox specification invalid. b06c6bc831cbb9e9eb82fd3ffd5a2b674cd940d0 addressed the issue, but only if Email::Valid is available. Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-08-07send-email: teach sanitize_address to do rfc2047 quotingUwe Kleine-K,Av(Bnig
Without this patch I'm not able to properly send emails as I have a non-ascii character in my name. I removed the _rfc822 suffix from the function name as it now does more than rfc822 quoting. I dug through rfc822 to do the double quoting right. Only if that is not possible rfc2047 quoting is applied. Signed-off-by: Uwe Kleine-K,Av(Bnig <ukleinek@informatik.uni-freiburg.de> Cc: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-25send-email: Update regex parsing for pine aliasesKumar Gala
The pine address book format is tab seperated and the first field is the nickname/alias and the third field is the email address as per: http://www.washington.edu/pine/tech-notes/low-level.html Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-20Add GIT_EDITOR environment and core.editor configuration variablesAdam Roben
These variables let you specify an editor that will be launched in preference to the EDITOR and VISUAL environment variables. The order of preference is GIT_EDITOR, core.editor, EDITOR, VISUAL. [jc: added a test and config variable documentation] Signed-off-by: Adam Roben <aroben@apple.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-13send-email: discard blank around address in extract_valid_address as well.Stephen Rothwell
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-13make git-send-email.perl handle email addresses with no names when ↵Greg KH
Email::Valid is present When using git-send-email.perl on a changeset that has: Cc: <stable@kernel.org> in the body of the description, and the Email::Valid perl module is installed on the system, the email address will be deemed "invalid" for some reason (Email::Valid isn't smart enough to handle this?) and complain and not send the address the email. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-07git-send-email: allow an email alias for --fromMichael Hendricks
Signed-off-by: Michael Hendricks <michael@ndrix.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-28git-send-email: make options easier to configure.Adam Roben
This change makes git-send-email's behavior easier to modify by adding config equivalents for two more of git-send-email's flags. The mapping of flag to config setting is: --[no-]supress-from => sendemail.suppressfrom --[no-]signed-off-cc => sendemail.signedoffcc It renames the --threaded option to --thread/--no-thread; the config variable is also called sendemail.thread. Signed-off-by: Adam Roben <aroben@apple.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-27git-send-email: Add --threaded optionAdam Roben
The --threaded option controls whether the In-Reply-To header will be set on any emails sent. The current behavior is to always set this header, so this option is most useful in its negated form, --no-threaded. This behavior can also be controlled through the 'sendemail.threaded' config setting. Signed-off-by: Adam Roben <aroben@apple.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-24git-send-email: Do not make @-less message IDJunio C Hamano
When the original $from address fails to yield a valid-looking e-mail address, we created a bogus looking message ID, formatted like this: Message-Id: <11823357623688-git-send-email-> This commit fixes it by moving call to make_message_id() to where it matters, namely, before the $message_id is needed to be placed in the generated e-mail header; this has an important side effect of making it clear that $from is already available. Also throw in Sys::Hostname::hostname() just for fun, although I suspect that the code would never trigger due to the modified call sequence that makes sure $from is always available. This is based on a suggestion by Michael Hendricks. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-12Unquote From line from patch before comparing with given from address.Kristian Høgsberg
This makes --suppress-from actually work when you're unfortunate enough to have non-ASCII in your name. Also, if there's a match use the optionally RFC2047 quoted version from the email. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-05-18Merge branch 'maint'Junio C Hamano
* maint: Document core.excludesfile for git-add git-send-email: allow leading white space on mutt aliases
2007-05-17git-send-email: allow leading white space on mutt aliasesMichael Hendricks
mutt version 1.5.14 (perhaps earlier versions too) permits alias files to have white space before the 'alias' keyword. Signed-off-by: Michael Hendricks <michael@ndrix.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-10Git.pm: config_boolean() -> config_bool()Petr Baudis
This patch renames config_boolean() to config_bool() for consistency with the commandline interface and because it is shorter but still obvious. ;-) It also changes the return value from some obscure string to real Perl boolean, allowing for clean user code. Signed-off-by: Petr Baudis <pasky@suse.cz>
2007-04-26Merge branch 'maint'Junio C Hamano
* maint: Start preparing for 1.5.1.3 Sanitize @to recipients. git-svn: Ignore usernames in URLs in find_by_url Document --dry-run and envelope-sender for git-send-email. Allow users to optionally specify their envelope sender. Ensure clean addresses are always used with Net::SMTP Validate @recipients before using it for sendmail and Net::SMTP. Perform correct quoting of recipient names. Change the scope of the $cc variable as it is not needed outside of send_message. Debugging cleanup improvements Prefix Dry- to the message status to denote dry-runs. Document --dry-run parameter to send-email. git-svn: Don't rely on $_ after making a function call Fix handle leak in write_tree Actually handle some-low memory conditions Conflicts: RelNotes git-send-email.perl
2007-04-26Sanitize @to recipients.Robin H. Johnson
We need to sanitize @to as well to ensure that names are properly quoted. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-26Allow users to optionally specify their envelope sender.Robin H. Johnson
If your normal user is not the same user you are subscribed to a list with, then the default envelope sender used will cause your messages to bounce or silently vanish into the ether. This patch provides an optional parameter to set the envelope sender. To use it with the sendmail binary, you must have privileges to use the -f parameter! Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-26Ensure clean addresses are always used with Net::SMTPRobin H. Johnson
Always pass in clean addresses to Net::SMTP for the MAIL FROM, and use them on the SMTP non-quiet output as well. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-26Validate @recipients before using it for sendmail and Net::SMTP.Robin H. Johnson
Ensure that @recipients is only raw addresses when it is handed to the sendmail binary OR Net::SMTP, otherwise BCC cases might get an extra <, or wierd stuff might be passed to the exec. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-26Perform correct quoting of recipient names.Robin H. Johnson
Always perform quoting of the recipient names if they contain periods, previously only the author's address was treated this way. This stops sendmail binaries from exploding the name into bad addresses. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-26Change the scope of the $cc variable as it is not needed outside of ↵Robin H. Johnson
send_message. $cc is only used inside the send_message scope, so lets clean it out of the global scope. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-26Debugging cleanup improvementsRobin H. Johnson
The debug output is much more helpful if it has the parameters that were used. Pull the sendmail parameters into a seperate array for that, and also include similar data during the Net::SMTP case. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-26Prefix Dry- to the message status to denote dry-runs.Robin H. Johnson
While doing testing, it's useful to see that a dry run was actually done, instead of a real one. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-26Document --dry-run parameter to send-email.Robin H. Johnson
Looks like --dry-run was added to the code, but never to the --help output. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-16send-email: do not leave an empty CC: line if no cc is present.Junio C Hamano
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-04-06Avoid composing too long "References" header.YOSHIFUJI Hideaki / 吉藤英明
The number of characters in a line MUST be no more than 998 characters, and SHOULD be no more than 78 characters (RFC2822). It is much safer to fold the header by ourselves. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-19Make git-send-email aware of Cc: lines.J. Bruce Fields
In the Linux kernel, for example, it's common to include Cc: lines for cases when you want to remember to cc someone on a patch without necessarily claiming they signed off on it. Make git-send-email aware of these. Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-12git-send-email: configurable bcc and chain-reply-toAvi Kivity
Chain-reply-to is a personal perference, and is unlikely to change from patchset to patchset. Similarly, bcc is likely to have the same values every invocation is one likes to bcc oneself. So, allow both to be set via configuration variables. Signed-off-by: Avi Kivity <avi@qumranet.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-02-28git-send-email: abort/usage on bad optionMichael Coleman
Instead of proceeding, abort and give usage message when a bad option is seen. Signed-off-by: Junio C Hamano <junkio@cox.net>