Skip to content

Commit 09149c7

Browse files
iabervongitster
authored andcommitted
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>
1 parent 68492fc commit 09149c7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

builtin-fetch-pack.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@
1111
static int transfer_unpack_limit = -1;
1212
static int fetch_unpack_limit = -1;
1313
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+
};
1517

1618
static const char fetch_pack_usage[] =
1719
"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";
1920

2021
#define COMPLETE (1U << 0)
2122
#define COMMON (1U << 1)
@@ -773,7 +774,7 @@ struct ref *fetch_pack(struct fetch_pack_args *my_args,
773774
st.st_mtime = 0;
774775
}
775776

776-
pid = git_connect(fd, (char *)dest, uploadpack,
777+
pid = git_connect(fd, (char *)dest, args.uploadpack,
777778
args.verbose ? CONNECT_VERBOSE : 0);
778779
if (pid < 0)
779780
return NULL;

0 commit comments

Comments
 (0)