Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Narebski <jnareb@gmail.com>2008-10-02 18:50:04 +0400
committerShawn O. Pearce <spearce@spearce.org>2008-10-03 04:43:18 +0400
commit2d7a3532c78bace2f3631ab0e594f713dcab9916 (patch)
tree4ff26626ddd74f9ee7657fb4f222f9f4ab72b675 /git-rebase--interactive.sh
parent6e2dfb1631b3c40574e6f940498f3889607c3ef8 (diff)
gitweb: Fix two 'uninitialized value' warnings in git_tree()
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> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'git-rebase--interactive.sh')
0 files changed, 0 insertions, 0 deletions