git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Baudis <pasky@suse.cz>
To: Jakub Narebski <jnareb@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH (BUGFIX)] gitweb: Fix two 'uninitialized value' varnings in git_tree()
Date: Thu, 2 Oct 2008 17:08:59 +0200	[thread overview]
Message-ID: <20081002150859.GQ10544@machine.or.cz> (raw)
In-Reply-To: <20081002144602.19247.4434.stgit@localhost.localdomain>

On Thu, Oct 02, 2008 at 04:50:04PM +0200, Jakub Narebski wrote:
> If we did try to access nonexistent directory or file, which means
> that git_get_hash_by_path() returns `undef`, uninitialized $hash
> variable was passed to 'open' call.  Now we fail early with "404 Not
> Found - No such tree" error.  (If we try to access something which
> does not resolve to tree-ish, for example a file / 'blob' object, the
> error will be caught later, as "404 Not Found - Reading tree failed"
> error).
> 
> If we tried to use 'tree' action without $file_name ('f' parameter)
> set, which means either tree given by hash or a top tree (and we
> currently cannot distinguish between those two cases), we cannot print
> path breadcrumbs with git_print_page_path().  Fix this by moving call
> to git_print_page_path() inside conditional.
> 
> Signed-off-by: Jakub Narebski <jnareb@gmail.com>

Acked-by: Petr Baudis <pasky@suse.cz>

> BTW. should we use "No such tree" or "No such directory".

I prefer the former.

      parent reply	other threads:[~2008-10-02 15:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-02 14:50 [PATCH (BUGFIX)] gitweb: Fix two 'uninitialized value' varnings in git_tree() Jakub Narebski
2008-10-02 15:02 ` Giuseppe Bilotta
2008-10-02 15:08 ` Petr Baudis [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=20081002150859.GQ10544@machine.or.cz \
    --to=pasky@suse.cz \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    /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).