Skip to content

Commit

Permalink
Correct handling of upload-pack in builtin-fetch-pack
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Daniel Barkalow authored and Junio C Hamano committed Oct 30, 2007
1 parent 68492fc commit 09149c7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions builtin-fetch-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@
static int transfer_unpack_limit = -1;
static int fetch_unpack_limit = -1;
static int unpack_limit = 100;
static struct fetch_pack_args args;
static struct fetch_pack_args args = {
/* .uploadpack = */ "git-upload-pack",
};

static const char fetch_pack_usage[] =
"git-fetch-pack [--all] [--quiet|-q] [--keep|-k] [--thin] [--upload-pack=<git-upload-pack>] [--depth=<n>] [--no-progress] [-v] [<host>:]<directory> [<refs>...]";
static const char *uploadpack = "git-upload-pack";

#define COMPLETE (1U << 0)
#define COMMON (1U << 1)
Expand Down Expand Up @@ -773,7 +774,7 @@ struct ref *fetch_pack(struct fetch_pack_args *my_args,
st.st_mtime = 0;
}

pid = git_connect(fd, (char *)dest, uploadpack,
pid = git_connect(fd, (char *)dest, args.uploadpack,
args.verbose ? CONNECT_VERBOSE : 0);
if (pid < 0)
return NULL;
Expand Down

0 comments on commit 09149c7

Please sign in to comment.