]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jk/fail-null-clone' into maint
authorJunio C Hamano <gitster@pobox.com>
Wed, 16 Mar 2011 23:47:26 +0000 (16:47 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 16 Mar 2011 23:47:26 +0000 (16:47 -0700)
* jk/fail-null-clone:
  clone: die when trying to clone missing local path

1  2 
builtin/clone.c

diff --combined builtin/clone.c
index 60d9a64280b0318b1248b229d2ff99b27eb0e5c6,6fcd699949c901d0fd0e761ea6a6983967ca0901..2ee1fa984620de4fad79ce94d4f993f5e83a053d
@@@ -66,10 -66,10 +66,10 @@@ static struct option builtin_clone_opti
                    "setup as shared repository"),
        OPT_BOOLEAN(0, "recursive", &option_recursive,
                    "initialize submodules in the clone"),
 -      OPT_BOOLEAN(0, "recurse_submodules", &option_recursive,
 +      OPT_BOOLEAN(0, "recurse-submodules", &option_recursive,
                    "initialize submodules in the clone"),
 -      OPT_STRING(0, "template", &option_template, "path",
 -                 "path the template repository"),
 +      OPT_STRING(0, "template", &option_template, "template-directory",
 +                 "directory from which templates will be used"),
        OPT_STRING(0, "reference", &option_reference, "repo",
                   "reference repository"),
        OPT_STRING('o', "origin", &option_origin, "branch",
@@@ -413,7 -413,7 +413,7 @@@ int cmd_clone(int argc, const char **ar
        if (path)
                repo = xstrdup(make_nonrelative_path(repo_name));
        else if (!strchr(repo_name, ':'))
-               repo = xstrdup(make_absolute_path(repo_name));
+               die("repository '%s' does not exist", repo_name);
        else
                repo = repo_name;
        is_local = path && !is_bundle;