Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Feb 2021 08:07:14 -0800
From:      John Baldwin <jhb@FreeBSD.org>
To:        Sergio Carlavilla Delgado <carlavilla@FreeBSD.org>, doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org
Subject:   Re: git: fb36cfdfb2 - main - Add gitref macro to reference a git hash
Message-ID:  <2aadd325-d83c-c4a3-abad-788e9c678009@FreeBSD.org>
In-Reply-To: <202102132122.11DLMjKB065979@gitrepo.freebsd.org>
References:  <202102132122.11DLMjKB065979@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2/13/21 1:22 PM, Sergio Carlavilla Delgado wrote:
> The branch main has been updated by carlavilla:
> 
> URL: https://cgit.FreeBSD.org/doc/commit/?id=fb36cfdfb2dd5e9ebe217d820609d96fb73d8cc8
> 
> commit fb36cfdfb2dd5e9ebe217d820609d96fb73d8cc8
> Author:     Sergio Carlavilla Delgado <carlavilla@FreeBSD.org>
> AuthorDate: 2021-02-13 21:16:57 +0000
> Commit:     Sergio Carlavilla Delgado <carlavilla@FreeBSD.org>
> CommitDate: 2021-02-13 21:22:34 +0000
> 
>      Add gitref macro to reference a git hash
>      
>      With this extension a git hash can be easily referenced.
>      
>      The porters handbook versions chapter uses this extension
>      as an example in the FreeBSD 14.0 version table.
>      
>      An example of use
>      
>      gitref:hash[repository="src|doc|ports",length=hash-longitude]
>      
>      The repository should be src, doc or ports.
>      And if no length it's specified the macro will use 12 characters
>      of the specified hash.
>      
>      PR:             253050
>      Submitted by:   jhb@

Thanks!  My only suggestion would be that ideally we would not specify
the length inline as someday we might need to expand it as our repo
grows, and we'd want all the existing gitref's to expand at the same time
without having to go change the length fields in all of them explicitly
I think.  That is, I'd rather that when we need 13 as the length for src,
we can do that by making a single change to extension.rb and rebuilding
without having to touch all the places that use gitref like release notes,
etc.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2aadd325-d83c-c4a3-abad-788e9c678009>