Skip to content

Commit 1e0c3ab

Browse files
committed
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 <[email protected]>
1 parent 8abf8fa commit 1e0c3ab

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

git-filter-repo

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2876,10 +2876,11 @@ class RepoFilter(object):
28762876
msg = _("Note: when cloning local repositories, you need to pass\n"
28772877
" --no-local to git clone to avoid this issue.\n")
28782878
raise SystemExit(
2879-
_("Aborting: Refusing to overwrite repo history since this does not\n"
2880-
"look like a fresh clone.\n"
2879+
_("Aborting: Refusing to destructively overwrite repo history since\n"
2880+
"this does not look like a fresh clone.\n"
28812881
" (%s)\n%s"
2882-
"To override, use --force.") % (reason, msg))
2882+
"Please operate on a fresh clone instead. If you want to proceed\n"
2883+
"anyway, use --force.") % (reason, msg))
28832884

28842885
# Make sure repo is fully packed, just like a fresh clone would be.
28852886
# Note that transfer.unpackLimit defaults to 100, meaning that a

0 commit comments

Comments
 (0)