mirror of
https://github.com/newren/git-filter-repo.git
synced 2024-06-30 07:25:40 +02:00
filter-repo: make fresh clone warning scarier
Apparently, despite the fact that *overwrite* *repo* *history* are three important words that each individually convey a lot of important meaning, people ignore it and instinctively add --force. Insert the word "destructively" to get people to pause. Further, change the end of the warning not to how to get around the warning with the current repository, but instead with a suggestion that they should instead be operating on a fresh clone and only then make a side comment that the --force flag can be used to override. Signed-off-by: Elijah Newren <newren@gmail.com>
This commit is contained in:
parent
8abf8faec8
commit
1e0c3ab3ae
|
@ -2876,10 +2876,11 @@ class RepoFilter(object):
|
|||
msg = _("Note: when cloning local repositories, you need to pass\n"
|
||||
" --no-local to git clone to avoid this issue.\n")
|
||||
raise SystemExit(
|
||||
_("Aborting: Refusing to overwrite repo history since this does not\n"
|
||||
"look like a fresh clone.\n"
|
||||
_("Aborting: Refusing to destructively overwrite repo history since\n"
|
||||
"this does not look like a fresh clone.\n"
|
||||
" (%s)\n%s"
|
||||
"To override, use --force.") % (reason, msg))
|
||||
"Please operate on a fresh clone instead. If you want to proceed\n"
|
||||
"anyway, use --force.") % (reason, msg))
|
||||
|
||||
# Make sure repo is fully packed, just like a fresh clone would be.
|
||||
# Note that transfer.unpackLimit defaults to 100, meaning that a
|
||||
|
|
Loading…
Reference in New Issue
Block a user