mirror of
https://github.com/frej/fast-export.git
synced 2025-11-02 01:05:48 +01:00
Ignore files and directories called .git
Git cannot track these files. Print a warning if encountering one. Fixes #166
This commit is contained in:
@@ -204,6 +204,9 @@ def export_file_contents(ctx,manifest,files,hgtags,encoding='',plugins={}):
|
||||
filename=file.decode(encoding).encode('utf8')
|
||||
else:
|
||||
filename=file
|
||||
if '.git' in filename.split(os.path.sep):
|
||||
sys.stderr.write('Ignoring file %s which cannot be tracked by git\n' % filename)
|
||||
continue
|
||||
file_ctx=ctx.filectx(file)
|
||||
d=file_ctx.data()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user