Browse Source

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 <Salikh.Zakirov@Intel.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
maint
Salikh Zakirov 19 years ago committed by Junio C Hamano
parent
commit
347f1d2608
  1. 2
      mailsplit.c

2
mailsplit.c

@ -162,7 +162,7 @@ int main(int argc, const char **argv) @@ -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 )

Loading…
Cancel
Save