Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp247338imu; Thu, 8 Nov 2018 18:56:45 -0800 (PST) X-Google-Smtp-Source: AJdET5flPqmSzUle+o50Zwo1KdXt/ucdnsa02vi6muycMhrV9bdKtBs8M8gPIZ78fZEp5mjqQ7Tn X-Received: by 2002:a62:5146:: with SMTP id f67-v6mr7273900pfb.238.1541732205090; Thu, 08 Nov 2018 18:56:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541732205; cv=none; d=google.com; s=arc-20160816; b=iKRYh3rTvn4f737ZgTulvJIaWazrEwYqOfM6bzeY9eSqaz8Pmj6bZJKXZAiT2b/9mj /awDTRXKmSNIDaGbtcaBGn3ZwyaNB7YxPQKPisngjfmFvDtLuH4nZCAViB/nbcPog/Km BPh60ZEIzim5UQNpUVobj3W56HgQTu4SiP9HWILomXFo4eD84sz4DD8OY+5dFHADwc24 zc04Eac9kgKlX8kvcavC2nVOCjC+NBdvzHOocmGNRKxeg0+O6M+Jr2E52rikHCMm2Oup TdZyln0SRq9BgPXDnXz6YpZ7N1zKNMKIRnytGHwRgbUUYyGkD5q8gQXuXXc7FSpLIBf0 ijoA== 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:dkim-filter; bh=dBnlxv4harASQLYXrbyfH8uI/xrMQOx3T9+9ggt3B0g=; b=dp/6S58HbKwhwUE6lZOmjooNtGpGT1iMhcGmNNV+votVZ5V26y+lh4UuDu7skJYkGE m3RbCRJzOmkObJIwYE5165xXas4M8PdC+tvS6/8+zDnMMWPAdi15VUfisGoqcjr2PexX 1Vznh020wq4HMBNyx3o4umL7zJIqCadbLdgwTGqOoXRsMu7W3g/tXAzW0P4WcyjKgsK0 apip8GZZl1VexkyC61d3YVp1QYTrffzMVHEDqpCw17wK1O/66xBw/G61Rkay7AQbOMe5 Ro6sH2/Is0a6oQcCosH7PWT3DTXJLAA5EdiTXT9vg68N0AqqHCu6htaakXrhbEht8kuo ibQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=RaxJyx+C; 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 y6si3347912pgb.516.2018.11.08.18.56.28; Thu, 08 Nov 2018 18:56:45 -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=@nifty.com header.s=dec2015msa header.b=RaxJyx+C; 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 S1727549AbeKIMea (ORCPT + 99 others); Fri, 9 Nov 2018 07:34:30 -0500 Received: from conssluserg-05.nifty.com ([210.131.2.90]:25838 "EHLO conssluserg-05.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727390AbeKIMea (ORCPT ); Fri, 9 Nov 2018 07:34:30 -0500 Received: from mail-vs1-f54.google.com (mail-vs1-f54.google.com [209.85.217.54]) (authenticated) by conssluserg-05.nifty.com with ESMTP id wA92tl7w014637 for ; Fri, 9 Nov 2018 11:55:48 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-05.nifty.com wA92tl7w014637 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1541732148; bh=dBnlxv4harASQLYXrbyfH8uI/xrMQOx3T9+9ggt3B0g=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=RaxJyx+CZOigvZZhtc1pO+ZoaXi7KCNPY2TIXDARTle6h04iyKsYazUMy00OiK+ee 5/gIP/gRqKut+/vT+2IwpHvhFrTm2CFU1gwXU6/bdV2UNUzC9ov8pRF1YpogaPYpc0 TnfiarHkMsGV4DeQ3xNPz7lNCanLbH+9IEjISBvlE6OzTEBd0vPzvXL1o8fK/U9ljp Qv8/lXSueUBZpd36undLKB5IvXWR/5EwL+tNDc1u7HbzEV827Wvq03J5HqFU+tsF6D +0na85x1+05rWsY/FGQGQvEDQ6+AMJqvrKsbO4MfcFoBX9GQk1ranjqGE81vPigtde HiAaIzofYJe7A== X-Nifty-SrcIP: [209.85.217.54] Received: by mail-vs1-f54.google.com with SMTP id g68so216751vsd.11 for ; Thu, 08 Nov 2018 18:55:48 -0800 (PST) X-Gm-Message-State: AGRZ1gKcCMnMQTCJKqTM+B1ikQdPF/R+6Dp+DtiOxvA4ANCvNnlZp4mk fr24Z6ng4NZvpAXVWpTkvSTI/SBLvRfdjMEJU+c= X-Received: by 2002:a67:f1d6:: with SMTP id v22mr3054083vsm.181.1541732146834; Thu, 08 Nov 2018 18:55:46 -0800 (PST) MIME-Version: 1.0 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> <20181107205514.GB12273@roeck-us.net> In-Reply-To: <20181107205514.GB12273@roeck-us.net> From: Masahiro Yamada Date: Fri, 9 Nov 2018 11:55:10 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] Revert "scripts/setlocalversion: git: Make -dirty check more robust" To: Guenter Roeck Cc: Genki Sky , Brian Norris , Christian Kujau , 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, Nov 8, 2018 at 5:58 AM Guenter Roeck wrote: > > 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. I agree. We should avoid any write attempt to the source tree for any reason. > Ubuntu 16.04 ships with git version 2.7.4. > > Guenter -- Best Regards Masahiro Yamada