From: Yasushi SHOJI <yashi@atmark-techno.com>
To: git@vger.kernel.org
Subject: [PATCH] git-clone: exit early if repo isn't specified
Date: Thu, 30 Mar 2006 17:01:23 +0000 (UTC)
Date: Fri Mar 31 00:00:16 2006 +0900 [thread overview]
Message-ID: <87d5g3yii8.wl@mail2.atmark-techno.com> (raw)
Subject: [PATCH] git-clone: exit early if repo isn't specified
git-clone without a repo isn't useful at all. print message and get
out asap.
This patch also move the variable 'local' to where other variables are
initialized.
Signed-off-by: Yasushi SHOJI <yashi@atmark-techno.com>
---
git-clone.sh | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
a222289a855194280aade24baa005de9e55667d0
diff --git a/git-clone.sh b/git-clone.sh
index a731d15..7b05fd9 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -98,6 +98,7 @@ close FH;
'
quiet=
+local=no
use_local=no
local_shared=no
no_checkout=
@@ -155,6 +156,13 @@ do
shift
done
+repo="$1"
+if test -z "$repo"
+then
+ echo >&2 'you must specify a repository to clone.'
+ exit 1
+fi
+
# --bare implies --no-checkout
if test yes = "$bare"
then
@@ -178,8 +186,6 @@ fi
# Turn the source into an absolute path if
# it is local
-repo="$1"
-local=no
if base=$(get_repo_base "$repo"); then
repo="$base"
local=yes
--
1.3.0.rc1.gb8abc
reply other threads:[~2006-03-30 17:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d5g3yii8.wl@mail2.atmark-techno.com \
--to=yashi@atmark-techno.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).