Re: [Wireshark-dev] checkhf.pl fails only on pre-commit hook

2014-04-05 Thread mmann78
pm Subject: Re: [Wireshark-dev] checkhf.pl fails only on pre-commit hook Ugh, forgot the "defined". So this: for my $k (sort keys %{$href}) { my $h = defined($href->{$k}) ? $href->{$k} : "undef"; printf "%-40.40s %5.5s %s\n", $title, $h, $k;

Re: [Wireshark-dev] checkhf.pl fails only on pre-commit hook

2014-04-04 Thread Hadriel Kaplan
Ugh, forgot the "defined". So this: for my $k (sort keys %{$href}) { my $h = defined($href->{$k}) ? $href->{$k} : "undef"; printf "%-40.40s %5.5s %s\n", $title, $h, $k; } On Apr 4, 2014, at 11:49 PM, Hadriel Kaplan wrote: > > Change this at line 563 in checkhf.pl: >

Re: [Wireshark-dev] checkhf.pl fails only on pre-commit hook

2014-04-04 Thread Hadriel Kaplan
Change this at line 563 in checkhf.pl: for my $k (sort keys %{$href}) { printf "%-40.40s %5.5s %s\n", $title, $href->{$k} // "undef", $k; } to this: for my $k (sort keys %{$href}) { my $h = ($href->{$k}) ? $href->{$k} : "undef"; printf "%-40.40s %5.5s %s\n",

Re: [Wireshark-dev] checkhf.pl fails only on pre-commit hook

2014-04-04 Thread Hadriel Kaplan
What version of Perl do you have? I think that line 564's logical-or only became available in Perl 5.10. (it's not a regex search, but a ternary conditional-or apparently, because, ya know... Perl can't possibly have only 20 ways of doing something when it could instead have 21 ways... and at

Re: [Wireshark-dev] checkhf.pl fails only on pre-commit hook

2014-04-04 Thread Hadriel Kaplan
On Apr 4, 2014, at 11:26 PM, Hadriel Kaplan wrote: > I barely know perl, but checkhf.pl line 564 does indeed look bogus to me. > (the double slashes are what it thinks is starting a regex search pattern > that's not terminated I believe) Actually, no it's fine. I don't know why your computer'

Re: [Wireshark-dev] checkhf.pl fails only on pre-commit hook

2014-04-04 Thread Hadriel Kaplan
On Apr 4, 2014, at 10:36 PM, mman...@netscape.net wrote: > I've taken the pre-commit hook file provided in \tools and put it in my git > hooks folder. However, whenever I commit something (I've focused mostly on > dissector patches and they all fail this way), it fails with "Search pattern >

[Wireshark-dev] checkhf.pl fails only on pre-commit hook

2014-04-04 Thread mmann78
I've taken the pre-commit hook file provided in \tools and put it in my git hooks folder. However, whenever I commit something (I've focused mostly on dissector patches and they all fail this way), it fails with "Search pattern not terminated at ./tools/checkhf.pl line 564." When I run checkh