From 1798a208d9257f8f6be6b125947c6cf96a7bba09 Mon Sep 17 00:00:00 2001 From: christos Date: Sat, 30 Jan 2016 16:21:47 +0000 Subject: [PATCH] Remove trailing whitespace from imported messages when adding now files. This is done in RCS_checkin() but we have a "fast path" for new files here that does not do it. Hooray for specialized code. XXX: pullup 6, 7 --- external/gpl2/xcvs/dist/src/import.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/external/gpl2/xcvs/dist/src/import.c b/external/gpl2/xcvs/dist/src/import.c index 2c7addfbb7dd..fd465d11aac1 100644 --- a/external/gpl2/xcvs/dist/src/import.c +++ b/external/gpl2/xcvs/dist/src/import.c @@ -579,7 +579,7 @@ static int process_import_file (char *message, char *vfile, char *vtag, int targc, char **targv) { - char *rcs; + char *rcs, *cleanmessage; int inattic = 0; rcs = Xasprintf ("%s/%s%s", repository, vfile, RCSEXT); @@ -654,13 +654,14 @@ process_import_file (char *message, char *vfile, char *vtag, int targc, Entries_Close (entries); } #endif - - retval = add_rcs_file (message, rcs, vfile, vhead, our_opt, + cleanmessage = make_message_rcsvalid (message); + retval = add_rcs_file (cleanmessage, rcs, vfile, vhead, our_opt, vbranch, vtag, targc, targv, NULL, 0, logfp, killnew); if (free_opt != NULL) free (free_opt); free (rcs); + free (cleanmessage); return retval; } free (attic_name);