From 23083bcbe9252bb351fc7d8cd2fa41e34d44235e Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 6 Aug 2011 02:37:54 +0200 Subject: git-eternal-move: check $# --- Refactory/bin/git-eternal-move | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Refactory/bin/git-eternal-move') 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" -- cgit v1.2.3