From owner-dev-commits-doc-all@freebsd.org Tue Feb 16 16:07:15 2021 Return-Path: Delivered-To: dev-commits-doc-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C831153DDB3 for ; Tue, 16 Feb 2021 16:07:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dg5TH5LQFz4dpj; Tue, 16 Feb 2021 16:07:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (unknown [IPv6:2601:648:8681:1cb0:c001:9b37:78d5:88ee]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 51DBF20F11; Tue, 16 Feb 2021 16:07:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: git: fb36cfdfb2 - main - Add gitref macro to reference a git hash To: Sergio Carlavilla Delgado , doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org References: <202102132122.11DLMjKB065979@gitrepo.freebsd.org> From: John Baldwin Message-ID: <2aadd325-d83c-c4a3-abad-788e9c678009@FreeBSD.org> Date: Tue, 16 Feb 2021 08:07:14 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <202102132122.11DLMjKB065979@gitrepo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: dev-commits-doc-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the doc repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 16:07:15 -0000 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 > AuthorDate: 2021-02-13 21:16:57 +0000 > Commit: Sergio Carlavilla Delgado > 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