From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-ot1-x342.google.com ([2607:f8b0:4864:20::342]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hQi36-0000Bu-LQ for barebox@lists.infradead.org; Wed, 15 May 2019 00:45:38 +0000 Received: by mail-ot1-x342.google.com with SMTP id t24so624524otl.12 for ; Tue, 14 May 2019 17:45:36 -0700 (PDT) MIME-Version: 1.0 References: <20190514021954.11834-1-gneukum1@gmail.com> <03cd78b8-74dd-9b78-c8fa-9fce756df101@pengutronix.de> <929b315f-248b-e5f9-7bc6-926d698611a5@mev.co.uk> In-Reply-To: <929b315f-248b-e5f9-7bc6-926d698611a5@mev.co.uk> From: Geordan Neukum Date: Wed, 15 May 2019 00:45:18 +0000 Message-ID: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCH v2] LICENSES: modify .gitignore files to be nonempty To: barebox@lists.infradead.org Cc: Ian Abbott , Ahmad Fatoum , u.kleine-koenig@pengutronix.de > If the .gitignore is currently only needed as a placeholder to avoid the > directory being empty, it could be a file that git does not care about > at all. Common names for such a file seem to include '.keep' and > '.gitkeep'. Fair enough. As Ahmad suggested earlier, I was attempting to force a cleanup of this file in the future as the new licenses are added. If we feel strongly enough against using a .gitignore for this purpose, I would be happy to resubmit the patch using another strategy. A README may also suffice as a visible reminder that this is only intended to be a temporary workaround. Best, Geordan On Tue, May 14, 2019 at 12:51 PM Ian Abbott wrote: > > On 14/05/2019 09:28, Ahmad Fatoum wrote: > > On 14/5/19 09:28, Ian Abbott wrote: > >> On 14/05/2019 03:19, Geordan Neukum wrote: > >>> The .gitignore files under the LICENSES/exceptions and LICENSES/other > >>> directories cannot have a size of 0 or else they are subject to removal > >>> by the make target 'distclean'. Modify the .gitignore files to > >>> ignore all files except for themselves. These .gitignores can be > >>> updated further or removed outright as new licenses are added to these > >>> directories in the future. > >>> > >>> Signed-off-by: Geordan Neukum > >>> --- > >>> LICENSES/exceptions/.gitignore | 4 ++++ > >>> LICENSES/other/.gitignore | 4 ++++ > >>> 2 files changed, 8 insertions(+) > >>> > >>> diff --git a/LICENSES/exceptions/.gitignore b/LICENSES/exceptions/.gitignore > >>> index e69de29bb..d5e7eacf3 100644 > >>> --- a/LICENSES/exceptions/.gitignore > >>> +++ b/LICENSES/exceptions/.gitignore > >>> @@ -0,0 +1,4 @@ > >>> +# Ignore everything in this directory > >>> +* > >>> +# Except for this file > >>> +!.gitignore > >>> diff --git a/LICENSES/other/.gitignore b/LICENSES/other/.gitignore > >>> index e69de29bb..d5e7eacf3 100644 > >>> --- a/LICENSES/other/.gitignore > >>> +++ b/LICENSES/other/.gitignore > >>> @@ -0,0 +1,4 @@ > >>> +# Ignore everything in this directory > >>> +* > >>> +# Except for this file > >>> +!.gitignore > >>> > >> > >> I may be missing something, but why not have just a comment line? > >> > > > > One side effect of doing it this way, that it's more likely to remind, > > whoever `git add`s files to these directories that the .gitignore needs to > > be removed (unless they have aliased git add to git add -f..). > > It may confuse some people for a while, until they figure out what is > preventing them from adding their file to git. > > > Personally, I am fine with both ways, but I would prefer the comment > > to say something along the lines of: > > > > # Placeholder as upstream checkpatch.pl requires this directory to exist > > # This file can be removed when new files are added > > If the .gitignore is currently only needed as a placeholder to avoid the > directory being empty, it could be a file that git does not care about > at all. Common names for such a file seem to include '.keep' and > '.gitkeep'. > > -- > -=( Ian Abbott || Web: www.mev.co.uk )=- > -=( MEV Ltd. is a company registered in England & Wales. )=- > -=( Registered number: 02862268. Registered address: )=- > -=( 15 West Park Road, Bramhall, STOCKPORT, SK7 3JZ, UK. )=- _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox