git-daemon: add tests
[gitweb.git] / 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