Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Drop extra MIME-Version headers#55

Merged
derrickstolee merged 4 commits intogitgitgadget:mastergitgitgadget/gitgitgadget:masterfrom
dscho:double-mime-versiondscho/gitgitgadget:double-mime-versionCopy head branch name to clipboard
Dec 26, 2018
Merged

Drop extra MIME-Version headers#55
derrickstolee merged 4 commits intogitgitgadget:mastergitgitgadget/gitgitgadget:masterfrom
dscho:double-mime-versiondscho/gitgitgadget:double-mime-versionCopy head branch name to clipboard

Conversation

@dscho
Copy link
Member

@dscho dscho commented Dec 22, 2018

As explained in #38, sometimes we end up with mails that have multiple MIME-Version headers.

In order to avoid being filed away in the spam folder, let's just post-process the generated mails to remove duplicate MIME-Version headers.

Apparently, VS Code's internal formatting interferes with TSLint's
(resulting in the formatting seemingly reverting and then re-reverting
within half a second upon save). So let's disable VS Code's.

While at it, also define the alignment rules.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
... according to the new rules.

This (huge) commit best viewed with --color-words.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho dscho requested a review from derrickstolee December 22, 2018 00:28
When sending mails, the From: or Cc: headers can only contain ASCII
characters. Any non-ASCII characters need to be encoded, otherwise the
emails will be rejected by the Git mailing list.

With this change, the test now also finally learns to test inserting Cc:
lines in the GitGitGadget mode (rather than testing the non-GitGitGadget
one).

This fixes gitgitgadget#29

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
To allow or Cc:ing people whose names contain non-ASCII characters, we
tell `format-patch` to always add a `MIME-Version` header.

However, `format-patch` itself will add *another* such header if it
itself adds encoded non-ASCII characters to the From:, To:, or Cc:
header.

So let's just undo the damage here.

This fixes gitgitgadget#38

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho dscho force-pushed the double-mime-version branch from 50e4e2f to 3a0fd42 Compare December 22, 2018 00:30
@dscho
Copy link
Member Author

dscho commented Dec 22, 2018

Please note that this PR is based on #54 and therefore needs that PR to be merged first.

@derrickstolee derrickstolee merged commit a2d32d1 into gitgitgadget:master Dec 26, 2018
@dscho dscho deleted the double-mime-version branch December 26, 2018 17:15
@dscho
Copy link
Member Author

dscho commented Dec 26, 2018

@sunshineco any other headers you see that we should not duplicate, either (even if we don't do that right now anyway)?

@sunshineco
Copy link

sunshineco commented Dec 28, 2018

@sunshineco any other headers you see that we should not duplicate, either?

Based upon my reading of RFC 2045, the following message headers must be singletons:

Content-Description:
Content-ID:
Content-Transfer-Encoding:
Content-Type:
MIME-Version:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.