Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] gitweb: Make git_get_refs_list do work of git_get_references

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:40

Junio C Hamano [off-list ref] writes:
The code I was complaining about tries to do something like
this:

	sub that_sub {
        	...
                return wantarray ? (\@bar, \%foo) : \@bar;
	}

and it is not done for optimization purposes (i.e. "if the
caller only wants one and we are returning \@bar then we do not
have to compute \%foo which is a big win" is not why it does
this wantarray business).
Note.  I did not mean to imply conditional return should be done
for performance reasons.

And I do not think the way this conditional return is done
serves better DWIMmery, which was my primary complaint.  So I
should probably have said "It's not for better DWIM, it is not
even for better performance, and I do not see a point".
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help