Re: git: fb36cfdfb2 - main - Add gitref macro to reference a git hash

John Baldwin <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.doc
Message-ID <[email protected]>
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 <[email protected]>
> AuthorDate: 2021-02-13 21:16:57 +0000
> Commit:     Sergio Carlavilla Delgado <[email protected]>
> 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
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-doc-all
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.