From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7811C28CC3 for ; Fri, 31 May 2019 09:24:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B1416266BD for ; Fri, 31 May 2019 09:24:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726002AbfEaJYv (ORCPT ); Fri, 31 May 2019 05:24:51 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:62473 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726240AbfEaJYv (ORCPT ); Fri, 31 May 2019 05:24:51 -0400 Received: from 79.184.255.225.ipv4.supernova.orange.pl (79.184.255.225) (HELO kreacher.localnet) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.213) id 639ee21c405379e7; Fri, 31 May 2019 11:24:48 +0200 From: "Rafael J. Wysocki" To: Masahiro Yamada Cc: linux-acpi@vger.kernel.org, "Rafael J. Wysocki" , Robert Moore , linux-kernel@vger.kernel.org, Len Brown , Erik Schmauss , devel@acpica.org Subject: Re: [PATCH v2] tools/power/acpi: exclude tools/* from .gitignore pattern Date: Fri, 31 May 2019 11:24:47 +0200 Message-ID: <67810452.HO43NzBsMe@kreacher> In-Reply-To: <1556718785-4417-1-git-send-email-yamada.masahiro@socionext.com> References: <1556718785-4417-1-git-send-email-yamada.masahiro@socionext.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On Wednesday, May 1, 2019 3:53:05 PM CEST Masahiro Yamada wrote: > tools/power/acpi/.gitignore has the following entries: > > acpidbg > acpidump > ec > > They are intended to ignore the following build artifacts: > > tools/power/acpi/acpidbg > tools/power/acpi/acpidump > tools/power/acpi/ec > > However, those .gitignore entries are effective not only for the > current directory, but also for any sub-directories. > > So, from the point of .gitignore grammar, the following check-in > directories are also considered to be ignored: > > tools/power/acpi/tools/acpidbg > tools/power/acpi/tools/acpidump > tools/power/acpi/tools/ec > > As the manual gitignore(5) says "Files already tracked by Git are not > affected", this is not a problem as far as Git is concerned. > > However, Git is not the only program that parses .gitignore because > .gitignore is useful to distinguish build artifacts from source files. > > For example, tar(1) supports the --exclude-vcs-ignore option. As of > writing, this option does not work perfectly, but it intends to create > a tarball excluding files specified by .gitignore. > > So, I believe it is better to fix this issue. > > You can fix it by prefixing the pattern with a slash; the leading slash > means the specified pattern is relative to the current directory. > > I also prefixed the "include" consistently. IMHO, it is safer when you > intend to ignore specific files or directories. > > Signed-off-by: Masahiro Yamada > --- > > Changes in v2: > - Add more information to the commit log to clarify my main motivation > > tools/power/acpi/.gitignore | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/tools/power/acpi/.gitignore b/tools/power/acpi/.gitignore > index cba3d99..f698a0e 100644 > --- a/tools/power/acpi/.gitignore > +++ b/tools/power/acpi/.gitignore > @@ -1,4 +1,4 @@ > -acpidbg > -acpidump > -ec > -include > +/acpidbg > +/acpidump > +/ec > +/include/ > I actually have applied this one, not the v1, sorry for the confusion.