1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-15 13:43:45 +01:00
git/Documentation
Paolo Bonzini 8d81408435 git-send-email: add --transfer-encoding option
The thread at http://thread.gmane.org/gmane.comp.version-control.git/257392
details problems when applying patches with "git am" in a repository with
CRLF line endings.  In the example in the thread, the repository originated
from "git-svn" so it is not possible to use core.eol and friends on it.

Right now, the best option is to use "git am --keep-cr".  However, when
a patch create new files, the patch application process will reject the
new file because it finds a "/dev/null\r" string instead of "/dev/null".

The problem is that SMTP transport is CRLF-unsafe.  Sending a patch by
email is the same as passing it through "dos2unix | unix2dos".  The newly
introduced CRLFs are normally transparent because git-am strips them. The
keepcr=true setting preserves them, but it is mostly working by chance
and it would be very problematic to have a "git am" workflow in a
repository with mixed LF and CRLF line endings.

The MIME solution to this is the quoted-printable transfer enconding.
This is not something that we want to enable by default, since it makes
received emails horrible to look at.  However, it is a very good match
for projects that store CRLF line endings in the repository.

The only disadvantage of quoted-printable is that quoted-printable
patches fail to apply if the maintainer uses "git am --keep-cr".  This
is because the decoded patch will have two carriage returns at the end
of the line.  Therefore, add support for base64 transfer encoding too,
which makes received emails downright impossible to look at outside
a MUA, but really just works.

