Write-tree ignore .ugit files
This commit is contained in:
parent
fdfcfdbdad
commit
46a20c8b60
|
@ -7,8 +7,14 @@ def write_tree(directory="."):
|
|||
with Path.iterdir(directory) as it:
|
||||
for entry in it:
|
||||
full = f"{directory}/{entry.name}"
|
||||
if is_ignored(full):
|
||||
continue
|
||||
if entry.is_file(follow_symlinks=False):
|
||||
# TODO write the file to object store
|
||||
print(full)
|
||||
elif entry.is_dir(follow_symlinks=False):
|
||||
write_tree(full)
|
||||
|
||||
|
||||
def is_ignored(path):
|
||||
return ".ugit" in path.split("/")
|
||||
|
|
Loading…
Reference in New Issue