From: Ian Campbell Subject: Re: [PATCH V2] .gitignore: Add vim swap files Date: Fri, 10 May 2013 19:21:07 +0100 Message-ID: <1368210067.14715.11.camel@dagon.hellion.org.uk> References: <1368116223-31218-1-git-send-email-julien.grall@linaro.org> <518BCDCA.7030902@citrix.com> <20877.14289.660009.193592@mariner.uk.xensource.com> <518D3942.4060208@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <518D3942.4060208@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: Julien Grall , Ian Jackson , "xen-devel@lists.xensource.com" , "patches@linaro.org" List-Id: xen-devel@lists.xenproject.org On Fri, 2013-05-10 at 19:15 +0100, Andrew Cooper wrote: > On 10/05/13 19:09, Ian Jackson wrote: > > Andrew Cooper writes ("Re: [PATCH V2] .gitignore: Add vim swap files"): > >> On 09/05/13 17:17, Julien Grall wrote: > >>> Signed-off-by: Julien Grall > >>> > >>> Changes in v2: > >>> - update .hgignore > >> Much appreciated. > >> > >> Reviewed-by: Andrew Cooper > > Nacked-by: Ian Jackson > > > >>> diff --git a/.hgignore b/.hgignore > >>> index 6b432f7..4bd24fc 100644 > >>> --- a/.hgignore > >>> +++ b/.hgignore > >>> @@ -11,6 +11,7 @@ > >>> .*\.tar\.bz2$ > >>> .*\.tar\.gz$ > >>> .*~$ > >>> +.swp$ > > AIUI the format of .hgignore files is lines containing > > implicitly-^-anchored regexps. > > Nope - the documentation states otherwise > > http://www.selenic.com/mercurial/hgignore.5.html > > "Neither glob nor regexp patterns are rooted. A glob-syntax pattern of > the form *.c will match a file ending in .c in any directory, and a > regexp pattern of the form \.c$ will do the same. To root a regexp > pattern, start it with ^." > > > > > So this is wrong. Please copy the (hideous) syntax of the other > > entries. > > It is wrong because it failes to escape the literal . (which admittedly > I missed when reviewing it) > > Just because the rest of the .hgignore is wrong doesn't mean new > additions shouldn't be. I don't think anything is wrong with the current .hgignore, where the precise path matters the entries are explicitly anchored with ^ e.g. ^docs/figs/xenserver\.eps$ ^docs/html/.*$ ^docs/interface/WARNINGS$ etc Where only the extension or filename matters but not the path it isn't anchored, like the examples in the context of the patch. I fixed this is .*\.swp$ as I committed it, which is consistent with the existing entries even though the ".*" is technically redundant AFAICT. Ian.