Benoît Allard  committed 6380094

api: Don't crash if the diff has no lines (in case of merge for instance)

  • Participants
  • Parent commits 78819a1

Comments (0)

Files changed (1)

File review/

             diff_opts.git = True
             d = patch.diff(, node1, node2, match=m, opts=diff_opts)
+            if not d:
+                # there might be no diff for the current file (merge)
+                continue
             # patch.diff will give us back a generator with two items
             # the first is the diff --git header, which we don't care about