diff options
author | Øyvind A. Holm <sunny@sunbase.org> | 2016-01-12 04:31:56 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-01-12 13:21:15 -0800 |
commit | a9eb90aab5922e08a26c439806c80faa80f7c26d (patch) | |
tree | 76b9d6ab005a90a74ebc09667c5fdecbb41ebe57 /Documentation/technical/racy-git.txt | |
parent | Git 2.4.10 (diff) | |
download | tgif-a9eb90aab5922e08a26c439806c80faa80f7c26d.tar.xz |
gitweb: squelch "uninitialized value" warning
git_object() chomps $type that is read from "cat-file -t", but
it does so before checking if $type is defined, resulting in
a Perl warning in the server error log:
gitweb.cgi: Use of uninitialized value $type in scalar chomp at
[...]/gitweb.cgi line 7579., referer: [...]
when trying to access a non-existing commit, for example:
http://HOST/?p=PROJECT.git;a=commit;h=NON_EXISTING_COMMIT
Check the value in $type before chomping. This will cause us to
call href with its action parameter set to undef when formulating
the URL to redirect to, but that is harmless, as the function treats
a parameter that set to undef as if it does not exist.
Signed-off-by: Øyvind A. Holm <sunny@sunbase.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/technical/racy-git.txt')
0 files changed, 0 insertions, 0 deletions