Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp58130imu; Wed, 7 Nov 2018 12:58:05 -0800 (PST) X-Google-Smtp-Source: AJdET5fM+2vxzDPgphcbmRtLDP2Ucd8DR2Nm0t94+p9I72vwXbhOdCM4wB2CEoNbZwsBoQciOZXW X-Received: by 2002:a63:78cd:: with SMTP id t196mr1557528pgc.62.1541624285425; Wed, 07 Nov 2018 12:58:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541624285; cv=none; d=google.com; s=arc-20160816; b=hqlnM5+DAWtHdFhTIDTe99PLx9cyTKOKnNP4MbqNMi4fbtNEamTJLox1IilOyUfPOH sod/sPBUfiHWB1pDbxbKxMQORPNWnQxgddpJLH5q9lP0Hpoq/ZaEeJRs9Mx5J9KI1au7 Smbkb87lTYbDjxKMwm2KnqPhzalDDHNbtzKPe2qiKe7O/Y8/I14dz1C00cuQNLOVtyQ2 cZx8j14tAQpmVflZx+0KlqgW1oKP9a3PyDi6NgWQndZLpB7PpbnKKttqBi5VAZdBVdqs 6bZl+hADyKGB/IBV3Tcvx4ARPow+qPwYvFEAu5SVgP7+JYRYY3Okie52EKpQzPMTVNO/ CrYQ== 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=Qh8SUCvk0AdcvaB+4Ld0PBDQj8TxGPAmkD/Ka4xWprA=; b=WZov4BZZfy01JSj10YlTBO2kD1tXm5MUvqQ//ofq/u6TvJ6F5gmc39PnhzeG6rBQn3 B9Ybfl0Jxb6LCNflFkn86d9riIEcAjMZbKaLDHbzcS8EtBzJMOicvHh2iyhzTxBDgP/K UuAcJTgLNoRXLJWjqumQ+1rJQqsHBWlZdCsKIX3M5+PB4Cg+/3iqaYG7S5KhKlHsGQWI Ea7gAssNb74pXiYXmgywOum5QXZOXFZ06ZqIu9JL9kFMeFNbckPhaiR1QXKUQr8T5uKE p6blhr3rZ9WVhsLauU5+ExvJYTmgdEXkVIcuNCQbSujJb+nfOYRsxpayb8pEo7kaZeYV YwSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=vQcDvRiW; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g137-v6si1843281pfb.34.2018.11.07.12.57.50; Wed, 07 Nov 2018 12:58:05 -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=fail header.i=@gmail.com header.s=20161025 header.b=vQcDvRiW; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727414AbeKHG1Y (ORCPT + 99 others); Thu, 8 Nov 2018 01:27:24 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:41750 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726943AbeKHG1X (ORCPT ); Thu, 8 Nov 2018 01:27:23 -0500 Received: by mail-pf1-f195.google.com with SMTP id e22-v6so8215916pfn.8 for ; Wed, 07 Nov 2018 12:55:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Qh8SUCvk0AdcvaB+4Ld0PBDQj8TxGPAmkD/Ka4xWprA=; b=vQcDvRiW1jh7mdPL/oQ1ufq/GSQl/U+4Hp4pbU8+yqxwdyQn965ZYJKdnD+2d2cltq df+HWOjUmf9K/mebKUv3E3M9wYneb3gkSkXe7bJFhxz+Cy4f/tnT3cUZpvZw0oCmke7w 0dovzS1GDK446HjIa7npfAfdxx24uURROGwchjP8zMOKK7fAJWiF+BaTAj3QCDXn8FVE ncUyA3/vC9ZFNre3sP8N1npeXytxref+5K5sM5mYgucgMIaTORH1PX02aogElRyKPYyq 4QuMcOp8/N519Z1pZMBBqOg4ab6EgCiKPjyRcm2IcCsGeKpuNfEazIcEgjPm/SuCItkO uffw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=Qh8SUCvk0AdcvaB+4Ld0PBDQj8TxGPAmkD/Ka4xWprA=; b=HASmv9FHom8I9lupqwuVHijiAy0sU7oiCeoj4X7riV9RPi16vYZq1/GQwBKEeiJiIi zTIlsl20OH4K8llfoNLzapPFdfKQBF03gvNg5e4beQhZlv8xcDuZzsICqfFKoIOpqzd2 kGx4hqEYi9aXk6DDqAsrtCaSZ0S/EFR0nxVY4prRX+XDBBDf66zWpE6VL35CHkaJlWGQ hRIvVRjwyDJJQI5NwJDDtgFmzgtSCmH2ZmE/DsSbue8LmB4pGghDegt0wdHFiaBnXhYt owS1T+Mkvh0dcQsZS21iUSmbWiQjSArh8cppmdwNVbqYhzWOkLrodnVFyukl6riNGD10 yyHA== X-Gm-Message-State: AGRZ1gJNj4vkb2dldCopn97BwYjzpYOwtuZAmZrMVsYh5LjImn3v6udk Pl0A3TPJN+Xzzlp8wiD+XgM= X-Received: by 2002:a62:3501:: with SMTP id c1-v6mr1783806pfa.173.1541624116554; Wed, 07 Nov 2018 12:55:16 -0800 (PST) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id g21-v6sm1472895pgh.82.2018.11.07.12.55.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Nov 2018 12:55:15 -0800 (PST) Date: Wed, 7 Nov 2018 12:55:14 -0800 From: Guenter Roeck To: Genki Sky Cc: Brian Norris , lists@nerdbynature.de, yamada.masahiro@socionext.com, Linux Kernel Subject: Re: [PATCH] Revert "scripts/setlocalversion: git: Make -dirty check more robust" Message-ID: <20181107205514.GB12273@roeck-us.net> References: <1541527838-4585-1-git-send-email-linux@roeck-us.net> <20181106.192305.406697677@genki.is> <20181107022156.GA254567@google.com> <20181107184435.GA168339@google.com> <20181107.204358.257636196@genki.is> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181107.204358.257636196@genki.is> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 07, 2018 at 12:43:58PM -0800, Genki Sky wrote: > 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 | ... I do not think it is a good idea to create a random file in the .git directory under any circumstance, and much less so if an output directory was specified, no matter if the path is read-only or not. I also still think that it is a bad idea to touch the source tree if an output directory was specified. It defeats the purpose of specifying an output directory. Ubuntu 16.04 ships with git version 2.7.4. Guenter