scripts: do not get confused with HEAD in work tree
[gitweb.git] / git-filter-branch.sh
index ffcc408ee5217d7a8f6179a0404ffe387e0dab0f..dbab1a9a4ab91caae34f2baecd2439a7b15d11af 100755 (executable)
@@ -95,7 +95,7 @@ USAGE="[--env-filter <command>] [--tree-filter <command>] \
 . git-sh-setup
 
 git diff-files --quiet &&
-       git diff-index --cached --quiet HEAD ||
+       git diff-index --cached --quiet HEAD -- ||
        die "Cannot rewrite branch(es) with a dirty working directory."
 
 tempdir=.git-rewrite