general improvements
[gitweb.git] / git-filter-branch.sh
index ccceaf19a74373bb23b2a2b1aa71b7f0bb909d54..fea79646172184c630508908dd6eb61d3470074d 100755 (executable)
@@ -83,6 +83,20 @@ set_ident () {
        finish_ident COMMITTER
 }
 
+if test -z "$FILTER_BRANCH_SQUELCH_WARNING$GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS"
+then
+       cat <<EOF
+WARNING: git-filter-branch has a glut of gotchas generating mangled history
+        rewrites.  Hit Ctrl-C before proceeding to abort, then use an
+        alternative filtering tool such as 'git filter-repo'
+        (https://github.com/newren/git-filter-repo/) instead.  See the
+        filter-branch manual page for more details; to squelch this warning,
+        set FILTER_BRANCH_SQUELCH_WARNING=1.
+EOF
+       sleep 10
+       printf "Proceeding with filter-branch...\n\n"
+fi
+
 USAGE="[--setup <command>] [--subdirectory-filter <directory>] [--env-filter <command>]
        [--tree-filter <command>] [--index-filter <command>]
        [--parent-filter <command>] [--msg-filter <command>]
@@ -372,6 +386,7 @@ while read commit parents; do
        git_filter_branch__commit_count=$(($git_filter_branch__commit_count+1))
 
        report_progress
+       test -f "$workdir"/../map/$commit && continue
 
        case "$filter_subdir" in
        "")