|
|
@ -174,6 +174,19 @@ class BFG_ish:
|
|
|
|
help=("file path for Git repository to clean"))
|
|
|
|
help=("file path for Git repository to clean"))
|
|
|
|
|
|
|
|
|
|
|
|
args = parser.parse_args()
|
|
|
|
args = parser.parse_args()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Sanity check on args.repo
|
|
|
|
|
|
|
|
if not os.path.isdir(args.repo):
|
|
|
|
|
|
|
|
raise SystemExit("Repo not found: {}".format(os.fsdecode(args.repo)))
|
|
|
|
|
|
|
|
dirname, basename = os.path.split(args.repo)
|
|
|
|
|
|
|
|
if not basename:
|
|
|
|
|
|
|
|
dirname, basename = os.path.split(dirname)
|
|
|
|
|
|
|
|
if not dirname:
|
|
|
|
|
|
|
|
dirname = b'.'
|
|
|
|
|
|
|
|
if basename == b".git":
|
|
|
|
|
|
|
|
raise SystemExit("For non-bare repos, please specify the toplevel directory ({}) for repo"
|
|
|
|
|
|
|
|
.format(os.fsdecode(dirname)))
|
|
|
|
|
|
|
|
|
|
|
|
return args
|
|
|
|
return args
|
|
|
|
|
|
|
|
|
|
|
|
def convert_replace_text(self, filename):
|
|
|
|
def convert_replace_text(self, filename):
|
|
|
|