Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1312788pxk; Thu, 10 Sep 2020 12:12:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXtm4NIRDysmVrcRkh/ScVWbTT/ALr/a8d8iGscK4i5rmk9+LaGxCEsKdswDrLpU+otuZ0 X-Received: by 2002:a50:fa88:: with SMTP id w8mr11058012edr.179.1599765146674; Thu, 10 Sep 2020 12:12:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599765146; cv=none; d=google.com; s=arc-20160816; b=h4xvsVZXkz5aWRA54Xf7tEezXrCdjLTEaPLZ2zb2G0t4zkXtH/cwSBJvumnb3CCoUe NUc5EN8VeThhR2WR1IzDAZo/DRRAr5vf/vH2GZu9J8XZ9WACxYrfoWLMrbJqha+xFzLn XhSuJELQLjwdBqlyn0MSrdOL+xOWF0e6+EYKQzuua9wD1oklskZvYuDY1RlW0O+xxwvV hbHpqxCFx5YdY59Jtv+xRL2m6ftETv+GS1yQpad1Mp76b5avItcKD8cbKmUYb2a241Es yZN+yCWfMOgAB0akwbyX+hJAFcYWdNZ/JMnjfo9NYtcUpNbsckiwjxefrv1zSmp4XN5x 6AXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=1VaKTVNQG/MS4VikQREyIs4KXpzJcL7hR40l97tZdj0=; b=tRTBQMrvSFOUHOX8AGRj0+3+W/PIlGQWu/tb7wcOLb+4E5QQVm9G74/BXVmp7ubHJk 0mrRQxUo4Iw97MdmxAhMyWGTpnRLdgWogXar3DG1Vsn1WqrJiiR3N2Acu7B+ZUSc8UrS rLadjEqpVNMez5YDqts2cmcInIVyVZb5wfTQriSYBZSlqJqxLEGR9WKBQ1LYLMsVtmjG HLCIx7hZm/C+PeXHqd/GJPbTNH6vKzAJL4JdFfRCeN5pLjna3qZ+H+93trbXLzyyxJbX 6JlMul+4sk7ON5agAZiSjBPiwG2FglOgzM16JC87LYg73W2M/k1kE+ercYWHNQ4zbftm nPyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=VrdgTAIU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a12si3993491ejx.584.2020.09.10.12.12.02; Thu, 10 Sep 2020 12:12:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=VrdgTAIU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727801AbgIJTLU (ORCPT + 99 others); Thu, 10 Sep 2020 15:11:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726286AbgIJTGV (ORCPT ); Thu, 10 Sep 2020 15:06:21 -0400 Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16713C06179E for ; Thu, 10 Sep 2020 12:06:08 -0700 (PDT) Received: by mail-lf1-x144.google.com with SMTP id x77so4214452lfa.0 for ; Thu, 10 Sep 2020 12:06:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1VaKTVNQG/MS4VikQREyIs4KXpzJcL7hR40l97tZdj0=; b=VrdgTAIURoCk9FvstPzXIWoDxbgN9o0EAGwgNgOl+kp3kj+fHQ7bEn+5pylmp58MjZ 4F7I4q5nDLYkUCrr3rIv1XGnkTi8udCCbOVF7r13QTf9HXmphW+SDTBAph6TCuwHrY4M 9cCUFLnGVOQL8VJ4F7iR7YuIW6YFqwp3GcL7k= 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=1VaKTVNQG/MS4VikQREyIs4KXpzJcL7hR40l97tZdj0=; b=QYfjiQvmLh4+EbGzxTUSxzQm5pPk2DrTZHDZPX+iqBh+PDRts/zKN14sMf7x9oD7+o 1+2AO7YCX50fpV9HHVKaB3dYCCMHsauCxKGQuFerygomSEdwFTK4/rqwSmW8K6+DwKEm 1c551WUruGIH+C3CLOwxxa4kkfuUsNLBOWZdihMynan6PgDVShvD9HwvPsyXAqoTmSQe TcTgiNDQjDeLnhHzVe3uxpCkarw6+d7HNuiU3t0ClYQMfZ+aV4GaT6gdHh96vooRRuuG TG4CueFLpxa56z4qntciZk5YSD53JFfFu3O/Uw8JWcmIQ/zswKtmRYPr/3wSx39p81aB 5RIA== X-Gm-Message-State: AOAM530kRJwoUGrwylfdenjxirRV8Gta0XDvfLvz/v8iRMy6YhgcC//j 8qGY9A3pk3WJw1pEdS6pKK1rrmg67/dAbA== X-Received: by 2002:ac2:4e82:: with SMTP id o2mr5094786lfr.170.1599764765346; Thu, 10 Sep 2020 12:06:05 -0700 (PDT) Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com. [209.85.208.181]) by smtp.gmail.com with ESMTPSA id a1sm1815393ljb.64.2020.09.10.12.06.04 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Sep 2020 12:06:04 -0700 (PDT) Received: by mail-lj1-f181.google.com with SMTP id a15so9658943ljk.2 for ; Thu, 10 Sep 2020 12:06:04 -0700 (PDT) X-Received: by 2002:a2e:b704:: with SMTP id j4mr4966232ljo.329.1599764763554; Thu, 10 Sep 2020 12:06:03 -0700 (PDT) MIME-Version: 1.0 References: <20200910112701.13853-1-linux@rasmusvillemoes.dk> In-Reply-To: From: Brian Norris Date: Thu, 10 Sep 2020 12:05:51 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] scripts/setlocalversion: make git describe output more reliable To: Masahiro Yamada Cc: Rasmus Villemoes , Randy Dunlap , Guenter Roeck , Bhaskar Chowdhury , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 10, 2020 at 7:35 AM Masahiro Yamada wrote: > On Thu, Sep 10, 2020 at 8:57 PM Rasmus Villemoes > wrote: > > So in order to avoid `uname -a` output relying on such random details > > of the build environment which are rather hard to ensure are > > consistent between developers and buildbots, use an explicit > > --abbrev=15 option (and for consistency, also use rev-parse --short=15 > > for the unlikely case of no signed tags being usable). For the patch: Reviewed-by: Brian Norris > I agree that any randomness should be avoided. > > My question is, do we need 15-digits? ... > So, I think the conflict happens > only when we have two commits that start with the same 7-digits > in the _same_ release. Is this correct? For the rev-parse usage ("unlikely case where we have no signed tag"), the total number of objects is definitely relevant, and the man-page says: "unique prefix with at least length characters" i.e., it might be longer, if needed for uniqueness. For git-describe (the case where we have a tag to base off): "use digits, or as many digits as needed to form a unique object name" I'm not quite sure whether the uniqueness is including anything about the tag-relative prefix, but if not, then we have the same problem. At least, that's my reading of the situation. Brian