git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH (take 3)] gitweb: Use git-show-ref instead of git-peek-remote
Date: Sat, 25 Nov 2006 12:08:00 +0100	[thread overview]
Message-ID: <200611251208.01047.jnareb@gmail.com> (raw)
In-Reply-To: <7v7ixj3izw.fsf@assigned-by-dhcp.cox.net>

Junio C Hamano wrote:
> 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.

O.K. I have browsed through gitweb, and I see that we almost always
want the hashref, not hash (for passing further).

-- 
Jakub Narebski

      reply	other threads:[~2006-11-25 11:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-24 22:01 [PATCH] gitweb: Use git-show-ref instead of git-peek-remote Jakub Narebski
2006-11-24 22:20 ` Junio C Hamano
2006-11-24 22:35   ` Jakub Narebski
2006-11-25 10:18   ` [PATCH (amend)] " Jakub Narebski
2006-11-25 10:24     ` Jakub Narebski
2006-11-25 10:32   ` [PATCH (take 3)] " Jakub Narebski
2006-11-25 10:42     ` Junio C Hamano
2006-11-25 11:08       ` Jakub Narebski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200611251208.01047.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).