cvsserver: removed unused sha1Or-k mode from kopts_from_path

sha1Or-k was a vestige from an early, never-released attempt to handle some oddball cases of CRLF conversion (-k option). Ultimately it wasn't needed, and I should have gotten rid of it before submitting the CRLF patch in the first place. See also 90948a42892779 (add ability to guess -kb from contents). Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Matthew Ogilvie committed Oct 13, 2012 at 23:42 UTC 39b6a4bd25b6e4e54c1d12028ad79e16a2cfc528
1 file changed +5 -33
git-cvsserver.perl
+5 -33
@@ -2444,42 +2444,14 @@ sub kopts_from_path
2444 }
2445 elsif( ($cfg->{gitcvs}{allbinary} =~ /^\s*guess\s*$/i) )
2446 {
2447 - if( $srcType eq "sha1Or-k" &&
2448 - !defined($name) )
2447 + if( is_binary($srcType,$name) )
2448 {
2450 - my ($ret)=$state->{entries}{$path}{options};
2451 - if( !defined($ret) )
2452 - {
2453 - $ret=$state->{opt}{k};
2454 - if(defined($ret))
2455 - {
2456 - $ret="-k$ret";
2457 - }
2458 - else
2459 - {
2460 - $ret="";
2461 - }
2462 - }
2463 - if( ! ($ret=~/^(|-kb|-kkv|-kkvl|-kk|-ko|-kv)$/) )
2464 - {
2465 - print "E Bad -k option\n";
2466 - $log->warn("Bad -k option: $ret");
2467 - die "Error: Bad -k option: $ret\n";
2468 - }
2469 -
2470 - return $ret;
2449 + $log->debug("... as binary");
2450 + return "-kb";
2451 }
2452 else
2453 {
2474 - if( is_binary($srcType,$name) )
2475 - {
2476 - $log->debug("... as binary");
2477 - return "-kb";
2478 - }
2479 - else
2480 - {
2481 - $log->debug("... as text");
2482 - }
2454 + $log->debug("... as text");
2455 }
2456 }
2457 }
@@ -2586,7 +2558,7 @@ sub open_blob_or_die
2558 die "Unable to open file $name: $!\n";
2559 }
2560 }
2589 - elsif( $srcType eq "sha1" || $srcType eq "sha1Or-k" )
2561 + elsif( $srcType eq "sha1" )
2562 {
2563 unless ( defined ( $name ) and $name =~ /^[a-zA-Z0-9]{40}$/ )
2564 {