Re: [PATCH (take 3)] gitweb: Use git-show-ref instead of git-peek-remote

From: Junio C Hamano <junkio@cox.net>
Date: 2006-11-25 21:42:27
Jakub Narebski <jnareb@gmail.com> writes:

> While at it make git_get_references return hash in list context,
> and reference to hash (as it used to do) in scalar and void contexts.

Why did you have to add this?  Generally, context sensitive
returns make the program much harder to maintain, because it
forces the call sites to be extremely careful to choose between
"my ($foo) = func()" vs "my $foo = func()", and people who later
call the function inevitably make mistakes.

So unless there is a compelling reason, I'd rather not see more
"wantarray" in the program.

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Sat Nov 25 21:42:37 2006

This archive was generated by hypermail 2.1.8 : 2006-11-25 21:43:47 EST