Re: [PATCH 4/5] branch_get: provide per-branch pushremote pointers

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

 



On Wed, Jan 08, 2014 at 04:35:31AM -0500, Jeff King wrote:

> @@ -385,8 +387,11 @@ static int handle_config(const char *key, const char *value, void *cb)
>  	name = key + 7;
>  
>  	/* Handle remote.* variables */
> -	if (!strcmp(name, "pushdefault"))
> -		return git_config_string(&pushremote_name, key, value);
> +	if (!strcmp(name, "pushdefault")) {
> +		if (git_config_string(&pushremote_config_default, key, value) < 0)
> +			return -1;
> +		pushremote_name = pushremote_config_default;
> +	}

This needs "return 0" squashed in at the end of the conditional, of
course, to match the old behavior.

This patch passes the test suite by itself (with or without that fixup).
But oddly, it seems to fail t5531 when merged with 'next'. I can't
figure out why, though. It shouldn't affect any code that doesn't look
at branch->pushremote.

-Peff
--
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]