gitweb: Test if $from_id and $to_id are defined before comparison