summaryrefslogtreecommitdiff
path: root/git-cvsserver.perl
diff options
context:
space:
mode:
authorMatthew Ogilvie <mmogilvi_git@miniinfo.net>2012-10-13 23:42:15 -0600
committerJunio C Hamano <gitster@pobox.com>2012-10-16 16:16:21 -0700
commit39b6a4bd25b6e4e54c1d12028ad79e16a2cfc528 (patch)
treee869b64108ddff5f63a12d5da032ee4d26266b89 /git-cvsserver.perl
parentef6fd72b6ce18b5be694f39b37d30d4cdc6bfd2a (diff)
downloadgit-39b6a4bd25b6e4e54c1d12028ad79e16a2cfc528.tar.gz
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>
Diffstat (limited to 'git-cvsserver.perl')
-rwxr-xr-xgit-cvsserver.perl38
1 files changed, 5 insertions, 33 deletions
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index b8eddabc94..f43d287980 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -2444,42 +2444,14 @@ sub kopts_from_path
}
elsif( ($cfg->{gitcvs}{allbinary} =~ /^\s*guess\s*$/i) )
{
- if( $srcType eq "sha1Or-k" &&
- !defined($name) )
+ if( is_binary($srcType,$name) )
{
- my ($ret)=$state->{entries}{$path}{options};
- if( !defined($ret) )
- {
- $ret=$state->{opt}{k};
- if(defined($ret))
- {
- $ret="-k$ret";
- }
- else
- {
- $ret="";
- }
- }
- if( ! ($ret=~/^(|-kb|-kkv|-kkvl|-kk|-ko|-kv)$/) )
- {
- print "E Bad -k option\n";
- $log->warn("Bad -k option: $ret");
- die "Error: Bad -k option: $ret\n";
- }
-
- return $ret;
+ $log->debug("... as binary");
+ return "-kb";
}
else
{
- if( is_binary($srcType,$name) )
- {
- $log->debug("... as binary");
- return "-kb";
- }
- else
- {
- $log->debug("... as text");
- }
+ $log->debug("... as text");
}
}
}
@@ -2586,7 +2558,7 @@ sub open_blob_or_die
die "Unable to open file $name: $!\n";
}
}
- elsif( $srcType eq "sha1" || $srcType eq "sha1Or-k" )
+ elsif( $srcType eq "sha1" )
{
unless ( defined ( $name ) and $name =~ /^[a-zA-Z0-9]{40}$/ )
{