是否可以在.hgignore中使用植根的glob模式? [英] Is it possible to use rooted glob patterns in .hgignore?

查看:50
本文介绍了是否可以在.hgignore中使用植根的glob模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我更喜欢在.hgignore文件中使用glob语法,但是现在我需要创建一个rooted模式.我想忽略我的/static目录,而不是/assets/static.线

I prefer to use glob syntax in my .hgignore files, but now I need to create a rooted pattern. I want to ignore my /static directory, but not /assets/static. The line

static/

忽略两者.有没有办法建立根状的球形模式?如果没有,我可以切换到正则表达式,但是glob对于匹配路径名显得更加自然.

ignores both. Is there a way to do rooted glob patterns? If not, I can switch to regex, but glob just seems so much more natural for matching pathnames.

推荐答案

您无法创建全局模式-在

You cannot root your glob patterns — this is documented in the manpage. You can, however, switch back and forth between the glob and regexp syntax:

syntax: glob
*.pyc

syntax: regexp
^static/

syntax: glob
*~

这篇关于是否可以在.hgignore中使用植根的glob模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