[PATCH] Git-cvsimport Improvement
From: patrick keshishian <hidden>
Date: 2017-11-04 18:30:08
Attachments
- git-cvsimport_perl.patch.txt [text/plain] 1861 bytes · preview
From: patrick keshishian <hidden>
Date: 2017-11-04 18:30:08
Greetings, I am attempting to improve CVS -> CVSps -> Git-cvsimport process. The part involving Git-cvsimport has to do with parsing of CVSps PatchSet file. Consider what happens if a CVS log/commit message includes lines which start with "Members:", say from copy-and-paste [2]. To avoid this issue, I have proposed that CVSps append the "Log:" tag with line count of original CVS log/commit message [1]. The idea is if line-count is found after "Log:", that many (CVS log message) lines get consumed before advancing $state to look for "^Members:" Current Git-cvsimport isn't strict in matching the "Log:" tag (fortunately) and my proposed change to Git-cvsimport should be fully backward compatible. See attached patch. Cheers, --patrick p.s., For reference: Why I'm doing this and RFC sent to CVS list: http://lists.nongnu.org/archive/html/info-cvs/2017-11/msg00000.html [1] https://github.com/andreyvit/cvsps/pull/4 [2] Example PatchSet with "Members:" line in original CVS commit message: --------------------- PatchSet 3 Date: 2017/10/30 23:25:20 Author: catbert Branch: HEAD Tag: (none) Log: This will confuse git-cvsimport's parser Members: somefile.c:1.1->1.2 another.h:1.7->1.8 foo.mk:1.22->1.23 Imagine these were lines pasted to note something Members: ABC:1.1->1.2