Re: [PATCH 06/12] apply: run setup_git_directory_gently() sooner

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

 



Nguyen Thai Ngoc Duy wrote:

> The patch loses prefix and git-apply couldn't find files on disk. This
> patch may fix it. I'm running tests now.

Oh, good catch.  Thanks!

> diff --git a/builtin/apply.c b/builtin/apply.c
> index 6c4b747..29f4194 100644
> --- a/builtin/apply.c
> +++ b/builtin/apply.c
> @@ -3779,7 +3779,7 @@ static int option_parse_directory(const struct
> option *opt,
>  	return 0;
>  }
> 
> -int cmd_apply(int argc, const char **argv, const char *unused_prefix)
> +int cmd_apply(int argc, const char **argv, const char *prefix_)
>  {
>  	int i;
>  	int errs = 0;
> @@ -3856,6 +3856,7 @@ int cmd_apply(int argc, const char **argv, const
> char *unused_prefix)
>  		OPT_END()
>  	};
> 
> +	prefix = prefix_;

This is why we shouldn’t be using globals so cavalierly. :)
--
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]