You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
679 B

# Copyright (c) Amber Brown, 2015
# See LICENSE for details.
import os
from subprocess import call
import click
def remove_files(fragment_filenames, answer_yes):
if not fragment_filenames:
if answer_yes:
click.echo("Removing the following files:")
click.echo("I want to remove the following files:")
for filename in fragment_filenames:
if answer_yes or click.confirm("Is it okay if I remove those files?", default=True):
call(["git", "rm", "--quiet"] + fragment_filenames)
def stage_newsfile(directory, filename):
call(["git", "add", os.path.join(directory, filename)])