Require exactly 1 argument for "locate"
authorStuart Prescott <stuart+debian@nanonanonano.net>
Thu, 13 Oct 2011 13:52:33 +0000 (14:52 +0100)
committerStuart Prescott <stuart+debian@nanonanonano.net>
Thu, 13 Oct 2011 13:52:33 +0000 (14:52 +0100)
movein

diff --git a/movein b/movein
index 47c01fc..3322bd2 100755 (executable)
--- a/movein
+++ b/movein
@@ -207,6 +207,9 @@ listremote() {
 
 locate() {
     local REPO
+    if [ $# -ne 1 ]; then
+        usage
+    fi
     for REPO in $($0 list); do
         (cd /; $0 exec "$REPO" git ls-files | sed -nr "/$1/{s/^/$REPO:/p}")
     done