{"thread":{"id":"3760","subject":"[PATCH] git-clone: exit early if repo isn't specified","startedAt":"2006-03-30T17:01:23Z","lastAt":"2006-03-30T17:01:23Z","messageCount":1,"participants":["Yasushi SHOJI"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"18150","messageId":"87d5g3yii8.wl@mail2.atmark-techno.com","threadId":"3760","inReplyTo":null,"subject":"[PATCH] git-clone: exit early if repo isn't specified","fromName":"Yasushi SHOJI","fromEmail":"yashi@atmark-techno.com","sentAt":"2006-03-30T17:01:23Z","receivedAt":"2006-03-30T17:01:23Z","isPatch":true,"sender":{"key":"yashi@atmark-techno.com","avatar":"https://gravatar.com/avatar/4817e8703ac4379935834d87453faa9d0c94b9dc19d83fcc54c67875eb133e59?d=mp&s=160"},"body":"Subject: [PATCH] git-clone: exit early if repo isn't specified\n\ngit-clone without a repo isn't useful at all.  print message and get\nout asap.\n\nThis patch also move the variable 'local' to where other variables are\ninitialized.\n\nSigned-off-by: Yasushi SHOJI <yashi@atmark-techno.com>\n\n\n---\n\n git-clone.sh |   10 ++++++++--\n 1 files changed, 8 insertions(+), 2 deletions(-)\n\na222289a855194280aade24baa005de9e55667d0\ndiff --git a/git-clone.sh b/git-clone.sh\nindex a731d15..7b05fd9 100755\n--- a/git-clone.sh\n+++ b/git-clone.sh\n@@ -98,6 +98,7 @@ close FH;\n '\n \n quiet=\n+local=no\n use_local=no\n local_shared=no\n no_checkout=\n@@ -155,6 +156,13 @@ do\n \tshift\n done\n \n+repo=\"$1\"\n+if test -z \"$repo\"\n+then\n+    echo >&2 'you must specify a repository to clone.'\n+    exit 1\n+fi\n+\n # --bare implies --no-checkout\n if test yes = \"$bare\"\n then\n@@ -178,8 +186,6 @@ fi\n \n # Turn the source into an absolute path if\n # it is local\n-repo=\"$1\"\n-local=no\n if base=$(get_repo_base \"$repo\"); then\n \trepo=\"$base\"\n \tlocal=yes\n-- \n1.3.0.rc1.gb8abc\n"}]}