Skip to content

Commit 36b86c3

Browse files
sschuberthpombredanne
authored andcommitted
Ignore .repo directories created by the git-repo tool
git-repo [1] is used to manage multiple Git repositories. The .repo directory contains the consolidated Git histories of the managed projects (which are symlinked from the individual projects' .git repositories), so we should ignore the .repo directory just like the .git directory. However, the .repo directory also contains the source code to the git-repo tool itself. One might argue that this source code should be picked up during a scan, but then again the code of git-repo is not integrated into the deliverable / what is being built from the source code as git-repo is just a VCS tool, so a user is probably not interested in any license findings in git-repo. [1] https://code.google.com/p/git-repo/
1 parent cc0c972 commit 36b86c3

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

src/commoncode/ignore.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@ def get_ignores(location, include_defaults=True):
183183
'.hg': 'Default ignore: Mercurial artifact',
184184
'.hgignore' : 'Default ignore: Mercurial config artifact',
185185

186+
'.repo': 'Default ignore: Multiple Git repository artifact',
187+
186188
'.svn': 'Default ignore: SVN artifact',
187189
'.svnignore': 'Default ignore: SVN config artifact',
188190

686 Bytes
Binary file not shown.

tests/commoncode/test_ignore.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ def test_skip_vcs_files_and_dirs(self):
164164
('/vcs/.bzr', 'Default ignore: Bazaar artifact'),
165165
('/vcs/.git', 'Default ignore: Git artifact'),
166166
('/vcs/.hg', 'Default ignore: Mercurial artifact'),
167+
('/vcs/.repo', 'Default ignore: Multiple Git repository artifact'),
167168
('/vcs/.svn', 'Default ignore: SVN artifact'),
168169
('/vcs/CVS', 'Default ignore: CVS artifact'),
169170
('/vcs/_darcs', 'Default ignore: Darcs artifact'),

0 commit comments

Comments
 (0)