diff --git a/remote-curl.c b/remote-curl.c
index 0d7cf16e9c06d556cad8d92b6598a8da079426a4..4f28c222f2064b27c41bbcfbb425c6a221b46a58 100644 (file)
--- a/remote-curl.c
+++ b/remote-curl.c
int main(int argc, const char **argv)
{
struct strbuf buf = STRBUF_INIT;
+ int nongit;
git_extract_argv0_path(argv[0]);
- setup_git_directory();
+ setup_git_directory_gently(&nongit);
if (argc < 2) {
fprintf(stderr, "Remote needed\n");
return 1;
if (strbuf_getline(&buf, stdin, '\n') == EOF)
break;
if (!prefixcmp(buf.buf, "fetch ")) {
+ if (nongit)
+ die("Fetch attempted without a local repo");
parse_fetch(&buf);
} else if (!strcmp(buf.buf, "list") || !prefixcmp(buf.buf, "list ")) {