簡體   English   中英

如何忽略git中分層交叉編譯的所有子目錄?

[英]How can I ignore all sub-directories of a hierarchical cross-compiling in git?

我基本上是在基於Unix的微內核的源代碼上工作。 每個庫或命令行實用程序都有一個針對不同體系結構(例如ARM,MIPS,PPC,x86等)的層次結構。我需要忽略這些目錄下的所有已編譯文件,但是由於每個子目錄都有許多子目錄lib / tool,我不能一目了然地忽略它們。 因此,我需要某種正則表達式。 到目前為止,我想到的最好的方法是:

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-*/*

如果我能以更一般的方式簡明扼要,我仍然很感興趣。 我也嘗試了以下幾行:

trunk/**/arm/((o|a|so|dll).)?le(.?*)/*
trunk/**/arm-((o|a|so|dll)-)?le(-?*)/*

它沒有用,我想這是由於括號。 由於我必須為每種架構重復進行第一個工作,因此有人可以幫助我總結這些模式嗎?

我想到的最好的方法如下:

trunk/**/arm/*le*/*
trunk/**/arm-*le*/*

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM