Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp46824imu; Wed, 7 Nov 2018 12:44:49 -0800 (PST) X-Google-Smtp-Source: AJdET5ftMnSr7Nv2oFTo9uj9Xl0vmvQmbFUWzPuyyUpA8uRM7S2KILsRHiXH8EtM/lL2W8+ckdCl X-Received: by 2002:a17:902:7083:: with SMTP id z3-v6mr1794687plk.62.1541623489209; Wed, 07 Nov 2018 12:44:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541623489; cv=none; d=google.com; s=arc-20160816; b=ZYlXFgDsZgyS9znRU9ANxfqKJf39kyu3mklkq/4c51SZ1V1AZee9GJ4Gj9qB/6THpu eaxp3tt1frRTvo4rTj0YHMiJ5d/8yNAcrIuqyvWFHhXK95UHLVOU7nqttsmzYSNisc8O dDbIGcnQnDUIpKUqssHUbBajhqrs22pnFfiCyi+QRdS4yuWB5Lvst4D/n3qet6cxzw4M TLxeSP6p+GGHWKI9ls+wgkv/10mNMjcdFxTfLmxErMrRD1+BAY9l3t5kgMshWVI5svys faDTJ6CL2WzSXeHE6Oyu/atMySOHVnRh8a2OiOPNt6so3V2nhPM4DF/mBwTnejqLiAVs p7PA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:cc:to:subject:from :content-transfer-encoding:mime-version:message-id:date :dkim-signature; bh=7kk0dbgvtQa6Kn8uGx1P1uN3nr+4eIq/0WaI9maF7K8=; b=vOHQ3M4iiQTy690QUhRRyOBMc+/miBSCb5ENibzZEX/TD6tzMrS7ZqguXNmHbPUz7X Yzj5L5k3KOtwJxDJ4KzhoHdRRx+btZFZtW+Ck/YsIDAN56mMwmdOZNh7jYjL/mCRJbvh 2+R2WexjWlO5/G1r5d406Yuf/0JAJYcBgA290vrz7yKn2dMSZbLbVzK+jFbxWLiQ5bQg hK4WJVE5e+ouVdKRu8MDKMZjtEANC+uxCeofPkApWJEUDUcoEmHOq6GBFp2qoP8+R7dE p9qjxWZ2L65jQdQwz7/fUAlahuXA22k5H3UjNlxo+O/SQJLsKIzPBI4vjPgJBVl+/BMJ KJ6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@genki.is header.s=dkim header.b=mi3xGCEB; 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=genki.is Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d16-v6si1530143pgd.555.2018.11.07.12.44.32; Wed, 07 Nov 2018 12:44:49 -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=@genki.is header.s=dkim header.b=mi3xGCEB; 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=genki.is Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726902AbeKHGQD (ORCPT + 99 others); Thu, 8 Nov 2018 01:16:03 -0500 Received: from genki.is ([104.200.25.21]:43216 "EHLO genki.is" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726517AbeKHGQD (ORCPT ); Thu, 8 Nov 2018 01:16:03 -0500 Received: by genki.is (OpenSMTPD) with ESMTP id 707560a6; Wed, 7 Nov 2018 20:43:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=genki.is; h=date :message-id:mime-version:content-transfer-encoding:content-type :from:subject:to:cc:in-reply-to:references; s=dkim; bh=KC7lH5+j5 kdrLgP6UaMw+u32l6s=; b=mi3xGCEBpMZCFBDlKa1nAfQNRVNKVlMceD9pcqhM/ vVg5SlNX7gtChr8WrGhESCjivIqklKLQnFAtEcW2vGNP2YwRX/tl/jOh/l25AFqn O79tFWw6gm2xAOdjUK8k8mQ1fsX5BxUz6axZolNm5kFpT2IE4AJ1K4Aia8VKoAmk KbEsZBro7wRU4YqJAARCDb/AoGdw6xZYFH/pom34z/p6e9+RhF5MnMHVv+7oGCo8 dOSgGGUVRUS/UWmYw0wIsPslT+iZaIO0UkGFAYab0nAdK7QMFvFVgS/blHdWRXDj wEwPJ2H3cBmB+1BxNK003fCnXLuQcLELTzR/XT5PWhaTg== Received: by genki.is (OpenSMTPD) with ESMTPSA id b4859263 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Wed, 7 Nov 2018 20:43:58 +0000 (UTC) Date: Wed, 07 Nov 2018 12:43:58 -0800 Message-ID: <20181107.204358.257636196@genki.is> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 From: Genki Sky Subject: Re: [PATCH] Revert "scripts/setlocalversion: git: Make -dirty check more robust" To: Brian Norris , lists@nerdbynature.de Cc: Guenter Roeck , yamada.masahiro@socionext.com, Linux Kernel In-Reply-To: <20181107184435.GA168339@google.com> References: <1541527838-4585-1-git-send-email-linux@roeck-us.net> <20181106.192305.406697677@genki.is> <20181107022156.GA254567@google.com> <20181107184435.GA168339@google.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 7 Nov 2018 10:44:37 -0800, Brian Norris wrote: > 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. This option definitely seems to be what we want, good find. > Unfortunately, --no-optional-locks is new as of git 2.14. Dunno how new > of a git we expect people to use. Hmm, I'm not sure who can speak to this. Though if it's too recent, then based on earlier discussion, it sounds like something like this (hack) might work best: [ -w .git ] && touch .git/some-file-here 2>/dev/null && git update-index --refresh --unmerged >/dev/null if git diff-index --name-only HEAD | ...