#!/usr/bin/perl

use strict;
use warnings;
use lib 'lib';
use Gear::Remotes::GitUrl;

while (<>) {
    my $in = $_;
    chomp;
    next if /^\s*$/ or /^\s*#/;
    my ($name, $version, $url, $vcs) = split(/\t/);
    $vcs = &Gear::Remotes::GitUrl::emptify_no_url($vcs);
    $url = &Gear::Remotes::GitUrl::emptify_no_url($url);
    next if defined($vcs) and $vcs eq '0';
    next if not $vcs and not $url;
    next if $vcs and &Gear::Remotes::GitUrl::is_git_like_url($vcs);
    next if $url and &Gear::Remotes::GitUrl::is_git_like_url($url);
    print $in;
}
