sequencer: use trailer's trailer layout
[gitweb.git] / http-fetch.c
index 923904f97f9274d09a0a0b08543492f78a141f79..3b556d66196277b2730f7e3d366a28a9d5ad1c56 100644 (file)
@@ -6,9 +6,8 @@
 static const char http_fetch_usage[] = "git http-fetch "
 "[-c] [-t] [-a] [-v] [--recover] [-w ref] [--stdin] commit-id url";
 
-int main(int argc, const char **argv)
+int cmd_main(int argc, const char **argv)
 {
-       const char *prefix;
        struct walker *walker;
        int commits_on_stdin = 0;
        int commits;
@@ -23,8 +22,6 @@ int main(int argc, const char **argv)
        int get_verbosely = 0;
        int get_recover = 0;
 
-       git_extract_argv0_path(argv[0]);
-
        while (arg < argc && argv[arg][0] == '-') {
                if (argv[arg][1] == 't') {
                        get_tree = 1;
@@ -57,14 +54,18 @@ int main(int argc, const char **argv)
                commits = 1;
        }
 
+       if (get_all == 0)
+               warning("http-fetch: use without -a is deprecated.\n"
+                       "In a future release, -a will become the default.");
+
        if (argv[arg])
                str_end_url_with_slash(argv[arg], &url);
 
-       prefix = setup_git_directory();
+       setup_git_directory();
 
        git_config(git_default_config, NULL);
 
-       http_init(NULL);
+       http_init(NULL, url, 0);
        walker = get_http_walker(url);
        walker->get_tree = get_tree;
        walker->get_history = get_history;