Re: [PATCH v6 18/19] push: refactor refspec_append_mapped() for subsequent leak-fix

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

 



Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> writes:

> I think you're mistaken, or I'm misunderstanding you. For e.g. the 29th
> test in t4301-merge-tree-write-tree.sh where we do:
>
> 	git push read-only side1 side2 side3
>
> We'll only invoke "get_local_heads()" once, not once for each of the
> refs.

Ahh.  get_local_heads() appears inside this conditional in the
original.

	} else if (!strchr(ref, ':')) {
		if (!remote) {
			remote = remote_get(repo);
			local_refs = get_local_heads();
		}
	        refspec_append_mapped(...);
	} else
		...

So the original was using !remote as the switch to make both remote
and local_refs assigned onnly once.  The rewritten code makes them
separately "find first non-null".

OK.



[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