Subject: Re: [PATCH 1/3] for-each-ref: let upstream/push optionally report the remote name

From: Junio C Hamano <[email-masked]>
Date: Wed, 04 Oct 2017 18:08:29 +0900

Junio C Hamano <[email-masked]> writes:

>> +	} else if (atom->u.remote_ref.option == RR_REMOTE_NAME) {
>> +		int explicit;
>> +		const char *remote = starts_with(atom->name, "push") ?
>> +			pushremote_for_branch(branch, &explicit) :
>> +			remote_for_branch(branch, &explicit);
>
> I think "int explicit = 0;" is needed, as pushremote_for_branch()
> does seem to expect that the "explicit" return parameter is
> initialized by the caller.

Not really. I misread these helper functions.  pushremote_for_branch()
ends up calling remote_for_branch() which does clear, so we are OK
without caller initializing it.