if "/.git" in dirpath: continue
if not filenames and not dirnames:
open(os.path.join(dirpath, ".preserve-dir"), "w").write("")
+ # stage all changes
shell.call("git", "add", ".")
+ for f in shell.call("git", "ls-files", "-d", "-z")[0].split("\0"):
+ if f != "":
+ shell.call("git", "rm", "--", f)
def parse_args(argv, baton):
usage = """usage: %prog prepare-pristine APP-VERSION