sha1-array: convert internal storage for struct sha1_array to object_id
[gitweb.git] / remote.c
index bf1bf2309128bf886eac16959b8162b9990c98d7..9f83fe2c4cbd477e47fc6c81eab324be7aa088c6 100644 (file)
--- a/remote.c
+++ b/remote.c
@@ -693,7 +693,7 @@ static struct remote *remote_get_1(const char *name,
                name = get_default(current_branch, &name_given);
 
        ret = make_remote(name, 0);
-       if (valid_remote_nick(name)) {
+       if (valid_remote_nick(name) && have_git_dir()) {
                if (!valid_remote(ret))
                        read_remotes_file(ret);
                if (!valid_remote(ret))