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