summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@also>2011-08-06 02:37:54 +0200
committertv <tv@also>2011-08-06 02:37:54 +0200
commitf55e7e8c29f510509b9853e1bd3727a94061c289 (patch)
treeca72e535ae028787d2e47c01fe5bce83302ffed7
parent5e983fbf03ff7e926797be80b97f31a4816444af (diff)
git-eternal-move: check $#
-rwxr-xr-xRefactory/bin/git-eternal-move7
1 files changed, 5 insertions, 2 deletions
diff --git a/Refactory/bin/git-eternal-move b/Refactory/bin/git-eternal-move
index 075748fd..bcf79501 100755
--- a/Refactory/bin/git-eternal-move
+++ b/Refactory/bin/git-eternal-move
@@ -3,9 +3,12 @@
# git-eternal-move FROM TO
#
set -euf
-git filter-branch --tree-filter "
+if test $# -ne 2; then
+ echo 'Error 1: You are made of stupid!' >&2
+ exit 23
+fi
+exec git filter-branch --tree-filter "
set -euf
if test -e '$1'; then
- mkdir -p '`dirname "$2"`'
mv '$1' '$2'
fi"