[英]How can I ignore all sub-directories of a hierarchical cross-compiling in git?
I am basically working on the source code a Unix-based micro-kernel. 我基本上是在基于Unix的微内核的源代码上工作。 Each library or command-line utility has a hierarchical structure for different architectures such as ARM, MIPS, PPC, x86, and etc. I need to ignore all compiled files under these directories, but since there are many of these sub-directories for each lib/tool, I can't ignore them explicitly one by one.
每个库或命令行实用程序都有一个针对不同体系结构(例如ARM,MIPS,PPC,x86等)的层次结构。我需要忽略这些目录下的所有已编译文件,但是由于每个子目录都有许多子目录lib / tool,我不能一目了然地忽略它们。 So, I need some sort of regular expression.
因此,我需要某种正则表达式。 The best I came up with so far is the following:
到目前为止,我想到的最好的方法是:
trunk/**/arm/le/*
trunk/**/arm/le.*/*
trunk/**/arm/o.le/*
trunk/**/arm/o.le.*/*
trunk/**/arm/a.le/*
trunk/**/arm/a.le.*/*
trunk/**/arm/so.le/*
trunk/**/arm/so.le.*/*
trunk/**/arm/dll.le/*
trunk/**/arm/dll.le.*/*
trunk/**/arm-le/*
trunk/**/arm-le-*/*
trunk/**/arm-o-le/*
trunk/**/arm-o-le-*/*
trunk/**/arm-a-le/*
trunk/**/arm-a-le-*/*
trunk/**/arm-so-le/*
trunk/**/arm-so-le-*/*
I am still interested if I can concise them in a more general way. 如果我能以更一般的方式简明扼要,我仍然很感兴趣。 I tried the following lines as well:
我也尝试了以下几行:
trunk/**/arm/((o|a|so|dll).)?le(.?*)/*
trunk/**/arm-((o|a|so|dll)-)?le(-?*)/*
It didn't work, and I guess it's due to parenthesis. 它没有用,我想这是由于括号。 Since I have to repeat the first work around for every architecture, can anyone help me with summarizing these patterns?
由于我必须为每种架构重复进行第一个工作,因此有人可以帮助我总结这些模式吗?
The best I came up with is as follows: 我想到的最好的方法如下:
trunk/**/arm/*le*/*
trunk/**/arm-*le*/*
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.