[ports]: GH_TAGNAME: how to figure out this tagname on downloadable archives?

blubee blubeeme gurenchan at gmail.com
Tue Oct 17 09:37:09 UTC 2017


I expanded how to get the most up to date hash that works without going
through the hassle of cloning the repo.

Best

On Tue, Oct 17, 2017, 13:01 Yuri <yuri at rawbw.com> wrote:

> On 10/16/17 07:46, Mathieu Arnold wrote:
> > The first 7 digits may, or may not be sufficient. 7 is a magic number,
> > and should not be used. You should, instead, ask git directly what the
> > abbreviation should be with, for instance, `git log --abbrev-commit`.
> > It may give you a number that seven digits long, but it may very well
> > give you a longer one. I repeat, do not simply truncate a hash to its
> > first 7 digits, it may not be enough.
>
> `git log --abbrev-commit` solution has two shortcomings. It only protects
> against preexisting hash collisions and not from future collisions. So, the
> port's fetch can still spontaneously fail in the future as a result of a
> future commit that introduces a collision. Secondly, it requires the manual
> clone of the repository which is inconvenient. IMO, it's more practical to
> just use 7 digits, and switch to the full hash in an unlikely event when 7
> digits fail. So far, this method virtually always worked.
>
> Yuri
>
> _______________________________________________
> freebsd-ports at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-ports
> To unsubscribe, send any mail to "freebsd-ports-unsubscribe at freebsd.org"
>


More information about the freebsd-ports mailing list