Re: [PATCH v5 4/4] convert.c: ident + core.autocrlf didn't work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tboegi@xxxxxx writes:

>  	if (ca.drv && (ca.drv->smudge || ca.drv->clean))
> -		return filter;
> +		return NULL;
>  
>  	if (ca.ident)
>  		filter = ident_filter(sha1);

We allocated an ident-filter here...

> -	crlf_action = ca.crlf_action;
> -
> -	if ((crlf_action == CRLF_BINARY) ||
> -			crlf_action == CRLF_AUTO_INPUT ||
> -			(crlf_action == CRLF_TEXT_INPUT))
> -		filter = cascade_filter(filter, &null_filter_singleton);
> -
> -	else if (output_eol(crlf_action) == EOL_CRLF &&
> -		 !(crlf_action == CRLF_AUTO || crlf_action == CRLF_AUTO_CRLF))
> +	if (output_eol(ca.crlf_action) == EOL_CRLF) {
> +		if (ca.crlf_action == CRLF_AUTO || ca.crlf_action == CRLF_AUTO_CRLF)
> +			return NULL;

and then by returning NULL, we lost it.

>  		filter = cascade_filter(filter, lf_to_crlf_filter());
> +	} else
> +		filter = cascade_filter(filter, &null_filter_singleton);
>  
>  	return filter;
>  }
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]