Page MenuHomePhabricator

Always interpret the first line of commit messages as a title, even if it begins with a recognized label like "Test Plan:"
Closed, ResolvedPublic

Description

I attempted to create a review with the following data:

tests: change to criterion

Summary: criterion rocks

Test Plan: make check

Reviewers: xxx

Subscribers:

arc diff then complained:

  • Field "testPlan" occurs twice in commit message!
  • Invalid or missing field "Title": You must provide a revision title in the first line of your commit message.

You must resolve these errors to continue.

Do you want to edit the message? [Y/n] y

I could work around by changing the title to "unit tests: change to criterion" but in my opinion my choice for the title (and summary) should not be limited.

To me it looks like the regex is too greedy?

Event Timeline

In general you'll have to steer clear of any "label: field" in your titles.

I encountered this on a svn repository, but what do you do for git repositoires where "label: one line summary" is considered best practice for commit messages?

Can I workaround with manual "Title: " label?

@chad, what is the rationale behind processing the very first line of the git commit message (the title)? I can't find any reason to do so, the first line is always the title. If you just ignored the first line and not performed any extra arc processing, this issue would go away. What am I missing?

epriestley added a subscriber: epriestley.

I agree with that (and actually believed we already did that, see T11485 for me claiming that this is the current behavior). We'll change this.

See also T5028 for git shenanigans with %s / %b / %B which vaguely affect things here.

epriestley renamed this task from arc complains when tests is in the title to Always interpret the first line of commit messages as a title, even if it begins with a recognized label like "Test Plan:".Aug 22 2016, 8:48 AM
epriestley claimed this task.
epriestley triaged this task as Normal priority.
eadler added a project: Restricted Project.Sep 15 2016, 6:11 PM