Re: [PATCH 4/5] branch_get: provide per-branch pushremote pointers
- From
Jeff King <peff@peff.net>
- Date
- Jan 8, 2014, 10:27 UTC
- Message-ID
- <20140108102707.GA23145@sigill.intra.peff.net>
- In-Reply-To
- <20140108093531.GD15720@sigill.intra.peff.net>
On Wed, Jan 08, 2014 at 04:35:31AM -0500, Jeff King wrote:
Show 11 quoted lines
> @@ -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