Defect #28322

Commit messages referencing issues should stop at line breaks

Added by Gregor Schmidt 5 months ago. Updated 5 months ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:SCM
Target version:Candidate for next minor release
Resolution: Affected version:

Description

When referencing an issue via commit message, the matching should stop at line breaks. Otherwise, unexpected things may happen.

E.g given the following commit message:

Initial version of Feature #123

Includes the following changes:

#124 some UI fixes
#125 still work in progress

the current implementation will mark #125 as fixed. I think, this is unexpected.

I've attached a patch, which replaces all \s with [[:blank:]] in the relevant regular expressions. Those matchers are equivalent, but [[:blank:]] does not match \r\n. I've also added a test.

This bug was identified by Holger Just from Planio.

0001-Don-t-match-commit-references-across-new-lines.patch Magnifier (2.37 KB) Gregor Schmidt, 2018-03-12 09:49

History

#1 Updated by Jan from Planio www.plan.io 5 months ago

  • Target version set to Candidate for next minor release

#2 Updated by Go MAEDA 5 months ago

Thank you for detecting and fixing this issue, it looks good to me.

But I am afraid that some people make use of the current behavior, like the following example.

Refs:
#1, #2, #3

Also available in: Atom PDF