X-Git-Url: https://git.tokkee.org/?p=git.git;a=blobdiff_plain;f=git-filter-branch.sh;h=add2c0247fa91e0f629428c295fc581f19cf85e1;hp=6b5f2251b6b5f0b9a43e16296c390e991c6fa13a;hb=dbdc07fcbe3a951df8a3869b42edb6fffd466486;hpb=87d99c64dfa8880592104245896557aa530d4fd9 diff --git a/git-filter-branch.sh b/git-filter-branch.sh index 6b5f2251b..add2c0247 100755 --- a/git-filter-branch.sh +++ b/git-filter-branch.sh @@ -12,7 +12,7 @@ functions=$(cat << \EOF warn () { - echo "$*" >&2 + echo "$*" >&2 } map() @@ -98,19 +98,17 @@ set_ident () { } USAGE="[--env-filter ] [--tree-filter ] - [--index-filter ] [--parent-filter ] - [--msg-filter ] [--commit-filter ] - [--tag-name-filter ] [--subdirectory-filter ] - [--original ] [-d ] [-f | --force] - [...]" + [--index-filter ] [--parent-filter ] + [--msg-filter ] [--commit-filter ] + [--tag-name-filter ] [--subdirectory-filter ] + [--original ] [-d ] [-f | --force] + [...]" OPTIONS_SPEC= . git-sh-setup if [ "$(is_bare_repository)" = false ]; then - git diff-files --ignore-submodules --quiet && - git diff-index --cached --quiet HEAD -- || - die "Cannot rewrite branch(es) with a dirty working directory." + require_clean_work_tree 'rewrite branches' fi tempdir=.git-rewrite