diff options
author | Kevin Ballard <kevin@sb.org> | 2008-07-29 22:49:33 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-07-29 23:18:15 -0700 |
commit | 6b2fbaaffc5ec762eae5d23b58b1dc0a88e2275e (patch) | |
tree | c74662decbfde7365c0f7e449458dfa4d5598c0c /t/t4013/diff.format-patch_--inline_--stdout_initial..master^ | |
parent | Documentation: Remove mentions of git-svnimport. (diff) | |
download | tgif-6b2fbaaffc5ec762eae5d23b58b1dc0a88e2275e.tar.xz |
format-patch: Produce better output with --inline or --attach
This patch makes two small changes to improve the output of --inline
and --attach.
The first is to write a newline preceding the boundary. This is needed because
MIME defines the encapsulation boundary as including the preceding CRLF (or in
this case, just LF), so we should be writing one. Without this, the last
newline in the pre-diff content is consumed instead.
The second change is to always write the line termination character
(default: newline) even when using --inline or --attach. This is simply to
improve the aesthetics of the resulting message. When using --inline an email
client should render the resulting message identically to the non-inline
version. And when using --attach this adds a blank line preceding the
attachment in the email, which is visually attractive.
Signed-off-by: Kevin Ballard <kevin@sb.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.format-patch_--inline_--stdout_initial..master^')
-rw-r--r-- | t/t4013/diff.format-patch_--inline_--stdout_initial..master^ | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^ b/t/t4013/diff.format-patch_--inline_--stdout_initial..master^ index 95e9ea4c59..18a1110def 100644 --- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^ +++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..master^ @@ -19,6 +19,8 @@ This is the second commit. file2 | 3 --- 3 files changed, 5 insertions(+), 3 deletions(-) delete mode 100644 file2 + + --------------g-i-t--v-e-r-s-i-o-n Content-Type: text/x-patch; name="1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff" Content-Transfer-Encoding: 8bit @@ -75,6 +77,8 @@ Content-Transfer-Encoding: 8bit file1 | 3 +++ 2 files changed, 5 insertions(+), 0 deletions(-) create mode 100644 file1 + + --------------g-i-t--v-e-r-s-i-o-n Content-Type: text/x-patch; name="9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff" Content-Transfer-Encoding: 8bit |