X-Git-Url: https://scripts.mit.edu/gitweb/wizard.git/blobdiff_plain/91c31227b59c45011d1ff1a61e249c669913f75c..10fea9a7ddab6a654922514b13b135772cc98a01:/wizard/command/prepare_pristine.py diff --git a/wizard/command/prepare_pristine.py b/wizard/command/prepare_pristine.py index b628a42..d4c9233 100644 --- a/wizard/command/prepare_pristine.py +++ b/wizard/command/prepare_pristine.py @@ -33,7 +33,11 @@ def main(argv, baton): 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