diff options
author | tv <tv@also> | 2011-08-06 02:37:54 +0200 |
---|---|---|
committer | tv <tv@also> | 2011-08-06 02:37:54 +0200 |
commit | 88600fab869493cc06b1275a29aaa0d7bc18c559 (patch) | |
tree | faba30fb6d2c7c65e46bc6e53de8cdd5c1c536b0 | |
parent | 14d36fe6cf8a88cff5b1c231c1ab64f07b58af4a (diff) |
git-eternal-move: check $#
-rwxr-xr-x | refactory/bin/git-eternal-move | 7 |
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" |