Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hg ignore filename with no extension?

Mercurial can be configured to ignore files whose filename have a certain extension. For example, *.txt files can be ignored by adding this to ~/.hgignore:

syntax: glob
*.txt

How can I setup my .hgignore file to ignore files whose filenames have no extensions? For example, files named foobar and abracadabra should be ignored, but foobar.cpp and abracadabra.c should be tracked.

like image 964
Ashwin Nanjappa Avatar asked May 13 '13 07:05

Ashwin Nanjappa


1 Answers

Use regexp syntax instead since it's not possible with glob:

syntax: regexp
^[^.]+$

PS: you can add it right after your syntax: glob section

like image 170
zerkms Avatar answered Sep 28 '22 09:09

zerkms