Re: [ANNOUNCE] cgit v0.7
- From
- Lars Hjemli <hjemli@gmail.com>
- Date
- Nov 7, 2007, 10:52 UTC
- Message-ID
- <8c5c35580711070252g4b0c2914v6ecb73320a07ee83@mail.gmail.com>
- In-Reply-To
- <6b6419750711061039l26290561wd2abe07035a8679c@mail.gmail.com>
On Nov 6, 2007 7:39 PM, Patrick Aljord <patcito@gmail.com> wrote:
> Looks great, thanks for the new release.
Thanks!
> It would be great if when a commit message contains something such as > #1234 it would automatically link to the bug tracker page of that bug > (like Trac does) by preconfiguring the bugtracker URL.
Yeah, it shouldn't be to difficult either. We could just add a couple of repo-options to cgitrc, maybe something like this:
repo.bugtracker-regex=(#[0-9]+) repo.bugtracker-url=http://bugs.freedesktop.org/show_bug.cgi?id=%1
and then use regexec() combined with the interpolate() function in git to perform the substitution. There could also be similar global options, i.e.:
bugtracker-regex=(#[0-9]+) bugtracker-url=http://bugs.freedesktop.org/show_bug.cgi?id=%1
which would be used if the per-repo options weren't specified.
I'll put it on my todo-list (and patches are always appreciated).
-- larsh