Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3467462imu; Wed, 7 Nov 2018 10:45:23 -0800 (PST) X-Google-Smtp-Source: AJdET5dIZPvf0ZFE/7HzA4IX89CKshpKWXoMthW35rRoHNEkvL9LwgWKhH0XJaZKe+h3Gk/9VBEJ X-Received: by 2002:a62:682:: with SMTP id 124-v6mr1338414pfg.161.1541616323675; Wed, 07 Nov 2018 10:45:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541616323; cv=none; d=google.com; s=arc-20160816; b=dzs1JxfeD5QFrHCyD0DruqisvXG9KWHNQjrglq1x0rnPjP72ZLtCJFQSWZnn1rvKZn 4mWSW1L+8yprBLu2jJUFmd8XremYWM4xbUCbSM/fpw8X28FOrDRzsmuqJgSooHroDQsw ZUCWFBbLG/HiUBNspdr+K2Ri0lydE+eteIPQKsh6oH2MOVCr2asvG4FnqFUHSOfM94Ns lpytBHMu/C1EdZm6u6ytOnFRWN9rXZtinH9fsNQN6HOHIouFVhCNTMn+jyehJ9pdYds4 CMJm0hKWpcQi/alxlwgA7gUzui8fewSPZbGoHfKgamGfVkZ1GmcIwMk74tu+YP0ArJrR CfVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=GeINo/k3+aADKtUi/bndFuPJ1JmVtBQL/rueuoH+QB0=; b=bjK7mrbho9ffifXYMJvKxfMHX8LW3qSHel8oqzLc9EepPy+hcxqR2Le8gdXazdORA+ +H2568Cir3I4wHWGoiv1AazzmsllJB1c/gNm9dOFyKzINlk9e1r8Qq1qdPOko69G7BRR 1twDDxaBzJqUKW0nHSmEV0F6W3DU3Iz6w09bPJxEpKK4ei2AL8Ty0srP40gL0g116OFH iu37z84dqxF2KMlhkJwcnhdRFOa03Dp7JwrfnKFrZDHGIhbs04xS2kBcoZrMW8sCwfG9 mltYac6A+b/5QhcuKQiNWOBvDeS30q6QDE3lDMypsnWM7tQJEMyVT8wqhb4g7jnABQ/Q xHLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=DZjWOdgp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id g24-v6si1216030pgh.188.2018.11.07.10.45.08; Wed, 07 Nov 2018 10:45:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=DZjWOdgp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1728190AbeKHEQU (ORCPT + 99 others); Wed, 7 Nov 2018 23:16:20 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:39118 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726068AbeKHEQU (ORCPT ); Wed, 7 Nov 2018 23:16:20 -0500 Received: by mail-pg1-f193.google.com with SMTP id r9-v6so7682938pgv.6 for ; Wed, 07 Nov 2018 10:44:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=GeINo/k3+aADKtUi/bndFuPJ1JmVtBQL/rueuoH+QB0=; b=DZjWOdgp7V5O9EXMFQQ9dcVpLocqT/AJCaY/dfTVfuPOAITptgW83c0/AADwopFvoW NwcBK+rjP3ldlsT0SIgWxU5gIlDywQOyIMdiWtMamMKxZ1Fn0NUFTKgvokQCCIe13J3W hRZUPn3d7odbIP2zQESrYlJ3hJsHLf29xP86I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=GeINo/k3+aADKtUi/bndFuPJ1JmVtBQL/rueuoH+QB0=; b=E1O6gEyPFxihFg9ALESdgy8IbmXbPUp47AM+G8V0KXJBxEWvF9nmmEhQccixP4nGui t+hRZegQSc3OqNSFaw8B2D1QNjvdQAZowSSrq5v0oARcYSIHW8LIbHNlWNDz7+VP63ym OVG/I/HTdw0CPElrMwJyXz2v133NEZrnOPfM4cCQ3PLzkLyyEVYrORNxxIGuMYXJyIA5 NKmignI25JhQJEDObRS2p1rO/syz7v7T3ySmn/W85lCT95JzGkfUCR1BTbkioIb7XP9B C3Z4ElGyZDJkrmTiO6r8kEo7yUuuhBDGBb+1IPQVGxrgLVJObtiPlTpZ8nHKX+m7zU0L hXAg== X-Gm-Message-State: AGRZ1gLskqFnLoSqI1BQo+16KxhT6R7bDyvebLSfEJu7yIfyBoVAHx7l P04+xISiN8VxwduHP0aaEgIk5mTRTzs= X-Received: by 2002:a62:250:: with SMTP id 77-v6mr1415929pfc.16.1541616282201; Wed, 07 Nov 2018 10:44:42 -0800 (PST) Received: from google.com ([2620:15c:202:1:299d:6b87:5478:d28a]) by smtp.gmail.com with ESMTPSA id 196-v6sm4406423pfc.71.2018.11.07.10.44.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Nov 2018 10:44:40 -0800 (PST) Date: Wed, 7 Nov 2018 10:44:37 -0800 From: Brian Norris To: lists@nerdbynature.de Cc: sky@genki.is, Guenter Roeck , yamada.masahiro@socionext.com, Linux Kernel Subject: Re: [PATCH] Revert "scripts/setlocalversion: git: Make -dirty check more robust" Message-ID: <20181107184435.GA168339@google.com> References: <1541527838-4585-1-git-send-email-linux@roeck-us.net> <20181106.192305.406697677@genki.is> <20181107022156.GA254567@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 06, 2018 at 08:00:36PM -0800, Brian Norris wrote: > On a different tangent: how about the --no-optional-locks (see > git(1))? Will this get you your "up-to-date" result without writing to > the .git directory? I've only read the documentation, but not tested > it. I think I can add a little to this: that option definitely avoids writing to the git index (thus, avoiding the problem that Guenter and I are trying to resolve) and the documentation suggests it should still get up-to-date index information (thus, avoiding the problem that Genki was trying to fix). So something like this would work (on top of the revert): diff --git a/scripts/setlocalversion b/scripts/setlocalversion index 71f39410691b..7dfe45badcca 100755 --- a/scripts/setlocalversion +++ b/scripts/setlocalversion @@ -74,7 +74,7 @@ scm_version() fi # Check for uncommitted changes - if git diff-index --name-only HEAD | grep -qv "^scripts/package"; then + if git --no-optional-locks status -uno --porcelain | grep -qv '^.. scripts/package'; then printf '%s' -dirty fi Unfortunately, --no-optional-locks is new as of git 2.14. Dunno how new of a git we expect people to use. Brian