summaryrefslogtreecommitdiffstats
path: root/refactory/bin/git-eternal-move
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
commit61a7d2057549775a8e18362b46b27a72bca36268 (patch)
tree8bca05df68552015578f72888c9ffcb276d4834c /refactory/bin/git-eternal-move
parent5f321f04a74873652d5a9afeb7574fbafda0c429 (diff)
git-eternal-move: check $#
Diffstat (limited to 'refactory/bin/git-eternal-move')
-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"