mirror of
https://expo.survex.com/repositories/expoweb/.git/
synced 2024-11-25 08:41:54 +00:00
Better fix ignores .git in all subdirs
This commit is contained in:
parent
8896417b7f
commit
645342dc96
@ -19,13 +19,9 @@ allfilenames = []
|
||||
detect = []
|
||||
clashes = []
|
||||
report = []
|
||||
for root, dirs, files in os.walk('.'):
|
||||
if root.startswith('./.git'):
|
||||
# Ignore .git directory.
|
||||
continue
|
||||
if root.startswith('./.hg'):
|
||||
# Ignore mercurial directory.
|
||||
continue
|
||||
exclude = set([".git",".hg"])
|
||||
for root, dirs, files in os.walk('.', topdown=True):
|
||||
dirs[:] = [d for d in dirs if d not in exclude] # modifies dirs in-place.
|
||||
for filename in files:
|
||||
if filename.endswith('~'):
|
||||
# Ignore automatically created backup files.
|
||||
|
Loading…
Reference in New Issue
Block a user