Re: [PATCH] Correct handling of upload-pack in builtin-fetch-pack

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Daniel Barkalow <barkalow@xxxxxxxxxxxx> wrote:
> The field in the args was being ignored in favor of a static constant
> 
> Signed-off-by: Daniel Barkalow <barkalow@xxxxxxxxxxxx>
> ---
> 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.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux