@matheusbsbs / matheus-bagliano / commits / 09149c7809
Fork 0

Correct handling of upload-pack in builtin-fetch-pack

The field in the args was being ignored in favor of a static constant Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Thanked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Daniel Barkalow committed Oct 29, 2007 at 22:35 UTC 09149c7809a37a52b38d8d7a0621e2fb8943d8fe
1 file changed +4 -3
builtin-fetch-pack.c
+4 -3
@@ -11,11 +11,12 @@
11 static int transfer_unpack_limit = -1;
12 static int fetch_unpack_limit = -1;
13 static int unpack_limit = 100;
14 -static struct fetch_pack_args args;
14 +static struct fetch_pack_args args = {
15 + /* .uploadpack = */ "git-upload-pack",
16 +};
17
18 static const char fetch_pack_usage[] =
19 "git-fetch-pack [--all] [--quiet|-q] [--keep|-k] [--thin] [--upload-pack=<git-upload-pack>] [--depth=<n>] [--no-progress] [-v] [<host>:]<directory> [<refs>...]";
18 -static const char *uploadpack = "git-upload-pack";
20
21 #define COMPLETE (1U << 0)
22 #define COMMON (1U << 1)
@@ -773,7 +774,7 @@ struct ref *fetch_pack(struct fetch_pack_args *my_args,
774 st.st_mtime = 0;
775 }
776
776 - pid = git_connect(fd, (char *)dest, uploadpack,
777 + pid = git_connect(fd, (char *)dest, args.uploadpack,
778 args.verbose ? CONNECT_VERBOSE : 0);
779 if (pid < 0)
780 return NULL;