* [PATCH] Correct handling of upload-pack in builtin-fetch-pack
@ 2007-10-30 2:35 Daniel Barkalow
2007-10-30 2:41 ` Shawn O. Pearce
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Barkalow @ 2007-10-30 2:35 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Shawn O. Pearce
The field in the args was being ignored in favor of a static constant
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
---
Found this while trying to figure out how builtin-fetch-pack was
initializing the string in the args struct, and why it generally worked
even though it wasn't.
builtin-fetch-pack.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c
index 8f25d50..8753840 100644
--- a/builtin-fetch-pack.c
+++ b/builtin-fetch-pack.c
@@ -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)
@@ -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;
--
1.5.3.4.1206.g5f96
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Correct handling of upload-pack in builtin-fetch-pack
2007-10-30 2:35 [PATCH] Correct handling of upload-pack in builtin-fetch-pack Daniel Barkalow
@ 2007-10-30 2:41 ` Shawn O. Pearce
0 siblings, 0 replies; 2+ messages in thread
From: Shawn O. Pearce @ 2007-10-30 2:41 UTC (permalink / raw)
To: Daniel Barkalow; +Cc: Junio C Hamano, git
Daniel Barkalow <barkalow@iabervon.org> wrote:
> The field in the args was being ignored in favor of a static constant
>
> Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
> ---
> Found this while trying to figure out how builtin-fetch-pack was
> initializing the string in the args struct, and why it generally worked
> even though it wasn't.
Gahhh. Yes, obviously correct fix. Thanks! :-)
> -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)
> @@ -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;
--
Shawn.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-10-30 2:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-30 2:35 [PATCH] Correct handling of upload-pack in builtin-fetch-pack Daniel Barkalow
2007-10-30 2:41 ` Shawn O. Pearce
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).