Skip to content
Browse files
forge: diff for GitLab commits can be empty
Reviewed-by: rwestberg
  • Loading branch information
edvbld committed Oct 30, 2020
1 parent daa3c93 commit b4bc1918321e8416d5fb9526e34704dd501aa2fb
Showing with 4 additions and 2 deletions.
  1. +4 −2 forge/src/main/java/org/openjdk/skara/forge/gitlab/
@@ -441,8 +441,10 @@ Diff toDiff(Hash from, Hash to, JSONValue o) {
targetFileType = FileType.fromOctal(file.get("b_mode").asString());

var diff = file.get("diff").asString().split("\n");
var hunks = UnifiedDiffParser.parseSingleFileDiff(diff);
var diff = file.get("diff").asString();
var hunks = diff.isEmpty() ?
new ArrayList<Hunk>() :

patches.add(new TextualPatch(sourcePath, sourceFileType,,
targetPath, targetFileType,,

1 comment on commit b4bc191

Copy link

@openjdk-notifier openjdk-notifier bot commented on b4bc191 Oct 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.