diff --git a/plugins/git4idea/src/git4idea/history/GitLogParser.java b/plugins/git4idea/src/git4idea/history/GitLogParser.java index 35c798a425e2..4dd8f8d85b8f 100644 --- a/plugins/git4idea/src/git4idea/history/GitLogParser.java +++ b/plugins/git4idea/src/git4idea/history/GitLogParser.java @@ -167,10 +167,20 @@ public class GitLogParser { // // R100 dir/anew.txt anew.txt final List records = StringUtil.split(output, RECORD_START); // split by START, because END is the end of information, but not the end of the record: file status and path follow. + String notMatchedPart = null; final List res = new ArrayList(records.size()); for (String record : records) { if (!record.trim().isEmpty()) { // record[0] is empty for sure, because we're splitting on RECORD_START. Just to play safe adding the check for all records. - res.add(parseOneRecord(record)); + if (notMatchedPart != null) { + record = notMatchedPart + record; + } + if (ONE_RECORD.matcher(record).matches()) { + notMatchedPart = null; + res.add(parseOneRecord(record)); + } + else { + notMatchedPart = record; + } } } return res;