Re: citing git commits on Trac?

2017-03-28 Thread Ryan Schmidt

> On Mar 28, 2017, at 09:23, Rainer Müller  wrote:
> 
> On 2017-03-28 15:34, Joshua Root wrote:
>> Documentation is available at .
>> 
>> 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.



Re: citing git commits on Trac?

2017-03-28 Thread Rainer Müller
On 2017-03-28 15:34, Joshua Root wrote:
> Documentation is available at .
> 
> 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


Re: citing git commits on Trac?

2017-03-28 Thread Joshua Root

On 2017-3-29 00:09 , Peter Danecek wrote:

Hi all,
do we have some convention on how to cite git commits on Trac?

I see that the "Commit Ticket Updater" uses the following format / and links to an URL on Trac, which then is redirected to GitHub.

Are we supposed to do the same manually when citing commits? Is there some 
support for this behaviour?

Thanks for the clarification!
~petr


Documentation is available at .

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.


- Josh


citing git commits on Trac?

2017-03-28 Thread Peter Danecek
Hi all,
do we have some convention on how to cite git commits on Trac?

I see that the "Commit Ticket Updater" uses the following format / and links to an URL on Trac, which then is redirected to 
GitHub.

Are we supposed to do the same manually when citing commits? Is there some 
support for this behaviour?

Thanks for the clarification!
~petr