Permalink
Browse files

git-null: Handle filenames starting with '-' properly

  • Loading branch information...
1 parent 7a9882d commit 2dc4b7ee52da335779bade0ef34cde8459922f32 @rosslagerwall committed Mar 19, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 git-null
View
@@ -19,7 +19,7 @@ if [ -n "$OUTPUT" ]; then
fi
echo "Updating `pwd` to the *null* revision."
-git ls-files -z | xargs -0 rm # delete all tracked files
+git ls-files -z | xargs -0 rm -- # delete all tracked files
# Delete all empty directories except for ./.git
find . -type d -not \( -path './.git/*' -or -path './.git' \) -delete
echo "To go back to the previous state, run: git reset --hard"

0 comments on commit 2dc4b7e

Please sign in to comment.