Skip to content

Commit

Permalink
fix(index): Write a revision and revise predecessors on both source...
Browse files Browse the repository at this point in the history
...and target for "net zero" changes; don't mention the object in the
corresponding commit document however.
  • Loading branch information
apeteri authored and cmark committed Nov 14, 2023
1 parent 75ce17a commit a5979c1
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -425,11 +425,7 @@ private Commit doCommit(String commitGroupId, long timestamp, String author, Str
if (object instanceof Revision) {
RevisionDiff revisionDiff = value.getDiff();
final Revision rev = revisionDiff.newRevision;

if (!revisionDiff.hasChanges()) {
return;
}


if (isMerge()) {
revisionsToReviseOnMergeSource.put(rev.getClass(), rev.getId());
}
Expand All @@ -439,7 +435,11 @@ private Commit doCommit(String commitGroupId, long timestamp, String author, Str
}

writer.put(rev);


if (!revisionDiff.hasChanges()) {
return;
}

// register component as changed in commit doc
ObjectId containerId = checkNotNull(rev.getContainerId(), "Missing containerId for revision: %s", rev);
ObjectId objectId = rev.getObjectId();
Expand Down

0 comments on commit a5979c1

Please sign in to comment.