Re: [PATCH] gitweb: Recognize *-to and Closes/Fixes trailers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Emma Brooks <me@xxxxxxxxxxx> writes:

> Commit trailers like "Thanks-to:", "Fixes:", and "Closes:" are fairly
> common, but gitweb didn't highlight them like other trailers.

Did you also sneak "cc" in without documenting/justifying?

When the re becomes this complex, it may not be a bad idea to switch
to "/ ignore most whitespaces /x" style for readability.

> -		if ($line =~ m/^\s*([A-Z][-A-Za-z]*-[Bb]y|C[Cc]): /) {
> +		if ($line =~ m/^\s*([A-Z][-A-Za-z]*-([Bb]y|[Tt]o)|C[Cc]|(Clos|Fix)es): /) {

		if ($line =~ m/^\s*([A-Z][-A-Za-z]*-([Bb]y|[Tt]o) |
				    C[Cc] | Closes | Fixes ):\s /x) { 

Well, I am sloppy and did not make it all that easier to read.

More experienced Perl folks certainly would be able to teach us a
much better convention to format things like this more readble.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux