Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Apr 2021 21:07:38 +0100
From:      Chris Rees <crees@bayofrum.net>
To:        Enji Cooper <yaneurabeya@gmail.com>, Adriaan de Groot <adridg@FreeBSD.org>
Cc:        git@freebsd.org, developers@freebsd.org
Subject:   Re: One surprise in commit messages with git
Message-ID:  <F9E1D1FD-1FDC-4ADC-8568-826F33AA564F@bayofrum.net>
In-Reply-To: <AD6AC6E6-DBB8-4868-A5AE-E509283211E0@gmail.com>
References:  <2257024.hWAQu6Pgo9@beastie.bionicmutton.org> <AD6AC6E6-DBB8-4868-A5AE-E509283211E0@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help


On 22 April 2021 20:29:42 BST, Enji Cooper <yaneurabeya@gmail=2Ecom> wrote=
:
>
>> On Apr 22, 2021, at 8:00 AM, Adriaan de Groot <adridg@FreeBSD=2Eorg>
>wrote:
>>=20
>> There are still some surprises in the pipeline that processes
>commits=2E I
>> triggered one today with f365336113=2E In my commit message, I was
>fixing
>> something  in an earlier commit, so I wrote "(bla-di-bla, fixes)
>ports
>> 620d7678c8=2E"
>>=20
>> The commit itself refers to a PR (with the usual PR: line), 255260=2E
>So
>> Bugzilla automation takes over, and pastes the commit into a comment
>there=2E It
>> looks to me like Bugzilla takes "ports [0-9]+" in the commit message
>as an SVN
>> reference -- the message as-pasted as a comment in Bugzilla then
>surprisingly
>> - links to svnweb (which still exists)
>> - links to r620, which is 26 years old
>>=20
>> Overall harmless enough, but surprising for things that
>look-like-a-revision-
>> number but are a really a prefix to a longer hash=2E
>
>Hi ade,
>	This probably deserves a Bugzilla bug so folks on the git@ end can
>resolve the commit message parsing issue=2E
>Cheers,

Unfortunately, it's not really that simple- the revision parsing is done d=
ynamically, so if you remove that regex from Bugzilla, historical bugs with=
 SVN references will no longer be linked=2E  Whether that's a big deal or n=
ot=2E=2E=2E

I would suggest instead that the regex instead be "/ports \d\d\d\d\d+/"- t=
his would almost eliminate false positives with git, and preserve older lin=
ks, assuming that the first SVN commit is indeed after 99999=2E=2E=2E which=
 off the top of my head it definitely is!

Chris



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F9E1D1FD-1FDC-4ADC-8568-826F33AA564F>