Is it possible to use rooted glob patterns in .hgignore?

后端 未结 2 1952
孤街浪徒
孤街浪徒 2021-02-19 21:40

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



        
2条回答
  •  借酒劲吻你
    2021-02-19 22:09

    According to hgignore (5), it's not possible with globs:

    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 ^.

提交回复
热议问题