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=-10.6 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 D6DA0C433E2 for ; Mon, 31 Aug 2020 06:53:18 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AF53F2072D for ; Mon, 31 Aug 2020 06:53:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AF53F2072D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kCdgI-0000fd-Gu; Mon, 31 Aug 2020 06:52:42 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kCdgH-0000fY-Hl for xen-devel@lists.xenproject.org; Mon, 31 Aug 2020 06:52:41 +0000 X-Inumbo-ID: d1722020-ca06-41cc-b20d-cd15a9e16523 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id d1722020-ca06-41cc-b20d-cd15a9e16523; Mon, 31 Aug 2020 06:52:40 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 32472ADD6; Mon, 31 Aug 2020 06:53:14 +0000 (UTC) Subject: Re: [PATCH] gitignore: Move ignores from global to subdirectories To: Elliott Mitchell Cc: xen-devel@lists.xenproject.org, Andrew Cooper , George Dunlap , Ian Jackson , Julien Grall , Konrad Rzeszutek Wilk , Stefano Stabellini , Wei Liu , Doug Goldstein , Daniel De Graaf References: <20200828025747.GA25246@mattapan.m5p.com> <20200831063748.GB1522@mattapan.m5p.com> From: Jan Beulich Message-ID: Date: Mon, 31 Aug 2020 08:52:45 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20200831063748.GB1522@mattapan.m5p.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On 31.08.2020 08:37, Elliott Mitchell wrote: > On Fri, Aug 28, 2020 at 09:24:41AM +0200, Jan Beulich wrote: >> On 28.08.2020 04:57, Elliott Mitchell wrote: >>> Subdirectories which have .gitignore files should not be referenced in >>> the global .gitignore files. Move several lines to appropriate subdirs. >>> >>> Signed-off-by: Elliott Mitchell >>> >>> --- >>> Hopefully the commit message covers it. When moved to the subdirectories >>> I'm using "./" as otherwise any file sharing the name in a deeper >>> subdirectory would be subject to the match. >> >> May I ask why this last sentence isn't part of the commit message? > > My thinking is it was pretty straightforward to figure out when looking. > Not /quite/ obvious enough to avoid commenting in e-mail, but not quite > obscure enough to have in commit message. This can go either way really. Your statements below really look to me as if this wasn't this obvious at all - ... > The .gitignore files aren't very consistent. I'm unsure whether it is > worth going after the inconsistencies, but it is certainly there. > > Before this I noticed xen/xsm/flask/.gitignore had "/policy.c", which > overlapped with "xen/xsm/flask/policy.*" in the top-level .gitignore. > Checking the documentation on .gitignore files if it simply had > "policy.c", git would have ignored any file name "policy.c" in > subdirectories. > > Is it better to prefix lines in the current directory with "./" versus > "/"? (I kind of like "./" since it looks like a relative path, but it > *isn't* actually a relative path) ... you even look to suggest here that there are two alternative forms which both have the same meaning. Personally I agree that ./ may be more "natural" to use than /, but the question then is what the conventions are. I can't answer this. > Should files in subdirectories also include "./"? If "no prefix at all" includes, as you say, also files in subdirs, then the answer probably is "depends". > Preferences in sorting? Alphabetical sorting is what we generally aim for here. Jan