The patch covers all bases, including users that still live in the late
80s, by also providing a 7bit content transfer encoding that refuses
to send emails with non-ASCII character in them.  And finally, "8bit"
will add a Content-Transfer-Encoding header but otherwise do nothing.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-25 14:00:15 -08:00
..
howto Documentation: typofixes 2014-11-04 13:14:44 -08:00
RelNotes Git 2.2.0-rc3 2014-11-21 12:10:56 -08:00
technical Documentation: typofixes 2014-11-04 13:14:44 -08:00
.gitattributes
.gitignore
asciidoc.conf
blame-options.txt
build-docdep.perl
cat-texi.perl
cmd-list.perl
CodingGuidelines Merge branch 'po/error-message-style' 2014-07-16 11:33:03 -07:00
config.txt git-send-email: add --transfer-encoding option 2014-11-25 14:00:15 -08:00
date-formats.txt
diff-config.txt
diff-format.txt
diff-generate-patch.txt
diff-options.txt
docbook-xsl.css
docbook.xsl
everyday.txto doc: add 'everyday' to 'git help' 2014-10-10 16:02:26 -07:00
fetch-options.txt
fix-texi.perl
git-add.txt
git-am.txt
git-annotate.txt
git-apply.txt
git-archimport.txt
git-archive.txt
git-bisect-lk2009.txt Documentation: typofixes 2014-11-04 13:14:44 -08:00
git-bisect.txt
git-blame.txt
git-branch.txt
git-bundle.txt
git-cat-file.txt
git-check-attr.txt
git-check-ignore.txt
git-check-mailmap.txt
git-check-ref-format.txt
git-checkout-index.txt
git-checkout.txt
git-cherry-pick.txt
git-cherry.txt
git-citool.txt
git-clean.txt Documentation: typofixes 2014-11-04 13:14:44 -08:00
git-clone.txt
git-column.txt
git-commit-tree.txt
git-commit.txt Merge branch 'jc/doc-commit-only' 2014-11-18 10:19:42 -08:00
git-config.txt
git-count-objects.txt
git-credential-cache--daemon.txt credential-cache: close stderr in daemon process 2014-09-16 11:11:58 -07:00
git-credential-cache.txt
git-credential-store.txt docs/credential-store: s/--store/--file/ 2014-11-06 09:51:08 -08:00
git-credential.txt
git-cvsexportcommit.txt
git-cvsimport.txt Documentation: typofixes 2014-11-04 13:14:44 -08:00
git-cvsserver.txt Documentation: typofixes 2014-11-04 13:14:44 -08:00
git-daemon.txt
git-describe.txt
git-diff-files.txt
git-diff-index.txt
git-diff-tree.txt
git-diff.txt
git-difftool.txt difftool: add support for --trust-exit-code 2014-10-28 10:36:57 -07:00
git-fast-export.txt Merge branch 'mh/doc-remote-helper-xref' 2014-11-19 13:47:56 -08:00
git-fast-import.txt doc: add some crossrefs between manual pages 2014-11-11 14:47:04 -08:00
git-fetch-pack.txt
git-fetch.txt
git-filter-branch.txt Documentation: typofixes 2014-11-04 13:14:44 -08:00
git-fmt-merge-msg.txt
git-for-each-ref.txt
git-format-patch.txt
git-fsck-objects.txt
git-fsck.txt
git-gc.txt
git-get-tar-commit-id.txt
git-grep.txt
git-gui.txt
git-hash-object.txt
git-help.txt
git-http-backend.txt
git-http-fetch.txt
git-http-push.txt
git-imap-send.txt Documentation: fix mismatched delimiters in git-imap-send 2014-10-13 13:35:37 -07:00
git-index-pack.txt
git-init-db.txt
git-init.txt Documentation: git-init: flesh out example 2014-08-08 13:17:42 -07:00
git-instaweb.txt
git-interpret-trailers.txt Documentation: typofixes 2014-11-04 13:14:44 -08:00
git-log.txt
git-ls-files.txt
git-ls-remote.txt
git-ls-tree.txt
git-mailinfo.txt
git-mailsplit.txt
git-merge-base.txt
git-merge-file.txt
git-merge-index.txt
git-merge-one-file.txt
git-merge-tree.txt
git-merge.txt
git-mergetool--lib.txt
git-mergetool.txt
git-mktag.txt
git-mktree.txt
git-mv.txt
git-name-rev.txt
git-notes.txt
git-p4.txt
git-pack-objects.txt
git-pack-redundant.txt
git-pack-refs.txt
git-parse-remote.txt
git-patch-id.txt
git-prune-packed.txt Documentation: adjust document title underlining 2014-10-13 13:35:18 -07:00
git-prune.txt
git-pull.txt
git-push.txt Merge branch 'po/everyday-doc' 2014-10-16 14:16:42 -07:00
git-quiltimport.txt Documentation: adjust document title underlining 2014-10-13 13:35:18 -07:00
git-read-tree.txt
git-rebase.txt Merge branch 'so/rebase-doc-fork-point' 2014-10-14 10:49:07 -07:00
git-receive-pack.txt signed push: allow stale nonce in stateless mode 2014-09-17 15:19:54 -07:00
git-reflog.txt
git-relink.txt
git-remote-ext.txt doc: add some crossrefs between manual pages 2014-11-11 14:47:04 -08:00
git-remote-fd.txt doc: add some crossrefs between manual pages 2014-11-11 14:47:04 -08:00
git-remote-helpers.txto
git-remote-testgit.txt
git-remote.txt
git-repack.txt
git-replace.txt Merge branch 'cc/replace-graft' 2014-07-27 15:14:18 -07:00
git-request-pull.txt
git-rerere.txt
git-reset.txt
git-rev-list.txt pretty: provide a strict ISO 8601 date format 2014-08-29 12:37:02 -07:00
git-rev-parse.txt Documentation: typofixes 2014-11-04 13:14:44 -08:00
git-revert.txt
git-rm.txt
git-send-email.txt git-send-email: add --transfer-encoding option 2014-11-25 14:00:15 -08:00
git-send-pack.txt send-pack: take refspecs over stdin 2014-08-26 12:58:02 -07:00
git-sh-i18n--envsubst.txt
git-sh-i18n.txt
git-sh-setup.txt
git-shell.txt
git-shortlog.txt
git-show-branch.txt
git-show-index.txt
git-show-ref.txt
git-show.txt
git-stage.txt Documentation: adjust document title underlining 2014-10-13 13:35:18 -07:00
git-stash.txt
git-status.txt doc: fix 'git status --help' character quoting 2014-10-19 20:45:16 -07:00
git-stripspace.txt
git-submodule.txt Merge branch 'mc/doc-submodule-sync-recurse' into maint 2014-07-10 11:08:31 -07:00
git-svn.txt Documentation: typofixes 2014-11-04 13:14:44 -08:00
git-symbolic-ref.txt
git-tag.txt Merge branch 'maint-2.0' into maint 2014-10-07 13:40:51 -07:00
git-tools.txt
git-unpack-file.txt
git-unpack-objects.txt
git-update-index.txt Documentation: typofixes 2014-11-04 13:14:44 -08:00
git-update-ref.txt
git-update-server-info.txt
git-upload-archive.txt
git-upload-pack.txt
git-var.txt
git-verify-commit.txt
git-verify-pack.txt
git-verify-tag.txt
git-web--browse.txt
git-whatchanged.txt
git-write-tree.txt
git.txt Sync with Git 2.1.3 2014-10-29 10:50:17 -07:00
gitattributes.txt Documentation: typofixes 2014-11-04 13:14:44 -08:00
gitcli.txt
gitcore-tutorial.txt doc: add 'everyday' to 'git help' 2014-10-10 16:02:26 -07:00
gitcredentials.txt
gitcvs-migration.txt doc: add 'everyday' to 'git help' 2014-10-10 16:02:26 -07:00
gitdiffcore.txt
giteveryday.txt doc: add 'everyday' to 'git help' 2014-10-10 16:02:26 -07:00
gitglossary.txt doc: add 'everyday' to 'git help' 2014-10-10 16:02:26 -07:00
githooks.txt Documentation: typofixes 2014-11-04 13:14:44 -08:00
gitignore.txt Merge branch 'nd/gitignore-trailing-whitespace' into maint 2014-11-12 12:13:12 -08:00
gitk.txt
gitmodules.txt
gitnamespaces.txt
gitremote-helpers.txt doc: add some crossrefs between manual pages 2014-11-11 14:47:04 -08:00
gitrepository-layout.txt
gitrevisions.txt
gittutorial-2.txt Merge branch 'sn/tutorial-status-output-example' 2014-11-19 13:47:59 -08:00
gittutorial.txt Merge branch 'sn/tutorial-status-output-example' 2014-11-19 13:47:59 -08:00
gitweb.conf.txt
gitweb.txt
gitworkflows.txt
glossary-content.txt Documentation: typofixes 2014-11-04 13:14:44 -08:00
howto-index.sh
i18n.txt
install-doc-quick.sh
install-webdoc.sh
line-range-format.txt
mailmap.txt
Makefile Merge branch 'bc/asciidoctor' 2014-10-29 10:07:40 -07:00
manpage-1.72.xsl
manpage-base-url.xsl.in
manpage-base.xsl
manpage-bold-literal.xsl
manpage-normal.xsl
manpage-quote-apos.xsl
manpage-suppress-sp.xsl
merge-config.txt
merge-options.txt
merge-strategies.txt
pretty-formats.txt Merge branch 'bc/asciidoc-pretty-formats-fix' into maint 2014-10-29 10:35:10 -07:00
pretty-options.txt
pull-fetch-param.txt
rev-list-options.txt Documentation: typofixes 2014-11-04 13:14:44 -08:00
revisions.txt
sequencer.txt
SubmittingPatches SubmittingPatches: final submission is To: maintainer and CC: list 2014-11-13 10:39:24 -08:00
urls-remotes.txt
urls.txt
user-manual.conf
user-manual.txt