Merge branch 'jk/filter-branch-require-clean-work-tree'
authorJunio C Hamano <gitster@pobox.com>
Wed, 5 Oct 2011 19:35:55 +0000 (12:35 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 5 Oct 2011 19:35:55 +0000 (12:35 -0700)
* jk/filter-branch-require-clean-work-tree:
filter-branch: use require_clean_work_tree

git-filter-branch.sh
index 804a7f4bc912ab0c9c51038456d9abe4216947a5..add2c0247fa91e0f629428c295fc581f19cf85e1 100755 (executable)
@@ -108,9 +108,7 @@ 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