From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Genki Sky <sky@genki.is>, Brian Norris <briannorris@chromium.org>,
Christian Kujau <lists@nerdbynature.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Revert "scripts/setlocalversion: git: Make -dirty check more robust"
Date: Fri, 9 Nov 2018 11:55:10 +0900 [thread overview]
Message-ID: <CAK7LNATr-PgQn8OmPX835zS_mJdMnAw4odRX-+UdWJimgs++Rw@mail.gmail.com> (raw)
In-Reply-To: <20181107205514.GB12273@roeck-us.net>
On Thu, Nov 8, 2018 at 5:58 AM Guenter Roeck <linux@roeck-us.net> 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 <briannorris@chromium.org> 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
next prev parent reply other threads:[~2018-11-09 2:55 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-06 18:10 [PATCH] Revert "scripts/setlocalversion: git: Make -dirty check more robust" Guenter Roeck
2018-11-06 19:23 ` Genki Sky
2018-11-07 2:22 ` Brian Norris
2018-11-07 2:58 ` Christian Kujau
2018-11-07 3:10 ` Guenter Roeck
2018-11-07 4:00 ` Brian Norris
2018-11-07 18:44 ` Brian Norris
2018-11-07 20:43 ` Genki Sky
2018-11-07 20:55 ` Guenter Roeck
2018-11-07 21:07 ` Genki Sky
2018-11-07 21:18 ` Doug Anderson
2018-11-07 21:26 ` Genki Sky
2018-11-08 3:16 ` Brian Norris
2018-11-09 2:55 ` Masahiro Yamada
2018-11-09 18:34 ` [PATCH] scripts/setlocalversion: Improve -dirty check with git-status --no-optional-locks Brian Norris
2018-11-09 20:43 ` Guenter Roeck
2018-11-10 8:58 ` Genki Sky
2018-11-10 10:42 ` Andreas Schwab
2018-11-10 20:10 ` Genki Sky
2018-11-11 14:48 ` Alexander Kapshuk
2018-11-11 15:03 ` Alexander Kapshuk
2018-11-11 17:41 ` Genki Sky
2018-11-11 19:59 ` Alexander Kapshuk
2018-11-12 8:42 ` Alexander Kapshuk
2018-11-13 0:09 ` Brian Norris
2018-11-13 8:35 ` Alexander Kapshuk
2018-11-13 18:32 ` Brian Norris
2018-11-13 19:03 ` [PATCH v2] " Brian Norris
2018-11-13 19:47 ` Genki Sky
2018-11-13 22:03 ` Andreas Schwab
2018-11-15 2:06 ` Brian Norris
2018-11-15 2:11 ` [PATCH v3] " Brian Norris
2018-11-16 15:17 ` Masahiro Yamada
2018-11-19 14:42 ` Masahiro Yamada
2018-11-13 19:15 ` [PATCH] " Alexander Kapshuk
2018-11-09 2:55 ` Masahiro Yamada [this message]
2018-11-09 16:39 ` [PATCH] Revert "scripts/setlocalversion: git: Make -dirty check more robust" Masahiro Yamada
2018-11-09 16:39 ` Masahiro Yamada
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAK7LNATr-PgQn8OmPX835zS_mJdMnAw4odRX-+UdWJimgs++Rw@mail.gmail.com \
--to=yamada.masahiro@socionext.com \
--cc=briannorris@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=lists@nerdbynature.de \
--cc=sky@genki.is \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).