Jump to content

Topic on Talk:Gerrit

Andrybak (talkcontribs)

While editing commons:MediaWiki talk:Gadget-Cat-a-lot.js, I was pleasantly surprised that the (relatively) new reply tools can automagically convert links to Gerrit/Gitiles into wikitext [[git:...]] during pasting. My input for pasting into the text field was generated by my userscript Gitiles: copy commit reference. The script supports https://gerrit.wikimedia.org/g/ because it's one of the few publicly available instances of Gitiles. This fact was originally just useful for testing, but has now become useful on a Wikimedia project, which is nice.

I see that Changelogs for MediaWiki are generated using Template:Git. Nevertheless, this userscript might be of interest to users of Gerrit/Gitiles.

Here's an example of such "commit reference":

57dac32 (Fix SpecialInvestigateTest to work with SQLite, 2024-06-04)

It is formatted according to Git's pretty format "reference". This format includes not only the commit's hash, but the subject line and a date to make it more robust to changes caused by commit rewrites (e.g. rebases and cherry-picks).

Reply to "Gitiles userscript"