aboutsummaryrefslogtreecommitdiff
path: root/git-send-email.perl
Commit message (Collapse)AuthorAge
* Merge branch 'maint'Junio C Hamano2008-07-25
|\ | | | | | | | | | | | | | | * maint: Makefile: fix shell quoting tests: propagate $(TAR) down from the toplevel Makefile index-pack.c: correctly initialize appended objects send-email: find body-encoding correctly
| * send-email: find body-encoding correctlyPeter Valdemar Mørch2008-07-25
| | | | | | | | | | | | | | | | | | | | | | | | In 8291db6 (git-send-email: add charset header if we add encoded 'From', 2007-11-16), "$1" is used from a regexp without using () to capture anything in $1. Later, when that value was used, it causes a warning about a variable being undefined, instead of using the correct value for comparison (not that it makes difference in the current code that does not do actual re-encoding). Signed-off-by: Peter Valdemar Mørch <peter@morch.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Make usage strings dash-lessStephan Beyer2008-07-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When you misuse a git command, you are shown the usage string. But this is currently shown in the dashed form. So if you just copy what you see, it will not work, when the dashed form is no longer supported. This patch makes git commands show the dash-less version. For shell scripts that do not specify OPTIONS_SPEC, git-sh-setup.sh generates a dash-less usage string now. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-send-email: Fix authenticating on some servers when using TLS.Robert Shearman2008-07-09
| | | | | | | | | | | | | | | | | | | | | | | | | | Send HELO again after a successful STARTTLS command to refresh the list of extensions. These may be different to what is returned over a clear connection (for example the AUTH command may be accepted over a secure connection, but not over a clear connection). Furthermore, this behaviour is recommended by RFC 2487 (http://www.ietf.org/rfc/rfc2487.txt). Signed-off-by: Robert Shearman <robertshearman@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-send-email: Do not attempt to STARTTLS more than onceThomas Rast2008-07-02
| | | | | | | | | | | | | | | | | | With the previous TLS patch, send-email would attempt to STARTTLS at the beginning of every mail, despite reusing the last connection. We simply skip further encryption checks after successful TLS initiation. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'kb/send-email-fifo'Junio C Hamano2008-07-01
|\ \ | | | | | | | | | | | | * kb/send-email-fifo: git-send-email: Accept fifos as well as files
| * | git-send-email: Accept fifos as well as filesKevin Ballard2008-06-25
| |/ | | | | | | | | | | | | | | | | | | When a fifo is given, validation must be skipped because we can't read the fifo twice. Ideally git-send-email would cache the read data instead of attempting to read twice, but for now just skip validation. Signed-off-by: Kevin Ballard <kevin@sb.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-send-email: prevent undefined variable warnings if no encryption is setThomas Rast2008-06-28
| | | | | | | | | | | | | | | | | | With the previous patch, not configuring any encryption (either on or off) would leave $smtp_encryption undefined. We simply set it to the empty string in that case. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-send-email: add support for TLS via Net::SMTP::SSLThomas Rast2008-06-25
|/ | | | | | | | | We do this by handing over the Net::SMTP instance to Net::SMTP::SSL, which avoids Net::SMTP::TLS and its weird error checking. This trick is due to Brian Evins. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-send-email: allow whitespace in addressee listPieter de Bie2008-06-08
| | | | | | | | | | | When interactively supplying addresses to send an email to with send-email, whitespace after the separation comma (as in 'list, jc') wasn't ignored. This meant that resolving of the alias ' jc' would fail, sending an email only to list. With this patch, the optional trailing whitespace is ignored. Signed-off-by: Pieter de Bie <pdebie@ai.rug.nl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* send-email: Allow the envelope sender to be set via configurationAsk Bjørn Hansen2008-06-08
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'jk/maint-send-email-compose'Junio C Hamano2008-05-21
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jk/maint-send-email-compose: send-email: rfc2047-quote subject lines with non-ascii characters send-email: specify content-type of --compose body Conflicts: t/t9001-send-email.sh Due to 065096c (git-send-email.perl: Handle shell metacharacters in $EDITOR properly, 2008-05-04) which is a backward incompatible change (but it makes handling of EDITOR consistent with other parts of the system), the test script t9001 had to be adjusted. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * send-email: rfc2047-quote subject lines with non-ascii charactersJeff King2008-05-21
| | | | | | | | | | | | | | | | | | | | | | We always use 'utf-8' as the encoding, since we currently have no way of getting the information from the user. This also refactors the quoting of recipient names, since both processes can share the rfc2047 quoting code. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * send-email: specify content-type of --compose bodyJeff King2008-05-21
| | | | | | | | | | | | | | | | | | | | | | If the compose message contains non-ascii characters, then we assume it is in utf-8 and include the appropriate MIME headers. If the user has already included a MIME-Version header, then we assume they know what they are doing and don't add any headers. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'hb/maint-send-email-quote-recipients'Junio C Hamano2008-05-21
|\ \ | | | | | | | | | | | | * hb/maint-send-email-quote-recipients: Fix recipient santitization
| * | Fix recipient santitizationHorst H. von Brand2008-05-21
| |/ | | | | | | | | | | | | Need to quote all special characters, not just the first one Signed-off-by: Horst H. von Brand <vonbrand@inf.utfsm.cl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'bd/tests'Junio C Hamano2008-05-14
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bd/tests: Rename the test trash directory to contain spaces. Fix tests breaking when checkout path contains shell metacharacters Don't use the 'export NAME=value' in the test scripts. lib-git-svn.sh: Fix quoting issues with paths containing shell metacharacters test-lib.sh: Fix some missing path quoting Use test_set_editor in t9001-send-email.sh test-lib.sh: Add a test_set_editor function to safely set $VISUAL git-send-email.perl: Handle shell metacharacters in $EDITOR properly config.c: Escape backslashes in section names properly git-rebase.sh: Fix --merge --abort failures when path contains whitespace Conflicts: t/t9115-git-svn-dcommit-funky-renames.sh
| * | git-send-email.perl: Handle shell metacharacters in $EDITOR properlyBryan Donlan2008-05-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the git-send-perl semantics for launching an editor when $GIT_EDITOR (or friends) contains shell metacharacters to match launch_editor() in builtin-tag.c. If we use the current approach (sh -c '$0 $@' "$EDITOR" files ...), we see it fails when $EDITOR has shell metacharacters: $ sh -x -c '$0 $@' "$VISUAL" "foo" + "$FAKE_EDITOR" foo "$FAKE_EDITOR": 1: "$FAKE_EDITOR": not found Whereas builtin-tag.c will invoke sh -c "$EDITOR \"$@\"". Thus, this patch changes git-send-email.perl to use the same method as the C utilities, and additionally updates t/t9001-send-email.sh to test for this bug. Signed-off-by: Bryan Donlan <bdonlan@fushizen.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | git-send-email: add a new sendemail.cc configuration variableMiklos Vajna2008-04-29
|/ / | | | | | | | | | | | | | | Some projects prefer to always CC patches to a given mailing list. 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>
* | send-email: Don't require to be called in a repositoryFrank Lichtenheld2008-03-15
|/ | | | | | | | | We might not have some configuration variables available, but if the user doesn't care about that, neither should we. Still use the repository if it is available, though. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* send-email: --no-signed-off-cc should suppress 'sob' ccJunio C Hamano2008-03-07
| | | | | | | | | | | | | | | | The logic to countermand suppression of Cc to the signers with a more explicit --signed-off-by option done in 6564828 (git-send-email: Generalize auto-cc recipient mechanism) suffers from a double-negation error. A --signed-off-cc option, when false, should actively suppress CC: to be generated out of S-o-b lines, and it should refrain from suppressing when it is true. It also fixes "(sob) Adding cc:" status output; earlier it included the line terminator LF inside '%s', which was totally bogus. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* send-email: fix In-Reply-To regressionJay Soffian2008-02-21
| | | | | | | | | | | | | | | | | Fix a regression introduced by 1ca3d6e (send-email: squelch warning due to comparing undefined $_ to "") where if the user was prompted for an initial In-Reply-To and didn't provide one, messages would be sent out with an invalid In-Reply-To of "<>" Also add test cases for the regression and the fix. A small modification was needed to allow send-email to take its replies from stdin if the environment variable GIT_SEND_EMAIL_NOTTY is set. Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'maint'Junio C Hamano2008-02-20
|\ | | | | | | | | | | | | | | * maint: Clarified the meaning of git-add -u in the documentation git-clone.sh: properly configure remote even if remote's head is dangling Documentation/git-stash: document options for git stash list send-email: squelch warning due to comparing undefined $_ to ""
| * send-email: squelch warning due to comparing undefined $_ to ""Jay Soffian2008-02-20
| | | | | | | | | | | | | | | | | | | | The check to see if initial_reply_to is defined was also comparing $_ to "" for a reason I cannot ascertain (looking at the commit which made the change didn't provide enlightenment), but if $_ is undefined, perl generates a warning. Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'mw/send-email'Junio C Hamano2008-02-11
|\ \ | | | | | | | | | | | | | | | | | | * mw/send-email: git-send-email: Better handling of EOF git-send-email: SIG{TERM,INT} handlers git-send-email: ssh/login style password requests
| * | git-send-email: Better handling of EOFMichael Witten2008-02-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before, when the user sent the EOF control character, the prompts would be repeated on the same line as the previous prompt. Now, repeat prompts display on separate lines. Signed-off-by: Michael Witten <mfwitten@mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | git-send-email: SIG{TERM,INT} handlersMichael Witten2008-02-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A single signal handler is used for both SIGTERM and SIGINT in order to clean up after an uncouth termination of git-send-email. In particular, the handler resets the text color (this cleanup was already present), turns on tty echoing (in case termination occurrs during a masked Password prompt), and informs the user of of any temporary files created by --compose. Signed-off-by: Michael Witten <mfwitten@mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | git-send-email: ssh/login style password requestsMichael Witten2008-02-05
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whilst convenient, it is most unwise to record passwords in any place but one's brain. Moreover, it is especially foolish to store them in configuration files, even with access permissions set accordingly. git-send-email has been amended, so that if it detects an smtp username without a password, it promptly prompts for the password and masks the input for privacy. Furthermore, the argument to --smtp-pass has been rendered optional. The documentation has been updated to reflect these changes. Signed-off-by: Michael Witten <mfwitten@mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-send-email: Generalize auto-cc recipient mechanism.David Brown2008-02-05
|/ | | | | | | | | | | | | | | | | | | | | | | | There are a few options to git-send-email to suppress the automatic generation of 'Cc' fields: --suppress-from, and --signed-off-cc. However, there are other times that git-send-email automatically includes Cc'd recipients. This is not desirable for all development environments. Add a new option --suppress-cc, which can be specified one or more times to list the categories of auto-cc fields that should be suppressed. If not specified, it defaults to values to give the same behavior as specified by --suppress-from, and --signed-off-cc. The categories are: self - patch sender. Same as --suppress-from. author - patch author. cc - cc lines mentioned in the patch. cccmd - avoid running the cccmd. sob - signed off by lines. all - all non-explicit recipients Signed-off-by: David Brown <git@davidb.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* send-email, fix breakage in combination with --composeGustaf Hendeby2008-01-21
| | | | | | | | | | | This fixes the subtile bug in git send-email that was introduced into git send-email with aa54892f5ada8282643dc7387b33261c7135d784 (send-email: detect invocation errors earlier), which caused no patches to be sent out if the --compose flag was used. Signed-off-by: Gustaf Hendeby <hendeby@isy.liu.se> Tested-by: Seth Falcon <seth@userprimary.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* send-email: add no-validate optionJeff King2008-01-18
| | | | | | | | | | 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>
* send-email: validate patches before sending anythingJeff King2008-01-18
| | | | | | | | | | | | | | We try to catch errors early so that we don't end up sending half of a broken patch series. Right now the only validation is checking that line-lengths are under the SMTP-mandated limit of 998. The validation parsing is very crude (it just checks each line length without understanding the mailbox format) but should work fine for this simple check. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* send-email: detect invocation errors earlierJeff King2008-01-18
| | | | | | | | | | | | We never even look at the command line arguments until after we have prompted the user for some information. So running "git send-email" without arguments would prompt for "from" and "to" headers, only to then die with "No patch files specified." Instead, let's try to do as much error checking as possible before getting user input. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Make git send-email accept $EDITOR with argumentsGustaf Hendeby2007-12-22
| | | | | | | | | Currently git send-email does not accept $EDITOR with arguments, eg, emacs -nw, when starting an editor to produce a cover letter. This patch changes this by letting the shell handle the option parsing. Signed-off-by: Gustaf Hendeby <hendeby@isy.liu.se> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'maint'Junio C Hamano2007-12-17
|\ | | | | | | | | | | * maint: git-send-email: avoid duplicate message-ids clone: correctly report http_fetch errors
| * git-send-email: avoid duplicate message-idsJeff King2007-12-17
| | | | | | | | | | | | | | | | | | We used to unconditionally add a message-id to the outgoing email without bothering to check if it already had one. Instead, let's use the existing one. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | send-email: do not muck with initial-reply-to when unset.Junio C Hamano2007-12-11
| | | | | | | | | | | | | | When not prompting, initial_reply_to can be left unset. Do not try to sanitize it and get useless warning. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-send-email.perl: Really add angle brackets to In-Reply-To if necessaryMike Hommey2007-12-09
| | | | | | | | | | | | | | | | | | 3803bcea tried to fix this, but it only adds the branckes when the given In-Reply-To begins and ends with whitespaces. It also didn't do anything to the --in-reply-to argument. Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Authenticate only once in git-send-emailWincent Colaiuta2007-11-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'maint'Junio C Hamano2007-11-20
|\ \ | |/ | | | | | | | | | | | | * 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
| * send-email: add transfer encoding header with content-typeJeff King2007-11-20
| | | | | | | | | | | | | | | | | | | | | | 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>
* | send-email: Don't add To: recipients to the Cc: headerAsk Bjørn Hansen2007-11-20
| | | | | | | | | | Signed-off-by: Ask Bjørn Hansen <ask@develooper.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-send-email: show all headers when sending mailDavid D. Kilzer2007-11-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'maint'Junio C Hamano2007-11-16
|\ \ | |/ | | | | | | | | | | | | | | * 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'
| * git-send-email: add charset header if we add encoded 'From'Jeff King2007-11-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'maint'Junio C Hamano2007-11-09
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * git-send-email: Change the prompt for the subject of the initial message.Benoit Sigoure2007-11-09
| | | | | | | | | | | | | | | | 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>
* | send-email: apply --suppress-from to S-o-b and cc-cmdUwe Kleine-König2007-11-07
| | | | | | | | | | | | 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>
* | git-send-email: add a new sendemail.to configuration variableMiklos Vajna2007-10-24
| | | | | | | | | | | | | | | | 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>
* | send-email --smtp-server-port: allow overriding the default portJunio C Hamano2007-09-26
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>