if args.__tracked__:
print("Would remove tracked file {} and its signature".format(f))
else:
print("Removing tracked file {} and its signature".format(f))
FileTarget(f).remove("both")
// note: signatures of tracked files under
// these directories should have been removed.
for d in sorted(specified_tracked_dirs, key=len, reverse=True):
After Change
// in case of all, we need to remove everything
if not args.__tracked__ and not args.__untracked__:
for target in args.targets:
target = os.path.expanduser(target)
if args.__dryrun__:
print("Would remove {}".format(target))
elif os.path.exists(target):
if get_response("Remove {}".format(target)):
if os.path.isfile(target):
os.remove(target)
elif os.path.isdir(target):
if os.path.abspath(target) != os.path.abspath("."):
shutil.rmtree(target)
else:
os.unlink(target)