Thread: gitweb gitlog broken links to email archive
The web display of our gitlog at http://git.postgresql.org/gitweb/?p=postgresql.git;a=log contains links to individual commits, which is great. It also tries (but fails) to link to email discussion. For instance, in one of the recent commit-messages it says: [...] Discussion: 20150112154026.GB2092@awork2.anarazel.de this links erroneously to http://git.postgresql.org/gitweb/?p=postgresql.git;a=object;h=20150112154026 instead of to http://www.postgresql.org/message-id/20150112154026.GB2092@awork2.anarazel.de This seems relatively easy to fix, and would make following the development process that much easier. thanks, Erik Rijkers
On Tue, Jan 13, 2015 at 12:59 PM, Erik Rijkers <er@xs4all.nl> wrote:
The web display of our gitlog at
http://git.postgresql.org/gitweb/?p=postgresql.git;a=log
contains links to individual commits, which is great.
It also tries (but fails) to link to email discussion.
For instance, in one of the recent commit-messages it says:
[...]
Discussion: 20150112154026.GB2092@awork2.anarazel.de
this links erroneously to
http://git.postgresql.org/gitweb/?p=postgresql.git;a=object;h=20150112154026
instead of to
http://www.postgresql.org/message-id/20150112154026.GB2092@awork2.anarazel.de
This seems relatively easy to fix, and would make following the development process that much easier.
I'm pretty sure this is not supported in gitweb. If it has some actual plugin functionality that would be something we could use but I'm not sure we want to fork github just for that functionality.
Previously committers have just pasted the full link I think - which would be easy enough to go back to. Certainly a lot easier than actually forking gitweb. And it would then also work for all other places that render the commits, such as github or just your personal "git log".
Erik Rijkers wrote: > this links erroneously to > http://git.postgresql.org/gitweb/?p=postgresql.git;a=object;h=20150112154026 > > instead of to > http://www.postgresql.org/message-id/20150112154026.GB2092@awork2.anarazel.de > > > This seems relatively easy to fix, and would make following the development process that much easier. How would you fix it? I realized some time ago that using bare message-ids in commit messages is not such a great idea, mostly because it's difficult to distinguish them mechanically from email addresses. Nowadays I (try to) prefix them with http://www.postgresql.org/message-id/ instead. This is of course already a valid URL, it's trivial to determine the message-id from the full string, and if you're manually copying and pasting from the git changelog to somewhere else you exactly know what portion to copy. See for example http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=0e5680f4737a9c6aa94aa9e77543e5de60411322 For some reason gitweb is not rendering those as links, though -- in that commit message, it also grabs a string that looks like a SHA1 value as a commit ID. Silly little thing ... github seems to do the right thing: https://github.com/postgres/postgres/commit/0e5680f4737a9c6aa94aa9e77543e5de60411322 -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
On Tue, January 13, 2015 22:02, Magnus Hagander wrote: > I'm pretty sure this is not supported in gitweb. If it has some actual > plugin functionality that would be something we could use but I'm not sure > we want to fork github just for that functionality. > No, forking doesn't seem a good idea :) I had a look at gitweb beforehand to see how it makes links. After all one would expect such a functionality to be configurable. But if you say if it's not there -- ah well, just bad luck. thanks, Erik Rijkers
On 2015-01-13 13:02:49 -0800, Magnus Hagander wrote: > Previously committers have just pasted the full link I think - which would > be easy enough to go back to. Perhaps it is not surprising, given that it's my commit that's referenced, but I find full links rather annoying. For one they're often too long for one line. For another the message id seem to have been a lot more stable over the years than actual archive links... But either way, if we agree that archive links are better, I can certainly live with that. I'd much rather have more people referencing discussions using archive links than fewer using just raw message ids. I've spent far too much time already trying to correlate commits with messages by looking at all emails from a timerange to find out what 'as discussed' refers to. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services
On Tue, Jan 13, 2015 at 1:16 PM, Erik Rijkers <er@xs4all.nl> wrote:
On Tue, January 13, 2015 22:02, Magnus Hagander wrote:
> I'm pretty sure this is not supported in gitweb. If it has some actual
> plugin functionality that would be something we could use but I'm not sure
> we want to fork github just for that functionality.
>
No, forking doesn't seem a good idea :)
I had a look at gitweb beforehand to see how it makes links. After all one would expect such a functionality to be
configurable. But if you say if it's not there -- ah well, just bad luck.
It might be - I haven't actually looked at it, so feel free to check :)
On Tue, Jan 13, 2015 at 2:01 PM, Andres Freund <andres@2ndquadrant.com> wrote:
-- On 2015-01-13 13:02:49 -0800, Magnus Hagander wrote:
> Previously committers have just pasted the full link I think - which would
> be easy enough to go back to.
Perhaps it is not surprising, given that it's my commit that's
referenced, but I find full links rather annoying. For one they're often
too long for one line. For another the message id seem to have been a
lot more stable over the years than actual archive links...
The old archives link definitely *should* still work. They will redirect to the new URL, but they should work. The fact that we have so many links around in places like this is exactly why we made sure it did that :)