From owner-freebsd-ports@freebsd.org Tue Oct 17 09:37:09 2017 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86C56E3463D for ; Tue, 17 Oct 2017 09:37:09 +0000 (UTC) (envelope-from gurenchan@gmail.com) Received: from mail-io0-x22f.google.com (mail-io0-x22f.google.com [IPv6:2607:f8b0:4001:c06::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 45B8D65B17; Tue, 17 Oct 2017 09:37:09 +0000 (UTC) (envelope-from gurenchan@gmail.com) Received: by mail-io0-x22f.google.com with SMTP id b186so1549159iof.8; Tue, 17 Oct 2017 02:37:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QzpMkAaLtYPLZ4gEX9KMm0m6HkYU4ImkjaDGTPuqdtc=; b=QGZ3vOjq8dKgF8bhn4x/sGBKATlBmmBPcykN0oa33vHQXAvbtsOZoV3nsvFxVCvXCh PzRLx+FmzyTgweeBFm9GxMApbWDVnIoMZx9ogOV+WzE7o5wgXDvDKmxsqH46fK7zi1yj v94vESkwaoWFg8GOXmWRGAq3CkiH0RVP4qNqbEJYjMeCoMuKCcKinmrW+JVwMYQ/z8uJ m4mKzOxXk4ojxNIHNmLoSycw1Y8N27fYnbGTGylds3a8JzHCMlZHWhrnPW3Kfaz3Xj8y EGcu3MMww+nBShIQzMw6OJX1iZHd24LdFYVGG3g5GKoGoSgyBzS+MrwfViMAO5q2EtHL X6nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QzpMkAaLtYPLZ4gEX9KMm0m6HkYU4ImkjaDGTPuqdtc=; b=YTSFLBDvt2wxEQI/85JuU4KMmNEcrq2VvvPw/3a861mUrGE5FA+d/2LjHYYLnADQMu CfvoPSqf3HQl03/MRSTtQhwUVAXDCyvxoDySFIb/PZz2/kwCdfiIFPPBguCtTRQtiPun JDmdOoOmg+5O9f/yNCNhWSRNs+w+5mjNlI+VSLsCMNbZyvihhXWyI21Kx5LxFnsK/OHk xSXwKg0DJ/D1ThkA0dbBy1uB8FP42QEu35N+jX5gxMWl+a2ECaBlx7E+s/4t/rU7qYif aoqo06Svz/ahtp8ekkJUwyiNv5vnoYXtwb3CWCXzmh0XPg3ytBF87fsK71ByPCvor1NK ECpg== X-Gm-Message-State: AMCzsaVfcSjtMJ67+/vo6li5m4eWKsg+Su2hydjedswPi2iz2b0ScXKR KzeGHxnBzdj0tcFt8VZX782IVyGK84Qr16QrsEo= X-Google-Smtp-Source: AOwi7QBMsMHeN7z/G9oQzirHvBxUsAnw2xNnbYCn4fVVeirM7++9S3NAG1hzN72iQUdiexFh/pkbBdyehwrZcii3DA8= X-Received: by 10.107.104.12 with SMTP id d12mr15125232ioc.296.1508233028426; Tue, 17 Oct 2017 02:37:08 -0700 (PDT) MIME-Version: 1.0 References: <20171015211940.44065925@thor.intern.walstatt.dynvpn.de> <19aa7f0a-3b52-5d34-cf80-136ef3fe489b@rawbw.com> <20171015214725.68e32dd9@thor.intern.walstatt.dynvpn.de> In-Reply-To: From: blubee blubeeme Date: Tue, 17 Oct 2017 09:36:57 +0000 Message-ID: Subject: Re: [ports]: GH_TAGNAME: how to figure out this tagname on downloadable archives? To: Yuri Cc: Mathieu Arnold , "O. Hartmann" , FreeBSD Ports Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Oct 2017 09:37:09 -0000 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 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@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-ports > To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org" >