git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH (BUGFIX)] gitweb: Fix two 'uninitialized value' varnings in git_tree()

From
Petr Baudis <pasky@suse.cz>
Date
Oct 2, 2008, 15:08 UTC
Message-ID
<20081002150859.GQ10544@machine.or.cz>
In-Reply-To
<20081002144602.19247.4434.stgit@localhost.localdomain>
On Thu, Oct 02, 2008 at 04:50:04PM +0200, Jakub Narebski wrote:
Show 15 quoted lines
> 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.
Previous: Giuseppe Bilotta
Message 3 of 3 in “gitweb: Fix two 'uninitialized value' varnings in git_tree()”
  1. gitweb: Fix two 'uninitialized value' varnings in git_tree()Jakub Narebski, Oct 2, 2008
  2. Giuseppe BilottaOct 2, 2008
  3. Petr BaudisOct 2, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.