Skip to content

Commit 39b6a4b

Browse files
Matthew Ogilviegitster
authored andcommitted
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 90948a4 (add ability to guess -kb from contents). Signed-off-by: Matthew Ogilvie <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ef6fd72 commit 39b6a4b

File tree

1 file changed

+5
-33
lines changed

1 file changed

+5
-33
lines changed

git-cvsserver.perl

Lines changed: 5 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2444,42 +2444,14 @@ sub kopts_from_path
24442444
}
24452445
elsif( ($cfg->{gitcvs}{allbinary} =~ /^\s*guess\s*$/i) )
24462446
{
2447-
if( $srcType eq "sha1Or-k" &&
2448-
!defined($name) )
2447+
if( is_binary($srcType,$name) )
24492448
{
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";
24712451
}
24722452
else
24732453
{
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");
24832455
}
24842456
}
24852457
}
@@ -2586,7 +2558,7 @@ sub open_blob_or_die
25862558
die "Unable to open file $name: $!\n";
25872559
}
25882560
}
2589-
elsif( $srcType eq "sha1" || $srcType eq "sha1Or-k" )
2561+
elsif( $srcType eq "sha1" )
25902562
{
25912563
unless ( defined ( $name ) and $name =~ /^[a-zA-Z0-9]{40}$/ )
25922564
{

0 commit comments

Comments
 (0)