Delete the unused "committags" utility
[git-dm.git] / maintainerless
blobe69d44f1fea98ab290cf911b73a487721fc80f3c
1 #!/usr/bin/python
3 # Try to figure out which files in the kernel tree lack maintainers.
5 import glob, os
7 listed = set()
9 maint = open('MAINTAINERS', 'r')
10 for line in maint.readlines():
11 if line.startswith('F:'):
12 pat = line[3:].strip()
13 if pat == '*':
14 break
15 for start in glob.iglob(pat, recursive = True):
16 for path, dirs, files in os.walk(start):
17 for dir in dirs:
18 listed.add(os.path.join(path, dir))
19 for file in files:
20 listed.add(os.path.join(path, file))
21 else:
22 listed.add(start)
23 print('%d files' % len(listed))
24 for path, dirs, files in os.walk('.'):
25 for file in files:
26 full = os.path.join(path[2:], file) # zorch "./"
27 if full not in listed:
28 print(full)