citing git commits on Trac?

Ryan Schmidt ryandesign at macports.org
Tue Mar 28 22:13:34 UTC 2017


> On Mar 28, 2017, at 09:23, Rainer Müller <raimue at macports.org> wrote:
> 
> On 2017-03-28 15:34, Joshua Root wrote:
>> Documentation is available at <https://trac.macports.org/wiki/TracLinks>.
>> 
>> I find the easiest way to link to a commit is [committish/repo], e.g.
>> [42a4d67a/macports-ports]. Apparently you need at least 8 characters of
>> the hash, which is slightly annoying since GitHub shows only 7
>> characters in many places.
> 
> Unfortunately that minimum length of 8 characters is hardcoded [1].
> Apparently this limit was chosen to avoid linking "rfc1234" [2],
> although I do not see the reason why the [revnum/repo] form must have a
> minimum length...
> 
> As an alternative, the [changeset:42a4d67a/macports-ports] syntax works
> in any case, with 7 or even fewer characters.
> 
> Rainer
> 
> [1]
> https://trac.edgewall.org/browser/trunk/trac/versioncontrol/web_ui/changeset.py?rev=15468#L1020
> [2] https://trac.edgewall.org/ticket/4261

I don't see any reason not to always list the entire 40-character hash.

[cb373533029a92cbc2a41f7cb2c2704e05311a34/macports-ports]

Git and GitHub shows the full 40-character hash in many places; it is not more difficult to copy and paste that.



More information about the macports-dev mailing list