From 347f1d2608471cbc64f1cf25943f8d6f89256d2c Mon Sep 17 00:00:00 2001 From: Salikh Zakirov Date: Sat, 27 May 2006 21:57:29 +0400 Subject: [PATCH] Fixed Cygwin CR-munging problem in mailsplit Do not open mailbox file as fopen(..., "rt") as this strips CR characters from the diff, thus breaking the patch context for changes in CRLF files. Signed-off-by: Salikh Zakirov Signed-off-by: Junio C Hamano --- mailsplit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mailsplit.c b/mailsplit.c index c529e2d0..70a569c1 100644 --- a/mailsplit.c +++ b/mailsplit.c @@ -162,7 +162,7 @@ int main(int argc, const char **argv) while (*argp) { const char *file = *argp++; - FILE *f = !strcmp(file, "-") ? stdin : fopen(file, "rt"); + FILE *f = !strcmp(file, "-") ? stdin : fopen(file, "r"); int file_done = 0; if ( !f ) -- 2.11.0