X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-cvsserver.perl;h=e9f3037df351ceed0262a8995f19903464163af8;hb=be254a0ea99b441a6c514cb8b25cd72357383700;hp=3833beeef38c35bf5da0407e89a959874a253307;hpb=af2fc76b4a20e965e19de484b44aca0bef851daa;p=git.git diff --git a/git-cvsserver.perl b/git-cvsserver.perl index 3833beeef..e9f3037df 100755 --- a/git-cvsserver.perl +++ b/git-cvsserver.perl @@ -2415,15 +2415,20 @@ sub kopts_from_path if ( defined ( $cfg->{gitcvs}{usecrlfattr} ) and $cfg->{gitcvs}{usecrlfattr} =~ /\s*(1|true|yes)\s*$/i ) { - my ($val) = check_attr( "crlf", $path ); - if ( $val eq "set" ) + my ($val) = check_attr( "text", $path ); + if ( $val eq "unspecified" ) { - return ""; + $val = check_attr( "crlf", $path ); } - elsif ( $val eq "unset" ) + if ( $val eq "unset" ) { return "-kb" } + elsif ( check_attr( "eol", $path ) ne "unspecified" || + $val eq "set" || $val eq "input" ) + { + return ""; + } else { $log->info("Unrecognized check_attr crlf $path : $val"); @@ -2656,9 +2661,12 @@ sub descramble ); my ($str) = @_; - # This should never happen, the same password format (A) bas been + # This should never happen, the same password format (A) has been # used by CVS since the beginning of time - die "invalid password format $1" unless substr($str, 0, 1) eq 'A'; + { + my $fmt = substr($str, 0, 1); + die "invalid password format `$fmt'" unless $fmt eq 'A'; + } my @str = unpack "C*", substr($str, 1); my $ret = join '', map { chr $SHIFTS[$_] } @str;