[git] history: fix status information expectations.
authorKirill Likhodedov <Kirill.Likhodedov@jetbrains.com>
Mon, 30 Jul 2012 12:13:45 +0000 (16:13 +0400)
committerKirill Likhodedov <Kirill.Likhodedov@jetbrains.com>
Mon, 30 Jul 2012 12:13:45 +0000 (16:13 +0400)
It can safely be null, for example, for merge commits without any changes.

plugins/git4idea/src/git4idea/history/GitHistoryUtils.java

index 291c32116b785df693b83269ed5b2f8968b0bc1b..cf2d93c9a57bb25dc7c4545d369898807d21a856 100644 (file)
@@ -372,8 +372,8 @@ public class GitHistoryUtils {
                                                new Date(record.getAuthorTimeStamp() * 1000), false, parents));
           List<GitLogStatusInfo> statusInfos = record.getStatusInfos();
           if (statusInfos.isEmpty()) {
-            LOG.error(String.format("No status information for the file. File path: %s, current revision: %s, log record: %s",
-                                    currentPath, revision, record));
+            // can safely be empty, for example, for simple merge commits that don't change anything.
+            return;
           }
           if (statusInfos.get(0).getType() == GitChangeType.ADDED) {
             skipFurtherOutput.set(true);