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

Using multiple CC's in one line can fail #171

Copy link
Copy link
@SyntevoAlex

Description

@SyntevoAlex
Issue body actions

Before #163 the only way of specifying multiple CC's was to have them on the same line without trailing newline.

Some developers seem to have found that approach, for example:
gitgitgadget/git#450
gitgitgadget/git#428
gitgitgadget/git#415

However, doing so can "eat" the first CC, I myself ran into this problem in gitgitgadget/git#490

The problem is demonstrated by this test:

test("multiple CC's in one line", () => {
	const multipleCCs = "Some Dev <dev@example.com>, Some Other Dev <other@example.com>, Another Dev <another@example.com>";

	const encoded = PatchSeries.encodeSender(multipleCCs);

	const expected = "\"Some Dev\" <dev@example.com>, Some Other Dev <other@example.com>, Another Dev <another@example.com>"
	expect(encoded).toEqual(expected);
});

The results are (formatted for ease of reading)

"Some Dev <dev@example.com>, Some Other Dev" <other@example.com>,
Another Dev <another@example.com>

There, the first mail was quoted and therefore ignored. Also, it seems that neither GitGitGadget nor git format-patch expect multiple items in one go. It "worked" by coincidence.

One solution is to split multi-email Cc: footer in parsePullRequestBody(), so that the rest of GitGitGadget works with expected single-mail items. Splitting could be non-trivial, though, because in worst case there could be some name with a comma like "Someone, the team leader" <teamlead@example.com>.

An alternative solution is to forbid using multiple emails in one Cc:, simply detecting multiple @ should be good enough.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

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