diff options
| author | Junio C Hamano <gitster@pobox.com> | 2009-11-04 16:34:02 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2009-11-04 16:34:02 -0800 |
| commit | 1b52ac5935c3773596fa41f6cf83578ab86b6b83 (patch) | |
| tree | 8cca157ac006bf268b3d9dae8b63fb0f1e073c77 /remote-curl.c | |
| parent | 3bb18e58fc4f5eddd97bc34fc11dc207b47cc093 (diff) | |
| parent | 0a565de4a50032339d3786d366e70912a4dcf572 (diff) | |
Merge branch 'maint'
* maint:
Fix documentation grammar typo
Allow curl helper to work without a local repository
Require a struct remote in transport_get()
Diffstat (limited to 'remote-curl.c')
| -rw-r--r-- | remote-curl.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/remote-curl.c b/remote-curl.c index 2faf1c6344..ebdab3603e 100644 --- a/remote-curl.c +++ b/remote-curl.c @@ -82,9 +82,10 @@ int main(int argc, const char **argv) struct strbuf buf = STRBUF_INIT; const char *url; struct walker *walker = NULL; + 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; @@ -103,6 +104,8 @@ int main(int argc, const char **argv) break; if (!prefixcmp(buf.buf, "fetch ")) { char *obj = buf.buf + strlen("fetch "); + if (nongit) + die("Fetch attempted without a local repo"); if (!walker) walker = get_http_walker(url, remote); walker->get_all = 1; |
